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 : 3297049 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 (3252862) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3252862) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24750998 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3252862'] with mtr_portfolio_ids : ['24750998'] and first list_photo_ids : [] new path : /proc/3297049/ Name: python3 Umask: 0002 State: R (running) Tgid: 3297049 Ngid: 0 Pid: 3297049 PPid: 3297048 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 3297049 NSpid: 3297049 NSpgid: 3295023 NSsid: 3295023 VmPeak: 1106876 kB VmSize: 1106876 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99952 kB VmRSS: 99952 kB RssAnon: 59812 kB RssFile: 40140 kB RssShmem: 0 kB VmData: 865628 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 616 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 6/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: 53 nonvoluntary_ctxt_switches: 90 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '3297049', 'Ngid': '0', 'Pid': '3297049', 'PPid': '3297048', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '3297049', 'NSpid': '3297049', 'NSpgid': '3295023', 'NSsid': '3295023', 'VmPeak': '1106876 kB', 'VmSize': '1106876 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99952 kB', 'VmRSS': '99952 kB', 'RssAnon': '59812 kB', 'RssFile': '40140 kB', 'RssShmem': '0 kB', 'VmData': '865628 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '616 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '6/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': '53', 'nonvoluntary_ctxt_switches': '90'} ('datou_batch_current', '3297049', '1106876', '0', '1106876', '865628', '99952', b'', 'marlene', '3252862') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (24750998) 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 (3252862 ) ) 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 (24750998) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1371377938, 'portfolio_id': 24750998}, {'photo_id': 1371377935, 'portfolio_id': 24750998}, {'photo_id': 1371377925, 'portfolio_id': 24750998}, {'photo_id': 1371377922, 'portfolio_id': 24750998}, {'photo_id': 1371377920, 'portfolio_id': 24750998}, {'photo_id': 1371377912, 'portfolio_id': 24750998}, {'photo_id': 1371377902, 'portfolio_id': 24750998}, {'photo_id': 1371377898, 'portfolio_id': 24750998}, {'photo_id': 1371377889, 'portfolio_id': 24750998}, {'photo_id': 1371377887, 'portfolio_id': 24750998}, {'photo_id': 1371377883, 'portfolio_id': 24750998}, {'photo_id': 1371377880, 'portfolio_id': 24750998}, {'photo_id': 1371377828, 'portfolio_id': 24750998}, {'photo_id': 1371377825, 'portfolio_id': 24750998}, {'photo_id': 1371377821, 'portfolio_id': 24750998}, {'photo_id': 1371377818, 'portfolio_id': 24750998}, {'photo_id': 1371377809, 'portfolio_id': 24750998}, {'photo_id': 1371377807, 'portfolio_id': 24750998}] map_portfolio_id_photo_id: {24750998: [1371377938, 1371377935, 1371377925, 1371377922, 1371377920, 1371377912, 1371377902, 1371377898, 1371377889, 1371377887, 1371377883, 1371377880, 1371377828, 1371377825, 1371377821, 1371377818, 1371377809, 1371377807]} ##### 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.014334678649902344 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Wed Jul 9 14:34:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24750998) 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 : 24750998 get user id for portfolio 24750998 get sub ptf for main ptf 24750998, type 3726 and hashtags ['Carton_brun', 'autre_refus', 'kraft', 'plastique', 'Carton_gris', 'environnement', 'papier', 'Teint_Dans_La_Masse', 'flou', 'metal', 'mal_croppe', 'cartonnette'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=24750998 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','autre_refus','kraft','plastique','Carton_gris','environnement','papier','Teint_Dans_La_Masse','flou','metal','mal_croppe','cartonnette')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=24750998 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','autre_refus','kraft','plastique','Carton_gris','environnement','papier','Teint_Dans_La_Masse','flou','metal','mal_croppe','cartonnette')) AND mptpi.`min_score`=0.5 To do returned map {'Teint_Dans_La_Masse': {'main_port_id': 24750998, 'sub_port_id': 24751030, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16645810, 'last_updated_at': datetime.datetime(2025, 7, 9, 14, 33, 31), 'last_updated_at_desc': datetime.datetime(2025, 7, 9, 14, 33, 31), 'last_updated_at_asc': datetime.datetime(2025, 7, 9, 14, 33, 30)}, 'mal_croppe': {'main_port_id': 24750998, 'sub_port_id': 24751031, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16645811, 'last_updated_at': datetime.datetime(2025, 7, 9, 14, 33, 31), 'last_updated_at_desc': datetime.datetime(2025, 7, 9, 14, 33, 31), 'last_updated_at_asc': datetime.datetime(2025, 7, 9, 14, 33, 30)}, 'flou': {'main_port_id': 24750998, 'sub_port_id': 24751032, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16645812, 'last_updated_at': datetime.datetime(2025, 7, 9, 14, 33, 31), 'last_updated_at_desc': datetime.datetime(2025, 7, 9, 14, 33, 31), 'last_updated_at_asc': datetime.datetime(2025, 7, 9, 14, 33, 30)}, 'kraft': {'main_port_id': 24750998, 'sub_port_id': 24751033, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16645813, 'last_updated_at': datetime.datetime(2025, 7, 9, 14, 33, 31), 'last_updated_at_desc': datetime.datetime(2025, 7, 9, 14, 33, 31), 'last_updated_at_asc': datetime.datetime(2025, 7, 9, 14, 33, 30)}, 'plastique': {'main_port_id': 24750998, 'sub_port_id': 24751034, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16645814, 'last_updated_at': datetime.datetime(2025, 7, 9, 14, 33, 31), 'last_updated_at_desc': datetime.datetime(2025, 7, 9, 14, 33, 31), 'last_updated_at_asc': datetime.datetime(2025, 7, 9, 14, 33, 30)}, 'environnement': {'main_port_id': 24750998, 'sub_port_id': 24751035, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16645815, 'last_updated_at': datetime.datetime(2025, 7, 9, 14, 33, 31), 'last_updated_at_desc': datetime.datetime(2025, 7, 9, 14, 33, 31), 'last_updated_at_asc': datetime.datetime(2025, 7, 9, 14, 33, 30)}, 'cartonnette': {'main_port_id': 24750998, 'sub_port_id': 24751036, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16645816, 'last_updated_at': datetime.datetime(2025, 7, 9, 14, 33, 31), 'last_updated_at_desc': datetime.datetime(2025, 7, 9, 14, 33, 31), 'last_updated_at_asc': datetime.datetime(2025, 7, 9, 14, 33, 30)}, 'autre_refus': {'main_port_id': 24750998, 'sub_port_id': 24751037, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16645817, 'last_updated_at': datetime.datetime(2025, 7, 9, 14, 33, 31), 'last_updated_at_desc': datetime.datetime(2025, 7, 9, 14, 33, 31), 'last_updated_at_asc': datetime.datetime(2025, 7, 9, 14, 33, 30)}, 'Carton_brun': {'main_port_id': 24750998, 'sub_port_id': 24751038, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16645818, 'last_updated_at': datetime.datetime(2025, 7, 9, 14, 33, 31), 'last_updated_at_desc': datetime.datetime(2025, 7, 9, 14, 33, 31), 'last_updated_at_asc': datetime.datetime(2025, 7, 9, 14, 33, 30)}, 'papier': {'main_port_id': 24750998, 'sub_port_id': 24751039, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16645819, 'last_updated_at': datetime.datetime(2025, 7, 9, 14, 33, 31), 'last_updated_at_desc': datetime.datetime(2025, 7, 9, 14, 33, 31), 'last_updated_at_asc': datetime.datetime(2025, 7, 9, 14, 33, 30)}, 'Carton_gris': {'main_port_id': 24750998, 'sub_port_id': 24751040, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16645820, 'last_updated_at': datetime.datetime(2025, 7, 9, 14, 33, 31), 'last_updated_at_desc': datetime.datetime(2025, 7, 9, 14, 33, 31), 'last_updated_at_asc': datetime.datetime(2025, 7, 9, 14, 33, 30)}, 'metal': {'main_port_id': 24750998, 'sub_port_id': 24751041, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16645821, 'last_updated_at': datetime.datetime(2025, 7, 9, 14, 33, 31), 'last_updated_at_desc': datetime.datetime(2025, 7, 9, 14, 33, 31), 'last_updated_at_asc': datetime.datetime(2025, 7, 9, 14, 33, 30)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24751030 , 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=24750998 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 (24751030) result : ((1371377942,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24750998) result : ((1371377807,), (1371377809,), (1371377818,), (1371377821,), (1371377825,), (1371377828,), (1371377880,), (1371377883,), (1371377887,), (1371377889,), (1371377898,), (1371377902,), (1371377912,), (1371377920,), (1371377922,), (1371377925,), (1371377935,), (1371377938,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24751031 , 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=24750998 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 (24751031) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24750998) result : ((1371377807,), (1371377809,), (1371377818,), (1371377821,), (1371377825,), (1371377828,), (1371377880,), (1371377883,), (1371377887,), (1371377889,), (1371377898,), (1371377902,), (1371377912,), (1371377920,), (1371377922,), (1371377925,), (1371377935,), (1371377938,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24751032 , 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=24750998 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 (24751032) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24750998) result : ((1371377807,), (1371377809,), (1371377818,), (1371377821,), (1371377825,), (1371377828,), (1371377880,), (1371377883,), (1371377887,), (1371377889,), (1371377898,), (1371377902,), (1371377912,), (1371377920,), (1371377922,), (1371377925,), (1371377935,), (1371377938,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24751033 , 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=24750998 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 (24751033) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24750998) result : ((1371377807,), (1371377809,), (1371377818,), (1371377821,), (1371377825,), (1371377828,), (1371377880,), (1371377883,), (1371377887,), (1371377889,), (1371377898,), (1371377902,), (1371377912,), (1371377920,), (1371377922,), (1371377925,), (1371377935,), (1371377938,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24751034 , 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=24750998 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 (24751034) result : ((1371377949,), (1371377950,), (1371377951,), (1371377953,), (1371377954,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24750998) result : ((1371377807,), (1371377809,), (1371377818,), (1371377821,), (1371377825,), (1371377828,), (1371377880,), (1371377883,), (1371377887,), (1371377889,), (1371377898,), (1371377902,), (1371377912,), (1371377920,), (1371377922,), (1371377925,), (1371377935,), (1371377938,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24751035 , 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=24750998 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 (24751035) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24750998) result : ((1371377807,), (1371377809,), (1371377818,), (1371377821,), (1371377825,), (1371377828,), (1371377880,), (1371377883,), (1371377887,), (1371377889,), (1371377898,), (1371377902,), (1371377912,), (1371377920,), (1371377922,), (1371377925,), (1371377935,), (1371377938,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24751036 , 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=24750998 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 (24751036) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24750998) result : ((1371377807,), (1371377809,), (1371377818,), (1371377821,), (1371377825,), (1371377828,), (1371377880,), (1371377883,), (1371377887,), (1371377889,), (1371377898,), (1371377902,), (1371377912,), (1371377920,), (1371377922,), (1371377925,), (1371377935,), (1371377938,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24751037 , 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=24750998 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 (24751037) result : ((1371377944,), (1371377945,), (1371377946,), (1371377947,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24750998) result : ((1371377807,), (1371377809,), (1371377818,), (1371377821,), (1371377825,), (1371377828,), (1371377880,), (1371377883,), (1371377887,), (1371377889,), (1371377898,), (1371377902,), (1371377912,), (1371377920,), (1371377922,), (1371377925,), (1371377935,), (1371377938,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24751038 , 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=24750998 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 (24751038) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24750998) result : ((1371377807,), (1371377809,), (1371377818,), (1371377821,), (1371377825,), (1371377828,), (1371377880,), (1371377883,), (1371377887,), (1371377889,), (1371377898,), (1371377902,), (1371377912,), (1371377920,), (1371377922,), (1371377925,), (1371377935,), (1371377938,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24751039 , 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=24750998 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 (24751039) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24750998) result : ((1371377807,), (1371377809,), (1371377818,), (1371377821,), (1371377825,), (1371377828,), (1371377880,), (1371377883,), (1371377887,), (1371377889,), (1371377898,), (1371377902,), (1371377912,), (1371377920,), (1371377922,), (1371377925,), (1371377935,), (1371377938,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24751040 , 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=24750998 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 (24751040) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24750998) result : ((1371377807,), (1371377809,), (1371377818,), (1371377821,), (1371377825,), (1371377828,), (1371377880,), (1371377883,), (1371377887,), (1371377889,), (1371377898,), (1371377902,), (1371377912,), (1371377920,), (1371377922,), (1371377925,), (1371377935,), (1371377938,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24751041 , 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=24750998 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 (24751041) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24750998) result : ((1371377807,), (1371377809,), (1371377818,), (1371377821,), (1371377825,), (1371377828,), (1371377880,), (1371377883,), (1371377887,), (1371377889,), (1371377898,), (1371377902,), (1371377912,), (1371377920,), (1371377922,), (1371377925,), (1371377935,), (1371377938,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=24750998 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','autre_refus','kraft','plastique','Carton_gris','environnement','papier','Teint_Dans_La_Masse','flou','metal','mal_croppe','cartonnette')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=24750998 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','autre_refus','kraft','plastique','Carton_gris','environnement','papier','Teint_Dans_La_Masse','flou','metal','mal_croppe','cartonnette')) AND mptpi.`min_score`=0.5 To do returned map {'Teint_Dans_La_Masse': {'main_port_id': 24750998, 'sub_port_id': 24751042, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16645822, 'last_updated_at': datetime.datetime(2025, 7, 9, 14, 33, 32), 'last_updated_at_desc': datetime.datetime(2025, 7, 9, 14, 33, 32), 'last_updated_at_asc': datetime.datetime(2025, 7, 9, 14, 33, 32)}, 'mal_croppe': {'main_port_id': 24750998, 'sub_port_id': 24751043, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16645823, 'last_updated_at': datetime.datetime(2025, 7, 9, 14, 33, 32), 'last_updated_at_desc': datetime.datetime(2025, 7, 9, 14, 33, 32), 'last_updated_at_asc': datetime.datetime(2025, 7, 9, 14, 33, 32)}, 'flou': {'main_port_id': 24750998, 'sub_port_id': 24751044, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16645824, 'last_updated_at': datetime.datetime(2025, 7, 9, 14, 33, 32), 'last_updated_at_desc': datetime.datetime(2025, 7, 9, 14, 33, 32), 'last_updated_at_asc': datetime.datetime(2025, 7, 9, 14, 33, 32)}, 'kraft': {'main_port_id': 24750998, 'sub_port_id': 24751045, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16645825, 'last_updated_at': datetime.datetime(2025, 7, 9, 14, 33, 32), 'last_updated_at_desc': datetime.datetime(2025, 7, 9, 14, 33, 32), 'last_updated_at_asc': datetime.datetime(2025, 7, 9, 14, 33, 32)}, 'plastique': {'main_port_id': 24750998, 'sub_port_id': 24751046, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16645826, 'last_updated_at': datetime.datetime(2025, 7, 9, 14, 33, 32), 'last_updated_at_desc': datetime.datetime(2025, 7, 9, 14, 33, 32), 'last_updated_at_asc': datetime.datetime(2025, 7, 9, 14, 33, 32)}, 'environnement': {'main_port_id': 24750998, 'sub_port_id': 24751047, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16645827, 'last_updated_at': datetime.datetime(2025, 7, 9, 14, 33, 32), 'last_updated_at_desc': datetime.datetime(2025, 7, 9, 14, 33, 32), 'last_updated_at_asc': datetime.datetime(2025, 7, 9, 14, 33, 32)}, 'cartonnette': {'main_port_id': 24750998, 'sub_port_id': 24751048, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16645828, 'last_updated_at': datetime.datetime(2025, 7, 9, 14, 33, 32), 'last_updated_at_desc': datetime.datetime(2025, 7, 9, 14, 33, 32), 'last_updated_at_asc': datetime.datetime(2025, 7, 9, 14, 33, 32)}, 'autre_refus': {'main_port_id': 24750998, 'sub_port_id': 24751049, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16645829, 'last_updated_at': datetime.datetime(2025, 7, 9, 14, 33, 32), 'last_updated_at_desc': datetime.datetime(2025, 7, 9, 14, 33, 32), 'last_updated_at_asc': datetime.datetime(2025, 7, 9, 14, 33, 32)}, 'Carton_brun': {'main_port_id': 24750998, 'sub_port_id': 24751050, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16645830, 'last_updated_at': datetime.datetime(2025, 7, 9, 14, 33, 32), 'last_updated_at_desc': datetime.datetime(2025, 7, 9, 14, 33, 32), 'last_updated_at_asc': datetime.datetime(2025, 7, 9, 14, 33, 32)}, 'papier': {'main_port_id': 24750998, 'sub_port_id': 24751051, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16645831, 'last_updated_at': datetime.datetime(2025, 7, 9, 14, 33, 32), 'last_updated_at_desc': datetime.datetime(2025, 7, 9, 14, 33, 32), 'last_updated_at_asc': datetime.datetime(2025, 7, 9, 14, 33, 32)}, 'Carton_gris': {'main_port_id': 24750998, 'sub_port_id': 24751052, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16645832, 'last_updated_at': datetime.datetime(2025, 7, 9, 14, 33, 32), 'last_updated_at_desc': datetime.datetime(2025, 7, 9, 14, 33, 32), 'last_updated_at_asc': datetime.datetime(2025, 7, 9, 14, 33, 32)}, 'metal': {'main_port_id': 24750998, 'sub_port_id': 24751053, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16645833, 'last_updated_at': datetime.datetime(2025, 7, 9, 14, 33, 32), 'last_updated_at_desc': datetime.datetime(2025, 7, 9, 14, 33, 32), 'last_updated_at_asc': datetime.datetime(2025, 7, 9, 14, 33, 32)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24751042,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24751030 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24751043,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24751031 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24751044,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24751032 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24751045,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24751033 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24751046,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24751034 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24751047,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24751035 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24751048,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24751036 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24751049,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24751037 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24751050,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24751038 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24751051,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24751039 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24751052,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24751040 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24751053,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24751041 lien utilise dans velours : https://www.fotonower.com/velours/24751042,24751043,24751044,24751045,24751046,24751047,24751048,24751049,24751050,24751051,24751052,24751053?tags=Teint_Dans_La_Masse,mal_croppe,flou,kraft,plastique,environnement,cartonnette,autre_refus,Carton_brun,papier,Carton_gris,metal After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24750998]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1371377938, 1371377935, 1371377925, 1371377922, 1371377920, 1371377912, 1371377902, 1371377898, 1371377889, 1371377887, 1371377883, 1371377880] map_info['map_portfolio_photo'] : {24750998: [1371377938, 1371377935, 1371377925, 1371377922, 1371377920, 1371377912, 1371377902, 1371377898, 1371377889, 1371377887, 1371377883, 1371377880, 1371377828, 1371377825, 1371377821, 1371377818, 1371377809, 1371377807]} final : False mtd_id 4302 list_pids : [1371377938, 1371377935, 1371377925, 1371377922, 1371377920, 1371377912, 1371377902, 1371377898, 1371377889, 1371377887, 1371377883, 1371377880] Looping around the photos to save general results len do output : 1 /24750998. 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, '3252862') ('4302', '24750998', '1371377938', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377935', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377925', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377922', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377920', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377912', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377902', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377898', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377889', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377887', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377883', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377880', None, None, None, None, None, '3252862') 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, '24750998', "{'Teint_Dans_La_Masse': 24751030, 'mal_croppe': 24751031, 'flou': 24751032, 'kraft': 24751033, 'plastique': 24751034, 'environnement': 24751035, 'cartonnette': 24751036, 'autre_refus': 24751037, 'Carton_brun': 24751038, 'papier': 24751039, 'Carton_gris': 24751040, 'metal': 24751041}", None, None, None, None, '3252862'), ('4302', '24750998', '1371377938', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377935', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377925', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377922', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377920', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377912', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377902', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377898', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377889', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377887', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377883', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377880', None, None, None, None, None, '3252862')] time used for this insertion : 0.014389991760253906 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.4858481884002686 time spend to save output : 0.014749288558959961 total time spend for step 1 : 1.5005974769592285 step2:final Wed Jul 9 14:35:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24750998) 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 24750998 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1371377828,1371377825,1371377821,1371377818,1371377809,1371377807,1371377902,1371377898,1371377889,1371377887,1371377883,1371377880,1371377938,1371377935,1371377925,1371377922,1371377920,1371377912); insert ignore into MTRUser.portfolio_carac_ratio (portfolio_id, hashtag_type, hashtag_id, value) values (%s,%s,%s,%s) on DUPLICATE KEY UPDATE value=VALUES(value) After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24750998]) Inside saveOutput : final : False verbose : True original output for save of step final : {1371377938: ('0.03307171731681799',), 1371377935: ('0.03307171731681799',), 1371377925: ('0.03307171731681799',), 1371377922: ('0.03307171731681799',), 1371377920: ('0.03307171731681799',), 1371377912: ('0.03307171731681799',), 1371377902: ('0.03307171731681799',), 1371377898: ('0.03307171731681799',), 1371377889: ('0.03307171731681799',), 1371377887: ('0.03307171731681799',), 1371377883: ('0.03307171731681799',), 1371377880: ('0.03307171731681799',)} new output for save of step final : {1371377938: ('0.03307171731681799',), 1371377935: ('0.03307171731681799',), 1371377925: ('0.03307171731681799',), 1371377922: ('0.03307171731681799',), 1371377920: ('0.03307171731681799',), 1371377912: ('0.03307171731681799',), 1371377902: ('0.03307171731681799',), 1371377898: ('0.03307171731681799',), 1371377889: ('0.03307171731681799',), 1371377887: ('0.03307171731681799',), 1371377883: ('0.03307171731681799',), 1371377880: ('0.03307171731681799',)} [1371377938, 1371377935, 1371377925, 1371377922, 1371377920, 1371377912, 1371377902, 1371377898, 1371377889, 1371377887, 1371377883, 1371377880] map_info['map_portfolio_photo'] : {24750998: [1371377938, 1371377935, 1371377925, 1371377922, 1371377920, 1371377912, 1371377902, 1371377898, 1371377889, 1371377887, 1371377883, 1371377880, 1371377828, 1371377825, 1371377821, 1371377818, 1371377809, 1371377807]} final : False mtd_id 4302 list_pids : [1371377938, 1371377935, 1371377925, 1371377922, 1371377920, 1371377912, 1371377902, 1371377898, 1371377889, 1371377887, 1371377883, 1371377880] Looping around the photos to save general results len do output : 12 /1371377938.Didn't retrieve data . /1371377935.Didn't retrieve data . /1371377925.Didn't retrieve data . /1371377922.Didn't retrieve data . /1371377920.Didn't retrieve data . /1371377912.Didn't retrieve data . /1371377902.Didn't retrieve data . /1371377898.Didn't retrieve data . /1371377889.Didn't retrieve data . /1371377887.Didn't retrieve data . /1371377883.Didn't retrieve data . /1371377880.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, '3252862') ('4302', '24750998', '1371377938', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377935', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377925', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377922', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377920', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377912', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377902', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377898', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377889', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377887', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377883', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377880', None, None, None, None, None, '3252862') 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', '24750998', '1371377938', '0.03307171731681799', None, None, None, None, '3252862'), ('4302', '24750998', '1371377935', '0.03307171731681799', None, None, None, None, '3252862'), ('4302', '24750998', '1371377925', '0.03307171731681799', None, None, None, None, '3252862'), ('4302', '24750998', '1371377922', '0.03307171731681799', None, None, None, None, '3252862'), ('4302', '24750998', '1371377920', '0.03307171731681799', None, None, None, None, '3252862'), ('4302', '24750998', '1371377912', '0.03307171731681799', None, None, None, None, '3252862'), ('4302', '24750998', '1371377902', '0.03307171731681799', None, None, None, None, '3252862'), ('4302', '24750998', '1371377898', '0.03307171731681799', None, None, None, None, '3252862'), ('4302', '24750998', '1371377889', '0.03307171731681799', None, None, None, None, '3252862'), ('4302', '24750998', '1371377887', '0.03307171731681799', None, None, None, None, '3252862'), ('4302', '24750998', '1371377883', '0.03307171731681799', None, None, None, None, '3252862'), ('4302', '24750998', '1371377880', '0.03307171731681799', None, None, None, None, '3252862')] time used for this insertion : 0.013248205184936523 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06299734115600586 time spend to save output : 0.013863325119018555 total time spend for step 2 : 0.07686066627502441 step3:velours_tree Wed Jul 9 14:35:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {24750998: [{'Teint_Dans_La_Masse': 24751030, 'mal_croppe': 24751031, 'flou': 24751032, 'kraft': 24751033, 'plastique': 24751034, 'environnement': 24751035, 'cartonnette': 24751036, 'autre_refus': 24751037, 'Carton_brun': 24751038, 'papier': 24751039, 'Carton_gris': 24751040, 'metal': 24751041}]} input_args_next_step : {24750998: ()} output_args : {24750998: [{'Teint_Dans_La_Masse': 24751030, 'mal_croppe': 24751031, 'flou': 24751032, 'kraft': 24751033, 'plastique': 24751034, 'environnement': 24751035, 'cartonnette': 24751036, 'autre_refus': 24751037, 'Carton_brun': 24751038, 'papier': 24751039, 'Carton_gris': 24751040, 'metal': 24751041}]} args : 24750998 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 : ({'Teint_Dans_La_Masse': 24751030, 'mal_croppe': 24751031, 'flou': 24751032, 'kraft': 24751033, 'plastique': 24751034, 'environnement': 24751035, 'cartonnette': 24751036, 'autre_refus': 24751037, 'Carton_brun': 24751038, 'papier': 24751039, 'Carton_gris': 24751040, 'metal': 24751041},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24750998) 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([24750998]) 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.33875226974487305 time spend to save output : 5.221366882324219e-05 total time spend for step 3 : 0.3388044834136963 step4:send_mail_cod Wed Jul 9 14:35:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1371377938: ('0.03307171731681799',), 1371377935: ('0.03307171731681799',), 1371377925: ('0.03307171731681799',), 1371377922: ('0.03307171731681799',), 1371377920: ('0.03307171731681799',), 1371377912: ('0.03307171731681799',), 1371377902: ('0.03307171731681799',), 1371377898: ('0.03307171731681799',), 1371377889: ('0.03307171731681799',), 1371377887: ('0.03307171731681799',), 1371377883: ('0.03307171731681799',), 1371377880: ('0.03307171731681799',)} input_args_next_step : {1371377938: ()} output_args : {1371377938: ('0.03307171731681799',), 1371377935: ('0.03307171731681799',), 1371377925: ('0.03307171731681799',), 1371377922: ('0.03307171731681799',), 1371377920: ('0.03307171731681799',), 1371377912: ('0.03307171731681799',), 1371377902: ('0.03307171731681799',), 1371377898: ('0.03307171731681799',), 1371377889: ('0.03307171731681799',), 1371377887: ('0.03307171731681799',), 1371377883: ('0.03307171731681799',), 1371377880: ('0.03307171731681799',)} args : 1371377938 depend.output_id : 0 input_args_next_step : {1371377938: ('0.03307171731681799',), 1371377935: ()} output_args : {1371377938: ('0.03307171731681799',), 1371377935: ('0.03307171731681799',), 1371377925: ('0.03307171731681799',), 1371377922: ('0.03307171731681799',), 1371377920: ('0.03307171731681799',), 1371377912: ('0.03307171731681799',), 1371377902: ('0.03307171731681799',), 1371377898: ('0.03307171731681799',), 1371377889: ('0.03307171731681799',), 1371377887: ('0.03307171731681799',), 1371377883: ('0.03307171731681799',), 1371377880: ('0.03307171731681799',)} args : 1371377935 depend.output_id : 0 input_args_next_step : {1371377938: ('0.03307171731681799',), 1371377935: ('0.03307171731681799',), 1371377925: ()} output_args : {1371377938: ('0.03307171731681799',), 1371377935: ('0.03307171731681799',), 1371377925: ('0.03307171731681799',), 1371377922: ('0.03307171731681799',), 1371377920: ('0.03307171731681799',), 1371377912: ('0.03307171731681799',), 1371377902: ('0.03307171731681799',), 1371377898: ('0.03307171731681799',), 1371377889: ('0.03307171731681799',), 1371377887: ('0.03307171731681799',), 1371377883: ('0.03307171731681799',), 1371377880: ('0.03307171731681799',)} args : 1371377925 depend.output_id : 0 input_args_next_step : {1371377938: ('0.03307171731681799',), 1371377935: ('0.03307171731681799',), 1371377925: ('0.03307171731681799',), 1371377922: ()} output_args : {1371377938: ('0.03307171731681799',), 1371377935: ('0.03307171731681799',), 1371377925: ('0.03307171731681799',), 1371377922: ('0.03307171731681799',), 1371377920: ('0.03307171731681799',), 1371377912: ('0.03307171731681799',), 1371377902: ('0.03307171731681799',), 1371377898: ('0.03307171731681799',), 1371377889: ('0.03307171731681799',), 1371377887: ('0.03307171731681799',), 1371377883: ('0.03307171731681799',), 1371377880: ('0.03307171731681799',)} args : 1371377922 depend.output_id : 0 input_args_next_step : {1371377938: ('0.03307171731681799',), 1371377935: ('0.03307171731681799',), 1371377925: ('0.03307171731681799',), 1371377922: ('0.03307171731681799',), 1371377920: ()} output_args : {1371377938: ('0.03307171731681799',), 1371377935: ('0.03307171731681799',), 1371377925: ('0.03307171731681799',), 1371377922: ('0.03307171731681799',), 1371377920: ('0.03307171731681799',), 1371377912: ('0.03307171731681799',), 1371377902: ('0.03307171731681799',), 1371377898: ('0.03307171731681799',), 1371377889: ('0.03307171731681799',), 1371377887: ('0.03307171731681799',), 1371377883: ('0.03307171731681799',), 1371377880: ('0.03307171731681799',)} args : 1371377920 depend.output_id : 0 input_args_next_step : {1371377938: ('0.03307171731681799',), 1371377935: ('0.03307171731681799',), 1371377925: ('0.03307171731681799',), 1371377922: ('0.03307171731681799',), 1371377920: ('0.03307171731681799',), 1371377912: ()} output_args : {1371377938: ('0.03307171731681799',), 1371377935: ('0.03307171731681799',), 1371377925: ('0.03307171731681799',), 1371377922: ('0.03307171731681799',), 1371377920: ('0.03307171731681799',), 1371377912: ('0.03307171731681799',), 1371377902: ('0.03307171731681799',), 1371377898: ('0.03307171731681799',), 1371377889: ('0.03307171731681799',), 1371377887: ('0.03307171731681799',), 1371377883: ('0.03307171731681799',), 1371377880: ('0.03307171731681799',)} args : 1371377912 depend.output_id : 0 input_args_next_step : {1371377938: ('0.03307171731681799',), 1371377935: ('0.03307171731681799',), 1371377925: ('0.03307171731681799',), 1371377922: ('0.03307171731681799',), 1371377920: ('0.03307171731681799',), 1371377912: ('0.03307171731681799',), 1371377902: ()} output_args : {1371377938: ('0.03307171731681799',), 1371377935: ('0.03307171731681799',), 1371377925: ('0.03307171731681799',), 1371377922: ('0.03307171731681799',), 1371377920: ('0.03307171731681799',), 1371377912: ('0.03307171731681799',), 1371377902: ('0.03307171731681799',), 1371377898: ('0.03307171731681799',), 1371377889: ('0.03307171731681799',), 1371377887: ('0.03307171731681799',), 1371377883: ('0.03307171731681799',), 1371377880: ('0.03307171731681799',)} args : 1371377902 depend.output_id : 0 input_args_next_step : {1371377938: ('0.03307171731681799',), 1371377935: ('0.03307171731681799',), 1371377925: ('0.03307171731681799',), 1371377922: ('0.03307171731681799',), 1371377920: ('0.03307171731681799',), 1371377912: ('0.03307171731681799',), 1371377902: ('0.03307171731681799',), 1371377898: ()} output_args : {1371377938: ('0.03307171731681799',), 1371377935: ('0.03307171731681799',), 1371377925: ('0.03307171731681799',), 1371377922: ('0.03307171731681799',), 1371377920: ('0.03307171731681799',), 1371377912: ('0.03307171731681799',), 1371377902: ('0.03307171731681799',), 1371377898: ('0.03307171731681799',), 1371377889: ('0.03307171731681799',), 1371377887: ('0.03307171731681799',), 1371377883: ('0.03307171731681799',), 1371377880: ('0.03307171731681799',)} args : 1371377898 depend.output_id : 0 input_args_next_step : {1371377938: ('0.03307171731681799',), 1371377935: ('0.03307171731681799',), 1371377925: ('0.03307171731681799',), 1371377922: ('0.03307171731681799',), 1371377920: ('0.03307171731681799',), 1371377912: ('0.03307171731681799',), 1371377902: ('0.03307171731681799',), 1371377898: ('0.03307171731681799',), 1371377889: ()} output_args : {1371377938: ('0.03307171731681799',), 1371377935: ('0.03307171731681799',), 1371377925: ('0.03307171731681799',), 1371377922: ('0.03307171731681799',), 1371377920: ('0.03307171731681799',), 1371377912: ('0.03307171731681799',), 1371377902: ('0.03307171731681799',), 1371377898: ('0.03307171731681799',), 1371377889: ('0.03307171731681799',), 1371377887: ('0.03307171731681799',), 1371377883: ('0.03307171731681799',), 1371377880: ('0.03307171731681799',)} args : 1371377889 depend.output_id : 0 input_args_next_step : {1371377938: ('0.03307171731681799',), 1371377935: ('0.03307171731681799',), 1371377925: ('0.03307171731681799',), 1371377922: ('0.03307171731681799',), 1371377920: ('0.03307171731681799',), 1371377912: ('0.03307171731681799',), 1371377902: ('0.03307171731681799',), 1371377898: ('0.03307171731681799',), 1371377889: ('0.03307171731681799',), 1371377887: ()} output_args : {1371377938: ('0.03307171731681799',), 1371377935: ('0.03307171731681799',), 1371377925: ('0.03307171731681799',), 1371377922: ('0.03307171731681799',), 1371377920: ('0.03307171731681799',), 1371377912: ('0.03307171731681799',), 1371377902: ('0.03307171731681799',), 1371377898: ('0.03307171731681799',), 1371377889: ('0.03307171731681799',), 1371377887: ('0.03307171731681799',), 1371377883: ('0.03307171731681799',), 1371377880: ('0.03307171731681799',)} args : 1371377887 depend.output_id : 0 input_args_next_step : {1371377938: ('0.03307171731681799',), 1371377935: ('0.03307171731681799',), 1371377925: ('0.03307171731681799',), 1371377922: ('0.03307171731681799',), 1371377920: ('0.03307171731681799',), 1371377912: ('0.03307171731681799',), 1371377902: ('0.03307171731681799',), 1371377898: ('0.03307171731681799',), 1371377889: ('0.03307171731681799',), 1371377887: ('0.03307171731681799',), 1371377883: ()} output_args : {1371377938: ('0.03307171731681799',), 1371377935: ('0.03307171731681799',), 1371377925: ('0.03307171731681799',), 1371377922: ('0.03307171731681799',), 1371377920: ('0.03307171731681799',), 1371377912: ('0.03307171731681799',), 1371377902: ('0.03307171731681799',), 1371377898: ('0.03307171731681799',), 1371377889: ('0.03307171731681799',), 1371377887: ('0.03307171731681799',), 1371377883: ('0.03307171731681799',), 1371377880: ('0.03307171731681799',)} args : 1371377883 depend.output_id : 0 input_args_next_step : {1371377938: ('0.03307171731681799',), 1371377935: ('0.03307171731681799',), 1371377925: ('0.03307171731681799',), 1371377922: ('0.03307171731681799',), 1371377920: ('0.03307171731681799',), 1371377912: ('0.03307171731681799',), 1371377902: ('0.03307171731681799',), 1371377898: ('0.03307171731681799',), 1371377889: ('0.03307171731681799',), 1371377887: ('0.03307171731681799',), 1371377883: ('0.03307171731681799',), 1371377880: ()} output_args : {1371377938: ('0.03307171731681799',), 1371377935: ('0.03307171731681799',), 1371377925: ('0.03307171731681799',), 1371377922: ('0.03307171731681799',), 1371377920: ('0.03307171731681799',), 1371377912: ('0.03307171731681799',), 1371377902: ('0.03307171731681799',), 1371377898: ('0.03307171731681799',), 1371377889: ('0.03307171731681799',), 1371377887: ('0.03307171731681799',), 1371377883: ('0.03307171731681799',), 1371377880: ('0.03307171731681799',)} args : 1371377880 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 : {24750998: [{'Teint_Dans_La_Masse': 24751030, 'mal_croppe': 24751031, 'flou': 24751032, 'kraft': 24751033, 'plastique': 24751034, 'environnement': 24751035, 'cartonnette': 24751036, 'autre_refus': 24751037, 'Carton_brun': 24751038, 'papier': 24751039, 'Carton_gris': 24751040, 'metal': 24751041}]} input_args_next_step : {1371377938: ('0.03307171731681799',), 1371377935: ('0.03307171731681799',), 1371377925: ('0.03307171731681799',), 1371377922: ('0.03307171731681799',), 1371377920: ('0.03307171731681799',), 1371377912: ('0.03307171731681799',), 1371377902: ('0.03307171731681799',), 1371377898: ('0.03307171731681799',), 1371377889: ('0.03307171731681799',), 1371377887: ('0.03307171731681799',), 1371377883: ('0.03307171731681799',), 1371377880: ('0.03307171731681799',), 24750998: ()} output_args : {24750998: [{'Teint_Dans_La_Masse': 24751030, 'mal_croppe': 24751031, 'flou': 24751032, 'kraft': 24751033, 'plastique': 24751034, 'environnement': 24751035, 'cartonnette': 24751036, 'autre_refus': 24751037, 'Carton_brun': 24751038, 'papier': 24751039, 'Carton_gris': 24751040, 'metal': 24751041}]} args : 24750998 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.03307171731681799',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24750998) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos ph WHERE photo_id IN (1371377938,1371377935,1371377925,1371377922,1371377920,1371377912,1371377902,1371377898,1371377889,1371377887,1371377883,1371377880) Found this number of photos: 12 ##### Call download_photos : nb_thread : 5 begin to download photo : 1371377880 begin to download photo : 1371377889 begin to download photo : 1371377912 begin to download photo : 1371377925 download finish for photo 1371377889 begin to download photo : 1371377898 download finish for photo 1371377880 begin to download photo : 1371377883 download finish for photo 1371377912 begin to download photo : 1371377920 download finish for photo 1371377925 begin to download photo : 1371377935 download finish for photo 1371377898 begin to download photo : 1371377902 download finish for photo 1371377883 begin to download photo : 1371377887 download finish for photo 1371377920 begin to download photo : 1371377922 download finish for photo 1371377935 begin to download photo : 1371377938 download finish for photo 1371377902 download finish for photo 1371377938 download finish for photo 1371377887 download finish for photo 1371377922 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette247510311752064501/ imagette247510321752064501/ imagette247510331752064501/ length of list_filenames : 12 ; length of list_pids : 12 ; length of list_args : 12 results_Auto_P24750998_09-07-2025_14_35_01.pdf 24751031 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24751031 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette247510311752064501 24751032 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24751032 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette247510321752064501 24751033 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24751033 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette247510331752064501 24751034 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24751034 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1371377949: '1752064407_1546014_1371377828_f36e1f013f2001710299f4c3cc64dff3_rle_crop_3877248938_0.png', 1371377950: '1752064407_1546014_1371377821_712cadc95a235a790ae44ed1f579913c_rle_crop_3877248964_0.png', 1371377951: '1752064407_1546014_1371377818_e0f4b7e1039e3ad99a09d936deaf5792_rle_crop_3877248974_0.png', 1371377953: '1752064407_1546014_1371377809_51084b17b7da3fff371e02ba235948f8_rle_crop_3877248987_0.png', 1371377954: '1752064407_1546014_1371377807_900ec896f456fc5af7fa66316ae98513_rle_crop_3877248998_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/9/dc412230d1318490ec486e92d592c10b_49174906.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/9/f005e89ed5e22950a1878517e0c2cf7d_28337408.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/9/4af25503261aee6f076b7e5d1f4a357a_33257065.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/9/85bf1fb5e369e7a7b8530da1439eb904_97656239.png change filename to text .imagette247510341752064501/ imagette247510341752064501/1752064407_1546014_1371377828_f36e1f013f2001710299f4c3cc64dff3_rle_crop_3877248938_0.png.png imagette247510341752064501/1752064407_1546014_1371377821_712cadc95a235a790ae44ed1f579913c_rle_crop_3877248964_0.png.png imagette247510341752064501/1752064407_1546014_1371377809_51084b17b7da3fff371e02ba235948f8_rle_crop_3877248987_0.png.png imagette247510341752064501/1752064407_1546014_1371377807_900ec896f456fc5af7fa66316ae98513_rle_crop_3877248998_0.png.png imagette247510341752064501/1752064407_1546014_1371377818_e0f4b7e1039e3ad99a09d936deaf5792_rle_crop_3877248974_0.png.png imagette247510361752064502/ wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/9/9d5abbd0ded4f1c3bb6fd05a01979c55_69205847.png imagette247510341752064501 24751036 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24751036 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette247510361752064502 24751037 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24751037 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1371377944: '1752064407_1546014_1371377828_f36e1f013f2001710299f4c3cc64dff3_rle_crop_3877248937_0.png', 1371377945: '1752064407_1546014_1371377825_afe6c720d8105f9562cc9b7d59a072e6_rle_crop_3877248950_0.png', 1371377946: '1752064407_1546014_1371377818_e0f4b7e1039e3ad99a09d936deaf5792_rle_crop_3877248975_0.png', 1371377947: '1752064407_1546014_1371377807_900ec896f456fc5af7fa66316ae98513_rle_crop_3877248997_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/9/e4900c497bc0acee89ff78dd56acbaf4_43443789.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/9/4001a106e271b2ec6ce2bc6ddcfa165d_9924674.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/9/d106d8466fcd41b73e85d19cfb858ee5_89156824.png change filename to text .imagette247510371752064502/ imagette247510371752064502/1752064407_1546014_1371377825_afe6c720d8105f9562cc9b7d59a072e6_rle_crop_3877248950_0.png.png imagette247510371752064502/1752064407_1546014_1371377807_900ec896f456fc5af7fa66316ae98513_rle_crop_3877248997_0.png.png imagette247510371752064502/1752064407_1546014_1371377818_e0f4b7e1039e3ad99a09d936deaf5792_rle_crop_3877248975_0.png.png imagette247510371752064502/1752064407_1546014_1371377828_f36e1f013f2001710299f4c3cc64dff3_rle_crop_3877248937_0.png.png imagette247510411752064502/ wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/9/0ee67e781257ab6b49bc75d0930ecee1_85141516.png imagette247510371752064502 24751041 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24751041 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette247510411752064502 24751030 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24751030 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1371377942: '1752064407_1546014_1371377807_900ec896f456fc5af7fa66316ae98513_rle_crop_3877248999_0.png'} change filename to text .imagette247510301752064502/ imagette247510301752064502/1752064407_1546014_1371377807_900ec896f456fc5af7fa66316ae98513_rle_crop_3877248999_0.png.png imagette247510381752064502/ imagette247510401752064502/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/9/857500e95e9aa57c65965b0fe6223222_78195473.png imagette247510301752064502 24751038 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24751038 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette247510381752064502 24751040 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24751040 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette247510401752064502 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=24750998 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/24751042,24751043,24751044,24751045,24751046,24751047,24751048,24751049,24751050,24751051,24751052,24751053?tags=Teint_Dans_La_Masse,mal_croppe,flou,kraft,plastique,environnement,cartonnette,autre_refus,Carton_brun,papier,Carton_gris,metal your option no_mail is active, we will not send the real mail to your client args[1371377938] : ('0.03307171731681799',) no score found for photo 1371377938 We are sending mail with results at report@fotonower.com args[1371377935] : ('0.03307171731681799',) no score found for photo 1371377935 We are sending mail with results at report@fotonower.com args[1371377925] : ('0.03307171731681799',) no score found for photo 1371377925 We are sending mail with results at report@fotonower.com args[1371377922] : ('0.03307171731681799',) no score found for photo 1371377922 We are sending mail with results at report@fotonower.com args[1371377920] : ('0.03307171731681799',) no score found for photo 1371377920 We are sending mail with results at report@fotonower.com args[1371377912] : ('0.03307171731681799',) no score found for photo 1371377912 We are sending mail with results at report@fotonower.com args[1371377902] : ('0.03307171731681799',) no score found for photo 1371377902 We are sending mail with results at report@fotonower.com args[1371377898] : ('0.03307171731681799',) no score found for photo 1371377898 We are sending mail with results at report@fotonower.com args[1371377889] : ('0.03307171731681799',) no score found for photo 1371377889 We are sending mail with results at report@fotonower.com args[1371377887] : ('0.03307171731681799',) no score found for photo 1371377887 We are sending mail with results at report@fotonower.com args[1371377883] : ('0.03307171731681799',) no score found for photo 1371377883 We are sending mail with results at report@fotonower.com args[1371377880] : ('0.03307171731681799',) no score found for photo 1371377880 We are sending mail with results at report@fotonower.com refus_total : 0.03307171731681799 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24750998 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_P24750998_09-07-2025_14_35_01.pdf results_Auto_P24750998_09-07-2025_14_35_01.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24750998_09-07-2025_14_35_01.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','24750998','results_Auto_P24750998_09-07-2025_14_35_01.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24750998_09-07-2025_14_35_01.pdf','pdf','','0.13','0.03307171731681799') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24750998]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1371377938, 1371377935, 1371377925, 1371377922, 1371377920, 1371377912, 1371377902, 1371377898, 1371377889, 1371377887, 1371377883, 1371377880] map_info['map_portfolio_photo'] : {24750998: [1371377938, 1371377935, 1371377925, 1371377922, 1371377920, 1371377912, 1371377902, 1371377898, 1371377889, 1371377887, 1371377883, 1371377880, 1371377828, 1371377825, 1371377821, 1371377818, 1371377809, 1371377807]} final : False mtd_id 4302 list_pids : [1371377938, 1371377935, 1371377925, 1371377922, 1371377920, 1371377912, 1371377902, 1371377898, 1371377889, 1371377887, 1371377883, 1371377880] 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, '3252862') ('4302', '24750998', '1371377938', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377935', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377925', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377922', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377920', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377912', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377902', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377898', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377889', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377887', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377883', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377880', None, None, None, None, None, '3252862') 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', '24750998', '1371377938', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377935', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377925', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377922', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377920', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377912', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377902', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377898', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377889', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377887', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377883', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377880', None, None, None, None, None, '3252862')] time used for this insertion : 0.013777017593383789 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.204449415206909 time spend to save output : 0.014036178588867188 total time spend for step 4 : 2.2184855937957764 step5:split_time_score Wed Jul 9 14:35: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 : ['24750998'] 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 : [('24750998',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24750998) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1371377889: {'path': 'temp/1752064501_3297049_1371377889_80d5fe909700a1dc54e3d982d47e7647.jpg', 'extension': 'jpg'}, 1371377898: {'path': 'temp/1752064501_3297049_1371377898_f7cc1c25564f6897199087032a64ba6e.jpg', 'extension': 'jpg'}, 1371377902: {'path': 'temp/1752064501_3297049_1371377902_795c7b68147cff1d1486e81b86c86f25.jpg', 'extension': 'jpg'}, 1371377925: {'path': 'temp/1752064501_3297049_1371377925_525f1e47b3abc26301f104fc9ff51663.jpg', 'extension': 'jpg'}, 1371377935: {'path': 'temp/1752064501_3297049_1371377935_92742eeb4b0378518d812a91888f88f0.jpg', 'extension': 'jpg'}, 1371377938: {'path': 'temp/1752064501_3297049_1371377938_030af34495565bbff065192712048310.jpg', 'extension': 'jpg'}, 1371377880: {'path': 'temp/1752064501_3297049_1371377880_d52950dca175b44a01957a59697cf33d.jpg', 'extension': 'jpg'}, 1371377883: {'path': 'temp/1752064501_3297049_1371377883_93c82765be8071e85e11d765c081457e.jpg', 'extension': 'jpg'}, 1371377887: {'path': 'temp/1752064501_3297049_1371377887_7ca973a77ba7e69cc06f94f11ca9699d.jpg', 'extension': 'jpg'}, 1371377912: {'path': 'temp/1752064501_3297049_1371377912_bb7b0af9b3ee17bc102ad34702173323.jpg', 'extension': 'jpg'}, 1371377920: {'path': 'temp/1752064501_3297049_1371377920_6488b334ba34ca0f03e32bc934c1e2fe.jpg', 'extension': 'jpg'}, 1371377922: {'path': 'temp/1752064501_3297049_1371377922_0cd2f702587b3df91ae72051b20b4c62.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 = 24750998; (('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 ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 24750998 group by h (('14', 18),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24750998 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 (24750998) 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 (24750998) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 09072025 24750998 Nombre de photos uploadées : 18 / 23040 (0%) 09072025 24750998 Nombre de photos taguées (types de déchets): 0 / 18 (0%) 09072025 24750998 Nombre de photos taguées (volume) : 0 / 18 (0%) [{'photo_id': 1371377828, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/9/f36e1f013f2001710299f4c3cc64dff3.jpg', 'username': None, 'uploaded_at': 1752064273, 'text': 'image_09072025_14_30_04_10159.jpg'}, {'photo_id': 1371377825, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/9/afe6c720d8105f9562cc9b7d59a072e6.jpg', 'username': None, 'uploaded_at': 1752064273, 'text': 'image_09072025_14_30_14_10141.jpg'}, {'photo_id': 1371377821, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/9/712cadc95a235a790ae44ed1f579913c.jpg', 'username': None, 'uploaded_at': 1752064273, 'text': 'image_09072025_14_30_24_10133.jpg'}, {'photo_id': 1371377818, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/9/e0f4b7e1039e3ad99a09d936deaf5792.jpg', 'username': None, 'uploaded_at': 1752064273, 'text': 'image_09072025_14_30_34_10132.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.430511474609375e-06 elapsed_time : order_list_meta_photo_and_scores 5.4836273193359375e-06 ?????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0008370876312255859 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 24750998, '2025-07-09' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1963591,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.024123430252075195 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= 1963591 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1963591, 'dashboard_run_id': 1971126, 'mtr_portfolio_id': 24749394, 'dashboard_result_id': 12301782, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0}"}, {'dashboat_entry_day': 1963591, 'dashboard_run_id': 1971126, 'mtr_portfolio_id': 24747504, 'dashboard_result_id': 12301783, '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_P24747504_09-07-2025_13_46_30.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24747561, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24747562, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24747563, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24747564, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24747565, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24747566, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24747567, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24747568, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24747569, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24747570, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24747571, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24747572, 'pht': 3726}}"}, {'dashboat_entry_day': 1963591, 'dashboard_run_id': 1971126, 'mtr_portfolio_id': 24747262, 'dashboard_result_id': 12301784, '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_P24747262_09-07-2025_13_17_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24747265, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24747266, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24747267, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24747268, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24747269, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24747270, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24747271, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24747272, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24747273, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24747274, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24747275, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24747276, 'pht': 3726}}"}, {'dashboat_entry_day': 1963591, 'dashboard_run_id': 1971126, 'mtr_portfolio_id': 24747707, 'dashboard_result_id': 12301785, '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_P24747707_09-07-2025_13_33_29.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24747745, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24747746, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24747747, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24747748, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24747749, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24747750, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24747751, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24747752, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24747753, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24747754, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24747755, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24747756, 'pht': 3726}}"}, {'dashboat_entry_day': 1963591, 'dashboard_run_id': 1971126, 'mtr_portfolio_id': 24748269, 'dashboard_result_id': 12301786, '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_P24748269_09-07-2025_13_47_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 24748304, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24748305, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24748306, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24748307, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24748308, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24748309, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24748310, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24748311, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24748312, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24748313, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24748314, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24748315, 'pht': 3726}}"}, {'dashboat_entry_day': 1963591, 'dashboard_run_id': 1971126, 'mtr_portfolio_id': 24748870, 'dashboard_result_id': 12301787, '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_P24748870_09-07-2025_14_02_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24748885, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24748886, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24748887, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24748888, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24748889, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24748890, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24748891, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24748892, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24748893, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24748894, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24748895, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24748896, 'pht': 3726}}"}, {'dashboat_entry_day': 1963591, 'dashboard_run_id': 1971126, 'mtr_portfolio_id': 24749521, 'dashboard_result_id': 12301788, '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_P24749521_09-07-2025_14_16_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 24749556, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24749557, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24749558, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24749559, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24749560, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24749561, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24749562, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24749563, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24749564, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24749565, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24749566, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24749567, 'pht': 3726}}"}, {'dashboat_entry_day': 1963591, 'dashboard_run_id': 1971126, 'mtr_portfolio_id': 24750323, 'dashboard_result_id': 12301789, '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_P24750323_09-07-2025_14_32_58.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24750330, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24750331, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24750332, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24750333, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24750334, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24750335, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24750336, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24750337, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24750338, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24750339, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24750340, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24750341, 'pht': 3726}}"}, {'dashboat_entry_day': 1963591, 'dashboard_run_id': 1971126, 'mtr_portfolio_id': 24750998, 'dashboard_result_id': 12301791, '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_P24750998_09-07-2025_14_33_32.pdf'}"}] 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 = 24749394 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 = 24749394 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 = 24749394 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 24749394 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 = 24749394 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 = 24749394 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24749394_09-07-2025_14_01_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24749394 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_P24749394_09-07-2025_14_01_00.pdf'}" where mtr_portfolio_id = 24749394 and dashboard_run_id = 1971126 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 = 24747504 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': 3252385, 'mtr_portfolio_id': 24747504, 'created_at': datetime.datetime(2025, 7, 9, 14, 0, 31), 'result': '0.035140833441915834', 'result_long': None, 'result_double': None}] Qualite : 0.035140833441915834 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24747504 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24747504_09-07-2025_14_00_32.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24747504 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_P24747504_09-07-2025_14_00_32.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24747561, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24747562, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24747563, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24747564, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24747565, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24747566, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24747567, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24747568, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24747569, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24747570, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24747571, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24747572, 'pht': 3726}}" where mtr_portfolio_id = 24747504 and dashboard_run_id = 1971126 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`=24747504 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12301783, 0.035140833441915834, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24747504_09-07-2025_14_00_32.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24747561, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24747562, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24747563, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24747564, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24747565, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24747566, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24747567, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24747568, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24747569, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24747570, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24747571, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24747572, '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 = 24747262 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': 3252354, 'mtr_portfolio_id': 24747262, 'created_at': datetime.datetime(2025, 7, 9, 13, 16, 59), 'result': '0.031805652620991554', 'result_long': None, 'result_double': None}] Qualite : 0.031805652620991554 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24747262 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24747262_09-07-2025_13_17_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24747262 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_P24747262_09-07-2025_13_17_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24747265, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24747266, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24747267, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24747268, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24747269, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24747270, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24747271, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24747272, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24747273, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24747274, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24747275, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24747276, 'pht': 3726}}" where mtr_portfolio_id = 24747262 and dashboard_run_id = 1971126 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`=24747262 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12301784, 0.031805652620991554, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24747262_09-07-2025_13_17_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24747265, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24747266, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24747267, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24747268, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24747269, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24747270, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24747271, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24747272, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24747273, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24747274, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24747275, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24747276, '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 = 24747707 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': 3252405, 'mtr_portfolio_id': 24747707, 'created_at': datetime.datetime(2025, 7, 9, 13, 33, 28), 'result': '0.0530137814613162', 'result_long': None, 'result_double': None}] Qualite : 0.0530137814613162 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24747707 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24747707_09-07-2025_13_33_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24747707 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_P24747707_09-07-2025_13_33_29.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24747745, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24747746, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24747747, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24747748, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24747749, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24747750, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24747751, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24747752, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24747753, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24747754, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24747755, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24747756, 'pht': 3726}}" where mtr_portfolio_id = 24747707 and dashboard_run_id = 1971126 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`=24747707 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12301785, 0.0530137814613162, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24747707_09-07-2025_13_33_29.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24747745, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24747746, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24747747, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24747748, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24747749, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24747750, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24747751, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24747752, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24747753, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24747754, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24747755, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24747756, '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 = 24748269 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': 3252484, 'mtr_portfolio_id': 24748269, 'created_at': datetime.datetime(2025, 7, 9, 13, 46, 59), 'result': '0.04382890444493781', 'result_long': None, 'result_double': None}] Qualite : 0.04382890444493781 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24748269 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24748269_09-07-2025_13_47_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24748269 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_P24748269_09-07-2025_13_47_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 24748304, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24748305, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24748306, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24748307, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24748308, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24748309, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24748310, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24748311, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24748312, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24748313, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24748314, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24748315, 'pht': 3726}}" where mtr_portfolio_id = 24748269 and dashboard_run_id = 1971126 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`=24748269 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12301786, 0.04382890444493781, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24748269_09-07-2025_13_47_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 24748304, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24748305, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24748306, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24748307, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24748308, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24748309, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24748310, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24748311, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24748312, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24748313, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24748314, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24748315, '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 = 24748870 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': 3252606, 'mtr_portfolio_id': 24748870, 'created_at': datetime.datetime(2025, 7, 9, 14, 2, 59), 'result': '0.05285976447939329', 'result_long': None, 'result_double': None}] Qualite : 0.05285976447939329 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24748870 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24748870_09-07-2025_14_02_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24748870 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_P24748870_09-07-2025_14_02_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24748885, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24748886, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24748887, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24748888, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24748889, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24748890, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24748891, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24748892, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24748893, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24748894, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24748895, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24748896, 'pht': 3726}}" where mtr_portfolio_id = 24748870 and dashboard_run_id = 1971125 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`=24748870 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12301787, 0.05285976447939329, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24748870_09-07-2025_14_02_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24748885, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24748886, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24748887, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24748888, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24748889, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24748890, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24748891, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24748892, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24748893, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24748894, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24748895, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24748896, '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 = 24749521 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': 3252692, 'mtr_portfolio_id': 24749521, 'created_at': datetime.datetime(2025, 7, 9, 14, 16, 58), 'result': '0.056271137205489145', 'result_long': None, 'result_double': None}] Qualite : 0.056271137205489145 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24749521 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24749521_09-07-2025_14_16_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24749521 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_P24749521_09-07-2025_14_16_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 24749556, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24749557, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24749558, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24749559, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24749560, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24749561, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24749562, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24749563, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24749564, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24749565, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24749566, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24749567, 'pht': 3726}}" where mtr_portfolio_id = 24749521 and dashboard_run_id = 1971125 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`=24749521 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12301788, 0.056271137205489145, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24749521_09-07-2025_14_16_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 24749556, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24749557, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24749558, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24749559, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24749560, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24749561, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24749562, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24749563, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24749564, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24749565, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24749566, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24749567, '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 = 24750323 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': 3252776, 'mtr_portfolio_id': 24750323, 'created_at': datetime.datetime(2025, 7, 9, 14, 32, 58), 'result': '0.022989928392788343', 'result_long': None, 'result_double': None}] Qualite : 0.022989928392788343 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24750323 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24750323_09-07-2025_14_32_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24750323 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_P24750323_09-07-2025_14_32_58.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24750330, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24750331, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24750332, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24750333, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24750334, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24750335, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24750336, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24750337, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24750338, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24750339, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24750340, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24750341, 'pht': 3726}}" where mtr_portfolio_id = 24750323 and dashboard_run_id = 1971125 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`=24750323 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12301789, 0.022989928392788343, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24750323_09-07-2025_14_32_58.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24750330, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24750331, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24750332, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24750333, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24750334, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24750335, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24750336, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24750337, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24750338, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24750339, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24750340, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24750341, '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 = 24750998 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': 3252862, 'mtr_portfolio_id': 24750998, 'created_at': datetime.datetime(2025, 7, 9, 14, 35, 1), 'result': '0.03307171731681799', 'result_long': None, 'result_double': None}] Qualite : 0.03307171731681799 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24750998 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24750998_09-07-2025_14_35_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24750998 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_P24750998_09-07-2025_14_35_01.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24751030, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24751031, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24751032, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24751033, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24751034, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24751035, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24751036, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24751037, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24751038, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24751039, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24751040, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24751041, 'pht': 3726}}" where mtr_portfolio_id = 24750998 and dashboard_run_id = 1971125 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`=24750998 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12301791, 0.03307171731681799, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24750998_09-07-2025_14_35_01.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24751030, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24751031, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24751032, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24751033, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24751034, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24751035, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24751036, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24751037, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24751038, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24751039, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24751040, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24751041, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24749394,24747504,24747262,24747707,24748269,24748870,24749521,24750323,24750998) result : ((1371368493,), (1371368499,), (1371368500,), (1371368521,), (1371368524,), (1371368527,), (1371368547,), (1371368550,), (1371368554,), (1371368564,), (1371368566,), (1371368567,), (1371368578,), (1371368582,), (1371368592,), (1371368594,), (1371368597,), (1371368600,), (1371368615,), (1371368623,), (1371368625,), (1371368628,), (1371368630,), (1371368634,), (1371368654,), (1371368659,), (1371368662,), (1371368664,), (1371368671,), (1371368672,), (1371368684,), (1371368687,), (1371368690,), (1371368709,), (1371368713,), (1371368714,), (1371368726,), (1371368729,), (1371368745,), (1371368753,), (1371368755,), (1371368757,), (1371368770,), (1371368778,), (1371368780,), (1371368783,), (1371368785,), (1371368793,), (1371368819,), (1371368827,), (1371368829,), (1371368830,), (1371368838,), (1371368840,), (1371368885,), (1371368919,), (1371368929,), (1371368937,), (1371368944,), (1371368960,), (1371368961,), (1371368965,), (1371368966,), (1371368975,), (1371368976,), (1371368979,), (1371368980,), (1371368982,), (1371368983,), (1371368984,), (1371368986,), (1371369014,), (1371369023,), (1371369027,), (1371369031,), (1371369036,), (1371369053,), (1371369066,), (1371369074,), (1371369076,), (1371369078,), (1371369086,), (1371369088,), (1371369215,), (1371369250,), (1371369303,), (1371369343,), (1371369376,), (1371369377,), (1371369426,), (1371369468,), (1371369486,), (1371369489,), (1371369511,), (1371369539,), (1371368945,), (1371369106,), (1371369109,), (1371369111,), (1371369113,), (1371369121,), (1371369122,), (1371369689,), (1371369693,), (1371369695,), (1371369704,), (1371369708,), (1371369711,), (1371369873,), (1371369877,), (1371369879,), (1371369891,), (1371369917,), (1371369935,), (1371370089,), (1371370105,), (1371370116,), (1371370117,), (1371370119,), (1371370128,), (1371370299,), (1371370308,), (1371370312,), (1371370314,), (1371370323,), (1371370332,), (1371370483,), (1371370497,), (1371370513,), (1371370516,), (1371370518,), (1371370526,), (1371370775,), (1371370778,), (1371370791,), (1371370796,), (1371370797,), (1371370804,), (1371370959,), (1371370964,), (1371370968,), (1371370986,), (1371370997,), (1371370998,), (1371371179,), (1371371194,), (1371371196,), (1371371198,), (1371371206,), (1371371207,), (1371371332,), (1371371334,), (1371371342,), (1371371344,), (1371371345,), (1371371347,), (1371371534,), (1371371537,), (1371371549,), (1371371567,), (1371371569,), (1371371572,), (1371371698,), (1371371702,), (1371371705,), (1371371714,), (1371371715,), (1371371718,), (1371371833,), (1371371842,), (1371371845,), (1371371848,), (1371371851,), (1371371858,), (1371372003,), (1371372011,), (1371372023,), (1371372027,), (1371372044,), (1371369582,), (1371369623,), (1371369652,), (1371369657,), (1371369666,), (1371369669,), (1371369722,), (1371369725,), (1371369735,), (1371369739,), (1371369743,), (1371369753,), (1371369770,), (1371369772,), (1371369783,), (1371369788,), (1371369790,), (1371369802,), (1371369827,), (1371369839,), (1371369843,), (1371369846,), (1371369854,), (1371369856,), (1371369955,), (1371369958,), (1371369968,), (1371370010,), (1371370038,), (1371370040,), (1371370051,), (1371370053,), (1371370061,), (1371370069,), (1371370073,), (1371370077,), (1371370152,), (1371370161,), (1371370163,), (1371370164,), (1371370172,), (1371370175,), (1371370187,), (1371370192,), (1371370196,), (1371370206,), (1371370210,), (1371370214,), (1371370244,), (1371370252,), (1371370261,), (1371370263,), (1371370267,), (1371370271,), (1371370350,), (1371370354,), (1371370356,), (1371370357,), (1371370375,), (1371370388,), (1371370400,), (1371370403,), (1371370407,), (1371370417,), (1371370430,), (1371370438,), (1371370448,), (1371370450,), (1371370458,), (1371370461,), (1371370465,), (1371370468,), (1371370550,), (1371370568,), (1371370572,), (1371370576,), (1371370587,), (1371370592,), (1371370604,), (1371370606,), (1371370608,), (1371370618,), (1371370620,), (1371370622,), (1371370655,), (1371370657,), (1371370666,), (1371370668,), (1371370673,), (1371370676,), (1371370811,), (1371370821,), (1371370825,), (1371370829,), (1371370847,), (1371370865,), (1371370875,), (1371370877,), (1371370880,), (1371370883,), (1371370900,), (1371370911,), (1371370915,), (1371370925,), (1371370929,), (1371370931,), (1371370939,), (1371370941,), (1371371007,), (1371371008,), (1371371011,), (1371371012,), (1371371020,), (1371371029,), (1371371033,), (1371371042,), (1371371043,), (1371371046,), (1371371047,), (1371371050,), (1371371062,), (1371371070,), (1371371072,), (1371371074,), (1371371077,), (1371371086,), (1371371118,), (1371371128,), (1371371135,), (1371371141,), (1371371150,), (1371371153,), (1371371219,), (1371371223,), (1371371226,), (1371371242,), (1371371245,), (1371371248,), (1371371295,), (1371371298,), (1371371299,), (1371371308,), (1371371312,), (1371371316,), (1371371365,), (1371371368,), (1371371382,), (1371371383,), (1371371384,), (1371371385,), (1371371407,), (1371371410,), (1371371414,), (1371371416,), (1371371426,), (1371371480,), (1371371503,), (1371371506,), (1371371509,), (1371371516,), (1371371517,), (1371371521,), (1371371581,), (1371371585,), (1371371596,), (1371371599,), (1371371601,), (1371371603,), (1371371617,), (1371371625,), (1371371633,), (1371371635,), (1371371636,), (1371371645,), (1371371652,), (1371371664,), (1371371666,), (1371371668,), (1371371676,), (1371371679,), (1371371729,), (1371371730,), (1371371734,), (1371371735,), (1371371750,), (1371371751,), (1371371753,), (1371371754,), (1371371755,), (1371371756,), (1371371763,), (1371371764,), (1371371794,), (1371371797,), (1371371806,), (1371371808,), (1371371810,), (1371371828,), (1371371864,), (1371371873,), (1371371882,), (1371371885,), (1371371895,), (1371371898,), (1371371908,), (1371371910,), (1371371912,), (1371371927,), (1371371939,), (1371371948,), (1371371968,), (1371371971,), (1371371979,), (1371371987,), (1371371990,), (1371371992,), (1371372061,), (1371372074,), (1371372105,), (1371372109,), (1371372113,), (1371372116,), (1371372137,), (1371372139,), (1371372144,), (1371372146,), (1371372156,), (1371372159,), (1371372186,), (1371372188,), (1371372189,), (1371372191,), (1371372199,), (1371372201,), (1371372258,), (1371372266,), (1371372275,), (1371372277,), (1371372281,), (1371372286,), (1371372302,), (1371372309,), (1371372311,), (1371372314,), (1371372321,), (1371372338,), (1371372428,), (1371372441,), (1371372444,), (1371372446,), (1371372454,), (1371372456,), (1371372472,), (1371372476,), (1371372480,), (1371372494,), (1371372497,), (1371372499,), (1371372539,), (1371372542,), (1371372552,), (1371372562,), (1371372567,), (1371372571,), (1371372789,), (1371372837,), (1371372877,), (1371372929,), (1371372963,), (1371372999,), (1371373688,), (1371373762,), (1371373831,), (1371373911,), (1371374020,), (1371374116,), (1371372046,), (1371372228,), (1371372230,), (1371372232,), (1371372242,), (1371372245,), (1371372247,), (1371372349,), (1371372365,), (1371372379,), (1371372381,), (1371372386,), (1371372399,), (1371372588,), (1371372599,), (1371372613,), (1371372624,), (1371372627,), (1371372656,), (1371374878,), (1371374881,), (1371374954,), (1371374957,), (1371375029,), (1371375030,), (1371375097,), (1371375100,), (1371375164,), (1371375166,), (1371375357,), (1371375386,), (1371375393,), (1371375396,), (1371375399,), (1371375410,), (1371375497,), (1371375539,), (1371375574,), (1371375608,), (1371375639,), (1371375643,), (1371375773,), (1371375775,), (1371375781,), (1371375783,), (1371375793,), (1371375795,), (1371375812,), (1371375816,), (1371375824,), (1371375825,), (1371375834,), (1371375839,), (1371375871,), (1371375885,), (1371375907,), (1371375913,), (1371375917,), (1371375948,), (1371375985,), (1371375994,), (1371375997,), (1371375999,), (1371376008,), (1371376012,), (1371376078,), (1371376083,), (1371376088,), (1371376099,), (1371376103,), (1371376108,), (1371376124,), (1371376125,), (1371376133,), (1371376135,), (1371376144,), (1371376147,), (1371376199,), (1371376200,), (1371376202,), (1371376203,), (1371376211,), (1371376212,), (1371376213,), (1371376214,), (1371376216,), (1371376217,), (1371376225,), (1371376226,), (1371376244,), (1371376251,), (1371376253,), (1371376259,), (1371376268,), (1371376309,), (1371376326,), (1371376327,), (1371376328,), (1371376346,), (1371376365,), (1371376368,), (1371376428,), (1371376429,), (1371376433,), (1371376434,), (1371376454,), (1371376455,), (1371376461,), (1371376462,), (1371376466,), (1371376467,), (1371376468,), (1371376470,), (1371376482,), (1371376489,), (1371376491,), (1371376495,), (1371376498,), (1371376508,), (1371376525,), (1371376527,), (1371376529,), (1371376530,), (1371376539,), (1371376542,), (1371376608,), (1371376609,), (1371376614,), (1371376615,), (1371376625,), (1371376626,), (1371376629,), (1371376630,), (1371376634,), (1371376635,), (1371376637,), (1371376639,), (1371376655,), (1371376663,), (1371376664,), (1371376668,), (1371376673,), (1371376687,), (1371376700,), (1371376702,), (1371376703,), (1371376705,), (1371376714,), (1371376717,), (1371376778,), (1371376782,), (1371376789,), (1371376796,), (1371376799,), (1371376804,), (1371376817,), (1371376820,), (1371376830,), (1371376835,), (1371376839,), (1371376846,), (1371376876,), (1371376878,), (1371376880,), (1371376912,), (1371376922,), (1371376942,), (1371377069,), (1371377070,), (1371377075,), (1371377076,), (1371377087,), (1371377088,), (1371377092,), (1371377093,), (1371377095,), (1371377096,), (1371377097,), (1371377098,), (1371377116,), (1371377124,), (1371377128,), (1371377132,), (1371377135,), (1371377146,), (1371377203,), (1371377207,), (1371377211,), (1371377217,), (1371377228,), (1371377238,), (1371377251,), (1371377255,), (1371377259,), (1371377271,), (1371377275,), (1371377283,), (1371377307,), (1371377310,), (1371377318,), (1371377321,), (1371377326,), (1371377335,), (1371377468,), (1371377474,), (1371377504,), (1371377514,), (1371377516,), (1371377542,), (1371377552,), (1371377556,), (1371377561,), (1371377566,), (1371377577,), (1371377581,), (1371377597,), (1371377599,), (1371377600,), (1371377608,), (1371377612,), (1371377617,), (1371377690,), (1371377694,), (1371377698,), (1371377709,), (1371377720,), (1371377724,), (1371377735,), (1371377738,), (1371377745,), (1371377779,), (1371377793,), (1371377796,), (1371377807,), (1371377809,), (1371377818,), (1371377821,), (1371377825,), (1371377828,), (1371377880,), (1371377883,), (1371377887,), (1371377889,), (1371377898,), (1371377902,), (1371377912,), (1371377920,), (1371377922,), (1371377925,), (1371377935,), (1371377938,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'09072025': {'nb_upload': 18, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24750998]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1371377938, 1371377935, 1371377925, 1371377922, 1371377920, 1371377912, 1371377902, 1371377898, 1371377889, 1371377887, 1371377883, 1371377880] map_info['map_portfolio_photo'] : {24750998: [1371377938, 1371377935, 1371377925, 1371377922, 1371377920, 1371377912, 1371377902, 1371377898, 1371377889, 1371377887, 1371377883, 1371377880, 1371377828, 1371377825, 1371377821, 1371377818, 1371377809, 1371377807]} final : True mtd_id 4302 list_pids : [1371377938, 1371377935, 1371377925, 1371377922, 1371377920, 1371377912, 1371377902, 1371377898, 1371377889, 1371377887, 1371377883, 1371377880] Looping around the photos to save general results len do output : 1 /24750998Didn'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, '3252862') ('4302', '24750998', '1371377938', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377935', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377925', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377922', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377920', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377912', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377902', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377898', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377889', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377887', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377883', None, None, None, None, None, '3252862') ('4302', None, None, None, None, None, None, None, '3252862') ('4302', '24750998', '1371377880', None, None, None, None, None, '3252862') 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, '24750998', 'None', None, None, None, None, '3252862'), ('4302', '24750998', '1371377938', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377935', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377925', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377922', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377920', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377912', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377902', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377898', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377889', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377887', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377883', None, None, None, None, None, '3252862'), ('4302', '24750998', '1371377880', None, None, None, None, None, '3252862')] time used for this insertion : 0.014822244644165039 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.6279501914978027 time spend to save output : 0.015053749084472656 total time spend for step 5 : 0.6430039405822754 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 (3252862) 2.10user 2.20system 0:08.97elapsed 48%CPU (0avgtext+0avgdata 161628maxresident)k 144inputs+8536outputs (2major+64233minor)pagefaults 0swaps