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 : 938534 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 (2606021) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2606021) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20735742 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2606021'] with mtr_portfolio_ids : ['20735742'] and first list_photo_ids : [] new path : /proc/938534/ Name: python3 Umask: 0002 State: R (running) Tgid: 938534 Ngid: 0 Pid: 938534 PPid: 938533 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 938534 NSpid: 938534 NSpgid: 935538 NSsid: 935538 VmPeak: 1106936 kB VmSize: 1106936 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98144 kB VmRSS: 98144 kB RssAnon: 59756 kB RssFile: 38388 kB RssShmem: 0 kB VmData: 865684 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: 3/63054 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 68 nonvoluntary_ctxt_switches: 222 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '938534', 'Ngid': '0', 'Pid': '938534', 'PPid': '938533', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '938534', 'NSpid': '938534', 'NSpgid': '935538', 'NSsid': '935538', 'VmPeak': '1106936 kB', 'VmSize': '1106936 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98144 kB', 'VmRSS': '98144 kB', 'RssAnon': '59756 kB', 'RssFile': '38388 kB', 'RssShmem': '0 kB', 'VmData': '865684 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': '3/63054', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '68', 'nonvoluntary_ctxt_switches': '222'} ('datou_batch_current', '938534', '1106936', '0', '1106936', '865684', '98144', b'', 'marlene', '2606021') 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 (20735742) 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 (2606021 ) ) 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 (20735742) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1338926919, 'portfolio_id': 20735742}, {'photo_id': 1338926912, 'portfolio_id': 20735742}, {'photo_id': 1338926901, 'portfolio_id': 20735742}, {'photo_id': 1338926897, 'portfolio_id': 20735742}, {'photo_id': 1338926892, 'portfolio_id': 20735742}, {'photo_id': 1338926878, 'portfolio_id': 20735742}, {'photo_id': 1338926875, 'portfolio_id': 20735742}, {'photo_id': 1338926874, 'portfolio_id': 20735742}, {'photo_id': 1338926873, 'portfolio_id': 20735742}, {'photo_id': 1338926869, 'portfolio_id': 20735742}, {'photo_id': 1338926865, 'portfolio_id': 20735742}, {'photo_id': 1338926834, 'portfolio_id': 20735742}, {'photo_id': 1338926830, 'portfolio_id': 20735742}, {'photo_id': 1338926827, 'portfolio_id': 20735742}, {'photo_id': 1338926787, 'portfolio_id': 20735742}, {'photo_id': 1338926782, 'portfolio_id': 20735742}, {'photo_id': 1338926769, 'portfolio_id': 20735742}, {'photo_id': 1338926765, 'portfolio_id': 20735742}, {'photo_id': 1338926761, 'portfolio_id': 20735742}, {'photo_id': 1338926758, 'portfolio_id': 20735742}, {'photo_id': 1338926752, 'portfolio_id': 20735742}, {'photo_id': 1338926748, 'portfolio_id': 20735742}, {'photo_id': 1338926727, 'portfolio_id': 20735742}, {'photo_id': 1338926723, 'portfolio_id': 20735742}, {'photo_id': 1338926718, 'portfolio_id': 20735742}] map_portfolio_id_photo_id: {20735742: [1338926919, 1338926912, 1338926901, 1338926897, 1338926892, 1338926878, 1338926875, 1338926874, 1338926873, 1338926869, 1338926865, 1338926834, 1338926830, 1338926827, 1338926787, 1338926782, 1338926769, 1338926765, 1338926761, 1338926758, 1338926752, 1338926748, 1338926727, 1338926723, 1338926718]} ##### 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.013959169387817383 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Fri Feb 21 22:56:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20735742) 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 : 20735742 get user id for portfolio 20735742 get sub ptf for main ptf 20735742, type 3726 and hashtags ['cartonnette', 'kraft', 'autre_refus', 'flou', 'papier', 'Teint_Dans_La_Masse', 'metal', 'Carton_brun', 'plastique', 'Carton_gris', 'mal_croppe', 'environnement'] 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`=20735742 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('cartonnette','kraft','autre_refus','flou','papier','Teint_Dans_La_Masse','metal','Carton_brun','plastique','Carton_gris','mal_croppe','environnement')) 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`=20735742 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('cartonnette','kraft','autre_refus','flou','papier','Teint_Dans_La_Masse','metal','Carton_brun','plastique','Carton_gris','mal_croppe','environnement')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 20735742, 'sub_port_id': 20735779, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379943, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 54, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 54, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 53, 27)}, 'metal': {'main_port_id': 20735742, 'sub_port_id': 20735780, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379944, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 54, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 54, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 53, 27)}, 'flou': {'main_port_id': 20735742, 'sub_port_id': 20735781, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379945, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 54, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 54, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 53, 27)}, 'mal_croppe': {'main_port_id': 20735742, 'sub_port_id': 20735782, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379946, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 54, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 54, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 53, 27)}, 'plastique': {'main_port_id': 20735742, 'sub_port_id': 20735783, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379947, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 54, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 54, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 53, 27)}, 'Carton_gris': {'main_port_id': 20735742, 'sub_port_id': 20735784, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379948, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 54, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 54, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 53, 27)}, 'Teint_Dans_La_Masse': {'main_port_id': 20735742, 'sub_port_id': 20735785, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379949, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 54, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 54, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 53, 27)}, 'cartonnette': {'main_port_id': 20735742, 'sub_port_id': 20735786, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379950, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 54, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 54, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 53, 27)}, 'autre_refus': {'main_port_id': 20735742, 'sub_port_id': 20735787, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379951, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 54, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 54, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 53, 27)}, 'kraft': {'main_port_id': 20735742, 'sub_port_id': 20735788, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379952, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 54, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 54, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 53, 27)}, 'Carton_brun': {'main_port_id': 20735742, 'sub_port_id': 20735789, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379953, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 54, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 54, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 53, 27)}, 'environnement': {'main_port_id': 20735742, 'sub_port_id': 20735790, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379954, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 54, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 54, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 53, 27)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20735779 , 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=20735742 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 (20735779) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20735742) result : ((1338926718,), (1338926723,), (1338926727,), (1338926748,), (1338926752,), (1338926758,), (1338926761,), (1338926765,), (1338926769,), (1338926782,), (1338926787,), (1338926827,), (1338926830,), (1338926834,), (1338926865,), (1338926869,), (1338926873,), (1338926874,), (1338926875,), (1338926878,), (1338926892,), (1338926897,), (1338926901,), (1338926912,), (1338926919,)) 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 20735780 , 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=20735742 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 (20735780) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20735742) result : ((1338926718,), (1338926723,), (1338926727,), (1338926748,), (1338926752,), (1338926758,), (1338926761,), (1338926765,), (1338926769,), (1338926782,), (1338926787,), (1338926827,), (1338926830,), (1338926834,), (1338926865,), (1338926869,), (1338926873,), (1338926874,), (1338926875,), (1338926878,), (1338926892,), (1338926897,), (1338926901,), (1338926912,), (1338926919,)) 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 20735781 , 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=20735742 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 (20735781) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20735742) result : ((1338926718,), (1338926723,), (1338926727,), (1338926748,), (1338926752,), (1338926758,), (1338926761,), (1338926765,), (1338926769,), (1338926782,), (1338926787,), (1338926827,), (1338926830,), (1338926834,), (1338926865,), (1338926869,), (1338926873,), (1338926874,), (1338926875,), (1338926878,), (1338926892,), (1338926897,), (1338926901,), (1338926912,), (1338926919,)) 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 20735782 , 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=20735742 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 (20735782) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20735742) result : ((1338926718,), (1338926723,), (1338926727,), (1338926748,), (1338926752,), (1338926758,), (1338926761,), (1338926765,), (1338926769,), (1338926782,), (1338926787,), (1338926827,), (1338926830,), (1338926834,), (1338926865,), (1338926869,), (1338926873,), (1338926874,), (1338926875,), (1338926878,), (1338926892,), (1338926897,), (1338926901,), (1338926912,), (1338926919,)) 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 20735783 , 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=20735742 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 (20735783) result : ((1338926885,), (1338926914,), (1338926915,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20735742) result : ((1338926718,), (1338926723,), (1338926727,), (1338926748,), (1338926752,), (1338926758,), (1338926761,), (1338926765,), (1338926769,), (1338926782,), (1338926787,), (1338926827,), (1338926830,), (1338926834,), (1338926865,), (1338926869,), (1338926873,), (1338926874,), (1338926875,), (1338926878,), (1338926892,), (1338926897,), (1338926901,), (1338926912,), (1338926919,)) 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 20735784 , 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=20735742 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 (20735784) result : ((1338926910,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20735742) result : ((1338926718,), (1338926723,), (1338926727,), (1338926748,), (1338926752,), (1338926758,), (1338926761,), (1338926765,), (1338926769,), (1338926782,), (1338926787,), (1338926827,), (1338926830,), (1338926834,), (1338926865,), (1338926869,), (1338926873,), (1338926874,), (1338926875,), (1338926878,), (1338926892,), (1338926897,), (1338926901,), (1338926912,), (1338926919,)) 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 20735785 , 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=20735742 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 (20735785) result : ((1338926902,), (1338926903,), (1338926904,), (1338926905,), (1338926906,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20735742) result : ((1338926718,), (1338926723,), (1338926727,), (1338926748,), (1338926752,), (1338926758,), (1338926761,), (1338926765,), (1338926769,), (1338926782,), (1338926787,), (1338926827,), (1338926830,), (1338926834,), (1338926865,), (1338926869,), (1338926873,), (1338926874,), (1338926875,), (1338926878,), (1338926892,), (1338926897,), (1338926901,), (1338926912,), (1338926919,)) 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 20735786 , 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=20735742 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 (20735786) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20735742) result : ((1338926718,), (1338926723,), (1338926727,), (1338926748,), (1338926752,), (1338926758,), (1338926761,), (1338926765,), (1338926769,), (1338926782,), (1338926787,), (1338926827,), (1338926830,), (1338926834,), (1338926865,), (1338926869,), (1338926873,), (1338926874,), (1338926875,), (1338926878,), (1338926892,), (1338926897,), (1338926901,), (1338926912,), (1338926919,)) 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 20735787 , 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=20735742 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 (20735787) result : ((1338926908,), (1338926909,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20735742) result : ((1338926718,), (1338926723,), (1338926727,), (1338926748,), (1338926752,), (1338926758,), (1338926761,), (1338926765,), (1338926769,), (1338926782,), (1338926787,), (1338926827,), (1338926830,), (1338926834,), (1338926865,), (1338926869,), (1338926873,), (1338926874,), (1338926875,), (1338926878,), (1338926892,), (1338926897,), (1338926901,), (1338926912,), (1338926919,)) 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 20735788 , 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=20735742 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 (20735788) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20735742) result : ((1338926718,), (1338926723,), (1338926727,), (1338926748,), (1338926752,), (1338926758,), (1338926761,), (1338926765,), (1338926769,), (1338926782,), (1338926787,), (1338926827,), (1338926830,), (1338926834,), (1338926865,), (1338926869,), (1338926873,), (1338926874,), (1338926875,), (1338926878,), (1338926892,), (1338926897,), (1338926901,), (1338926912,), (1338926919,)) 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 20735789 , 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=20735742 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 (20735789) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20735742) result : ((1338926718,), (1338926723,), (1338926727,), (1338926748,), (1338926752,), (1338926758,), (1338926761,), (1338926765,), (1338926769,), (1338926782,), (1338926787,), (1338926827,), (1338926830,), (1338926834,), (1338926865,), (1338926869,), (1338926873,), (1338926874,), (1338926875,), (1338926878,), (1338926892,), (1338926897,), (1338926901,), (1338926912,), (1338926919,)) 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 20735790 , 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=20735742 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 (20735790) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20735742) result : ((1338926718,), (1338926723,), (1338926727,), (1338926748,), (1338926752,), (1338926758,), (1338926761,), (1338926765,), (1338926769,), (1338926782,), (1338926787,), (1338926827,), (1338926830,), (1338926834,), (1338926865,), (1338926869,), (1338926873,), (1338926874,), (1338926875,), (1338926878,), (1338926892,), (1338926897,), (1338926901,), (1338926912,), (1338926919,)) 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`=20735742 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('cartonnette','kraft','autre_refus','flou','papier','Teint_Dans_La_Masse','metal','Carton_brun','plastique','Carton_gris','mal_croppe','environnement')) 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`=20735742 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('cartonnette','kraft','autre_refus','flou','papier','Teint_Dans_La_Masse','metal','Carton_brun','plastique','Carton_gris','mal_croppe','environnement')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 20735742, 'sub_port_id': 20735791, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379955, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 53, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 53, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 53, 29)}, 'metal': {'main_port_id': 20735742, 'sub_port_id': 20735792, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379956, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 53, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 53, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 53, 29)}, 'flou': {'main_port_id': 20735742, 'sub_port_id': 20735793, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379957, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 53, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 53, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 53, 29)}, 'mal_croppe': {'main_port_id': 20735742, 'sub_port_id': 20735794, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379958, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 53, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 53, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 53, 29)}, 'plastique': {'main_port_id': 20735742, 'sub_port_id': 20735795, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379959, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 53, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 53, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 53, 29)}, 'Carton_gris': {'main_port_id': 20735742, 'sub_port_id': 20735796, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379960, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 53, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 53, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 53, 29)}, 'Teint_Dans_La_Masse': {'main_port_id': 20735742, 'sub_port_id': 20735797, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379961, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 53, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 53, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 53, 29)}, 'cartonnette': {'main_port_id': 20735742, 'sub_port_id': 20735798, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379962, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 53, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 53, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 53, 29)}, 'autre_refus': {'main_port_id': 20735742, 'sub_port_id': 20735799, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379963, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 53, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 53, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 53, 29)}, 'kraft': {'main_port_id': 20735742, 'sub_port_id': 20735800, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379964, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 53, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 53, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 53, 29)}, 'Carton_brun': {'main_port_id': 20735742, 'sub_port_id': 20735801, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379965, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 53, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 53, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 53, 29)}, 'environnement': {'main_port_id': 20735742, 'sub_port_id': 20735802, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379966, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 54, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 54, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 53, 29)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20735791,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20735779 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20735792,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20735780 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20735793,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20735781 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20735794,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20735782 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20735795,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20735783 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20735796,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20735784 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20735797,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20735785 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20735798,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20735786 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20735799,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20735787 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20735800,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20735788 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20735801,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20735789 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20735802,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20735790 lien utilise dans velours : https://www.fotonower.com/velours/20735791,20735792,20735793,20735794,20735795,20735796,20735797,20735798,20735799,20735800,20735801,20735802?tags=papier,metal,flou,mal_croppe,plastique,Carton_gris,Teint_Dans_La_Masse,cartonnette,autre_refus,kraft,Carton_brun,environnement After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20735742]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1338926919, 1338926912, 1338926901, 1338926897, 1338926892, 1338926878, 1338926875, 1338926874, 1338926873, 1338926869, 1338926865] map_info['map_portfolio_photo'] : {20735742: [1338926919, 1338926912, 1338926901, 1338926897, 1338926892, 1338926878, 1338926875, 1338926874, 1338926873, 1338926869, 1338926865, 1338926834, 1338926830, 1338926827, 1338926787, 1338926782, 1338926769, 1338926765, 1338926761, 1338926758, 1338926752, 1338926748, 1338926727, 1338926723, 1338926718]} final : False mtd_id 4302 list_pids : [1338926919, 1338926912, 1338926901, 1338926897, 1338926892, 1338926878, 1338926875, 1338926874, 1338926873, 1338926869, 1338926865] Looping around the photos to save general results len do output : 1 /20735742. 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, '2606021') ('4302', '20735742', '1338926919', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926912', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926901', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926897', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926892', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926878', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926875', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926874', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926873', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926869', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926865', None, None, None, None, None, '2606021') 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', None, '20735742', "{'papier': 20735779, 'metal': 20735780, 'flou': 20735781, 'mal_croppe': 20735782, 'plastique': 20735783, 'Carton_gris': 20735784, 'Teint_Dans_La_Masse': 20735785, 'cartonnette': 20735786, 'autre_refus': 20735787, 'kraft': 20735788, 'Carton_brun': 20735789, 'environnement': 20735790}", None, None, None, None, '2606021'), ('4302', '20735742', '1338926919', None, None, None, None, None, '2606021'), ('4302', '20735742', '1338926912', None, None, None, None, None, '2606021'), ('4302', '20735742', '1338926901', None, None, None, None, None, '2606021'), ('4302', '20735742', '1338926897', None, None, None, None, None, '2606021'), ('4302', '20735742', '1338926892', None, None, None, None, None, '2606021'), ('4302', '20735742', '1338926878', None, None, None, None, None, '2606021'), ('4302', '20735742', '1338926875', None, None, None, None, None, '2606021'), ('4302', '20735742', '1338926874', None, None, None, None, None, '2606021'), ('4302', '20735742', '1338926873', None, None, None, None, None, '2606021'), ('4302', '20735742', '1338926869', None, None, None, None, None, '2606021'), ('4302', '20735742', '1338926865', None, None, None, None, None, '2606021')] time used for this insertion : 0.017716646194458008 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.4218392372131348 time spend to save output : 0.01807880401611328 total time spend for step 1 : 1.439918041229248 step2:final Fri Feb 21 22:56:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20735742) 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 20735742 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1338926727,1338926723,1338926718,1338926769,1338926765,1338926761,1338926758,1338926752,1338926748,1338926787,1338926782,1338926834,1338926830,1338926827,1338926878,1338926875,1338926874,1338926873,1338926869,1338926865,1338926919,1338926912,1338926901,1338926897,1338926892); 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([20735742]) Inside saveOutput : final : False verbose : True original output for save of step final : {1338926919: ('0.042717348862902293',), 1338926912: ('0.042717348862902293',), 1338926901: ('0.042717348862902293',), 1338926897: ('0.042717348862902293',), 1338926892: ('0.042717348862902293',), 1338926878: ('0.042717348862902293',), 1338926875: ('0.042717348862902293',), 1338926874: ('0.042717348862902293',), 1338926873: ('0.042717348862902293',), 1338926869: ('0.042717348862902293',), 1338926865: ('0.042717348862902293',)} new output for save of step final : {1338926919: ('0.042717348862902293',), 1338926912: ('0.042717348862902293',), 1338926901: ('0.042717348862902293',), 1338926897: ('0.042717348862902293',), 1338926892: ('0.042717348862902293',), 1338926878: ('0.042717348862902293',), 1338926875: ('0.042717348862902293',), 1338926874: ('0.042717348862902293',), 1338926873: ('0.042717348862902293',), 1338926869: ('0.042717348862902293',), 1338926865: ('0.042717348862902293',)} [1338926919, 1338926912, 1338926901, 1338926897, 1338926892, 1338926878, 1338926875, 1338926874, 1338926873, 1338926869, 1338926865] map_info['map_portfolio_photo'] : {20735742: [1338926919, 1338926912, 1338926901, 1338926897, 1338926892, 1338926878, 1338926875, 1338926874, 1338926873, 1338926869, 1338926865, 1338926834, 1338926830, 1338926827, 1338926787, 1338926782, 1338926769, 1338926765, 1338926761, 1338926758, 1338926752, 1338926748, 1338926727, 1338926723, 1338926718]} final : False mtd_id 4302 list_pids : [1338926919, 1338926912, 1338926901, 1338926897, 1338926892, 1338926878, 1338926875, 1338926874, 1338926873, 1338926869, 1338926865] Looping around the photos to save general results len do output : 11 /1338926919.Didn't retrieve data . /1338926912.Didn't retrieve data . /1338926901.Didn't retrieve data . /1338926897.Didn't retrieve data . /1338926892.Didn't retrieve data . /1338926878.Didn't retrieve data . /1338926875.Didn't retrieve data . /1338926874.Didn't retrieve data . /1338926873.Didn't retrieve data . /1338926869.Didn't retrieve data . /1338926865.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, '2606021') ('4302', '20735742', '1338926919', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926912', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926901', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926897', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926892', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926878', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926875', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926874', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926873', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926869', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926865', None, None, None, None, None, '2606021') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 33 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', '20735742', '1338926919', '0.042717348862902293', None, None, None, None, '2606021'), ('4302', '20735742', '1338926912', '0.042717348862902293', None, None, None, None, '2606021'), ('4302', '20735742', '1338926901', '0.042717348862902293', None, None, None, None, '2606021'), ('4302', '20735742', '1338926897', '0.042717348862902293', None, None, None, None, '2606021'), ('4302', '20735742', '1338926892', '0.042717348862902293', None, None, None, None, '2606021'), ('4302', '20735742', '1338926878', '0.042717348862902293', None, None, None, None, '2606021'), ('4302', '20735742', '1338926875', '0.042717348862902293', None, None, None, None, '2606021'), ('4302', '20735742', '1338926874', '0.042717348862902293', None, None, None, None, '2606021'), ('4302', '20735742', '1338926873', '0.042717348862902293', None, None, None, None, '2606021'), ('4302', '20735742', '1338926869', '0.042717348862902293', None, None, None, None, '2606021'), ('4302', '20735742', '1338926865', '0.042717348862902293', None, None, None, None, '2606021')] time used for this insertion : 0.013440132141113281 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06343770027160645 time spend to save output : 0.014069080352783203 total time spend for step 2 : 0.07750678062438965 step3:velours_tree Fri Feb 21 22:56:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {20735742: [{'papier': 20735779, 'metal': 20735780, 'flou': 20735781, 'mal_croppe': 20735782, 'plastique': 20735783, 'Carton_gris': 20735784, 'Teint_Dans_La_Masse': 20735785, 'cartonnette': 20735786, 'autre_refus': 20735787, 'kraft': 20735788, 'Carton_brun': 20735789, 'environnement': 20735790}]} input_args_next_step : {20735742: ()} output_args : {20735742: [{'papier': 20735779, 'metal': 20735780, 'flou': 20735781, 'mal_croppe': 20735782, 'plastique': 20735783, 'Carton_gris': 20735784, 'Teint_Dans_La_Masse': 20735785, 'cartonnette': 20735786, 'autre_refus': 20735787, 'kraft': 20735788, 'Carton_brun': 20735789, 'environnement': 20735790}]} args : 20735742 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'papier': 20735779, 'metal': 20735780, 'flou': 20735781, 'mal_croppe': 20735782, 'plastique': 20735783, 'Carton_gris': 20735784, 'Teint_Dans_La_Masse': 20735785, 'cartonnette': 20735786, 'autre_refus': 20735787, 'kraft': 20735788, 'Carton_brun': 20735789, 'environnement': 20735790},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20735742) 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([20735742]) 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.39490342140197754 time spend to save output : 8.034706115722656e-05 total time spend for step 3 : 0.39498376846313477 step4:send_mail_cod Fri Feb 21 22:56:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1338926919: ('0.042717348862902293',), 1338926912: ('0.042717348862902293',), 1338926901: ('0.042717348862902293',), 1338926897: ('0.042717348862902293',), 1338926892: ('0.042717348862902293',), 1338926878: ('0.042717348862902293',), 1338926875: ('0.042717348862902293',), 1338926874: ('0.042717348862902293',), 1338926873: ('0.042717348862902293',), 1338926869: ('0.042717348862902293',), 1338926865: ('0.042717348862902293',)} input_args_next_step : {1338926919: ()} output_args : {1338926919: ('0.042717348862902293',), 1338926912: ('0.042717348862902293',), 1338926901: ('0.042717348862902293',), 1338926897: ('0.042717348862902293',), 1338926892: ('0.042717348862902293',), 1338926878: ('0.042717348862902293',), 1338926875: ('0.042717348862902293',), 1338926874: ('0.042717348862902293',), 1338926873: ('0.042717348862902293',), 1338926869: ('0.042717348862902293',), 1338926865: ('0.042717348862902293',)} args : 1338926919 depend.output_id : 0 input_args_next_step : {1338926919: ('0.042717348862902293',), 1338926912: ()} output_args : {1338926919: ('0.042717348862902293',), 1338926912: ('0.042717348862902293',), 1338926901: ('0.042717348862902293',), 1338926897: ('0.042717348862902293',), 1338926892: ('0.042717348862902293',), 1338926878: ('0.042717348862902293',), 1338926875: ('0.042717348862902293',), 1338926874: ('0.042717348862902293',), 1338926873: ('0.042717348862902293',), 1338926869: ('0.042717348862902293',), 1338926865: ('0.042717348862902293',)} args : 1338926912 depend.output_id : 0 input_args_next_step : {1338926919: ('0.042717348862902293',), 1338926912: ('0.042717348862902293',), 1338926901: ()} output_args : {1338926919: ('0.042717348862902293',), 1338926912: ('0.042717348862902293',), 1338926901: ('0.042717348862902293',), 1338926897: ('0.042717348862902293',), 1338926892: ('0.042717348862902293',), 1338926878: ('0.042717348862902293',), 1338926875: ('0.042717348862902293',), 1338926874: ('0.042717348862902293',), 1338926873: ('0.042717348862902293',), 1338926869: ('0.042717348862902293',), 1338926865: ('0.042717348862902293',)} args : 1338926901 depend.output_id : 0 input_args_next_step : {1338926919: ('0.042717348862902293',), 1338926912: ('0.042717348862902293',), 1338926901: ('0.042717348862902293',), 1338926897: ()} output_args : {1338926919: ('0.042717348862902293',), 1338926912: ('0.042717348862902293',), 1338926901: ('0.042717348862902293',), 1338926897: ('0.042717348862902293',), 1338926892: ('0.042717348862902293',), 1338926878: ('0.042717348862902293',), 1338926875: ('0.042717348862902293',), 1338926874: ('0.042717348862902293',), 1338926873: ('0.042717348862902293',), 1338926869: ('0.042717348862902293',), 1338926865: ('0.042717348862902293',)} args : 1338926897 depend.output_id : 0 input_args_next_step : {1338926919: ('0.042717348862902293',), 1338926912: ('0.042717348862902293',), 1338926901: ('0.042717348862902293',), 1338926897: ('0.042717348862902293',), 1338926892: ()} output_args : {1338926919: ('0.042717348862902293',), 1338926912: ('0.042717348862902293',), 1338926901: ('0.042717348862902293',), 1338926897: ('0.042717348862902293',), 1338926892: ('0.042717348862902293',), 1338926878: ('0.042717348862902293',), 1338926875: ('0.042717348862902293',), 1338926874: ('0.042717348862902293',), 1338926873: ('0.042717348862902293',), 1338926869: ('0.042717348862902293',), 1338926865: ('0.042717348862902293',)} args : 1338926892 depend.output_id : 0 input_args_next_step : {1338926919: ('0.042717348862902293',), 1338926912: ('0.042717348862902293',), 1338926901: ('0.042717348862902293',), 1338926897: ('0.042717348862902293',), 1338926892: ('0.042717348862902293',), 1338926878: ()} output_args : {1338926919: ('0.042717348862902293',), 1338926912: ('0.042717348862902293',), 1338926901: ('0.042717348862902293',), 1338926897: ('0.042717348862902293',), 1338926892: ('0.042717348862902293',), 1338926878: ('0.042717348862902293',), 1338926875: ('0.042717348862902293',), 1338926874: ('0.042717348862902293',), 1338926873: ('0.042717348862902293',), 1338926869: ('0.042717348862902293',), 1338926865: ('0.042717348862902293',)} args : 1338926878 depend.output_id : 0 input_args_next_step : {1338926919: ('0.042717348862902293',), 1338926912: ('0.042717348862902293',), 1338926901: ('0.042717348862902293',), 1338926897: ('0.042717348862902293',), 1338926892: ('0.042717348862902293',), 1338926878: ('0.042717348862902293',), 1338926875: ()} output_args : {1338926919: ('0.042717348862902293',), 1338926912: ('0.042717348862902293',), 1338926901: ('0.042717348862902293',), 1338926897: ('0.042717348862902293',), 1338926892: ('0.042717348862902293',), 1338926878: ('0.042717348862902293',), 1338926875: ('0.042717348862902293',), 1338926874: ('0.042717348862902293',), 1338926873: ('0.042717348862902293',), 1338926869: ('0.042717348862902293',), 1338926865: ('0.042717348862902293',)} args : 1338926875 depend.output_id : 0 input_args_next_step : {1338926919: ('0.042717348862902293',), 1338926912: ('0.042717348862902293',), 1338926901: ('0.042717348862902293',), 1338926897: ('0.042717348862902293',), 1338926892: ('0.042717348862902293',), 1338926878: ('0.042717348862902293',), 1338926875: ('0.042717348862902293',), 1338926874: ()} output_args : {1338926919: ('0.042717348862902293',), 1338926912: ('0.042717348862902293',), 1338926901: ('0.042717348862902293',), 1338926897: ('0.042717348862902293',), 1338926892: ('0.042717348862902293',), 1338926878: ('0.042717348862902293',), 1338926875: ('0.042717348862902293',), 1338926874: ('0.042717348862902293',), 1338926873: ('0.042717348862902293',), 1338926869: ('0.042717348862902293',), 1338926865: ('0.042717348862902293',)} args : 1338926874 depend.output_id : 0 input_args_next_step : {1338926919: ('0.042717348862902293',), 1338926912: ('0.042717348862902293',), 1338926901: ('0.042717348862902293',), 1338926897: ('0.042717348862902293',), 1338926892: ('0.042717348862902293',), 1338926878: ('0.042717348862902293',), 1338926875: ('0.042717348862902293',), 1338926874: ('0.042717348862902293',), 1338926873: ()} output_args : {1338926919: ('0.042717348862902293',), 1338926912: ('0.042717348862902293',), 1338926901: ('0.042717348862902293',), 1338926897: ('0.042717348862902293',), 1338926892: ('0.042717348862902293',), 1338926878: ('0.042717348862902293',), 1338926875: ('0.042717348862902293',), 1338926874: ('0.042717348862902293',), 1338926873: ('0.042717348862902293',), 1338926869: ('0.042717348862902293',), 1338926865: ('0.042717348862902293',)} args : 1338926873 depend.output_id : 0 input_args_next_step : {1338926919: ('0.042717348862902293',), 1338926912: ('0.042717348862902293',), 1338926901: ('0.042717348862902293',), 1338926897: ('0.042717348862902293',), 1338926892: ('0.042717348862902293',), 1338926878: ('0.042717348862902293',), 1338926875: ('0.042717348862902293',), 1338926874: ('0.042717348862902293',), 1338926873: ('0.042717348862902293',), 1338926869: ()} output_args : {1338926919: ('0.042717348862902293',), 1338926912: ('0.042717348862902293',), 1338926901: ('0.042717348862902293',), 1338926897: ('0.042717348862902293',), 1338926892: ('0.042717348862902293',), 1338926878: ('0.042717348862902293',), 1338926875: ('0.042717348862902293',), 1338926874: ('0.042717348862902293',), 1338926873: ('0.042717348862902293',), 1338926869: ('0.042717348862902293',), 1338926865: ('0.042717348862902293',)} args : 1338926869 depend.output_id : 0 input_args_next_step : {1338926919: ('0.042717348862902293',), 1338926912: ('0.042717348862902293',), 1338926901: ('0.042717348862902293',), 1338926897: ('0.042717348862902293',), 1338926892: ('0.042717348862902293',), 1338926878: ('0.042717348862902293',), 1338926875: ('0.042717348862902293',), 1338926874: ('0.042717348862902293',), 1338926873: ('0.042717348862902293',), 1338926869: ('0.042717348862902293',), 1338926865: ()} output_args : {1338926919: ('0.042717348862902293',), 1338926912: ('0.042717348862902293',), 1338926901: ('0.042717348862902293',), 1338926897: ('0.042717348862902293',), 1338926892: ('0.042717348862902293',), 1338926878: ('0.042717348862902293',), 1338926875: ('0.042717348862902293',), 1338926874: ('0.042717348862902293',), 1338926873: ('0.042717348862902293',), 1338926869: ('0.042717348862902293',), 1338926865: ('0.042717348862902293',)} args : 1338926865 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 : {20735742: [{'papier': 20735779, 'metal': 20735780, 'flou': 20735781, 'mal_croppe': 20735782, 'plastique': 20735783, 'Carton_gris': 20735784, 'Teint_Dans_La_Masse': 20735785, 'cartonnette': 20735786, 'autre_refus': 20735787, 'kraft': 20735788, 'Carton_brun': 20735789, 'environnement': 20735790}]} input_args_next_step : {1338926919: ('0.042717348862902293',), 1338926912: ('0.042717348862902293',), 1338926901: ('0.042717348862902293',), 1338926897: ('0.042717348862902293',), 1338926892: ('0.042717348862902293',), 1338926878: ('0.042717348862902293',), 1338926875: ('0.042717348862902293',), 1338926874: ('0.042717348862902293',), 1338926873: ('0.042717348862902293',), 1338926869: ('0.042717348862902293',), 1338926865: ('0.042717348862902293',), 20735742: ()} output_args : {20735742: [{'papier': 20735779, 'metal': 20735780, 'flou': 20735781, 'mal_croppe': 20735782, 'plastique': 20735783, 'Carton_gris': 20735784, 'Teint_Dans_La_Masse': 20735785, 'cartonnette': 20735786, 'autre_refus': 20735787, 'kraft': 20735788, 'Carton_brun': 20735789, 'environnement': 20735790}]} args : 20735742 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 :12, first value : ('0.042717348862902293',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20735742) 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 (1338926919,1338926912,1338926901,1338926897,1338926892,1338926878,1338926875,1338926874,1338926873,1338926869,1338926865) Found this number of photos: 11 ##### Call download_photos : nb_thread : 5 begin to download photo : 1338926865 begin to download photo : 1338926874 begin to download photo : 1338926892 begin to download photo : 1338926912 download finish for photo 1338926912 begin to download photo : 1338926919 download finish for photo 1338926865 begin to download photo : 1338926869 download finish for photo 1338926874 begin to download photo : 1338926875 download finish for photo 1338926892 begin to download photo : 1338926897 download finish for photo 1338926875 begin to download photo : 1338926878 download finish for photo 1338926897 begin to download photo : 1338926901 download finish for photo 1338926869 begin to download photo : 1338926873 download finish for photo 1338926919 download finish for photo 1338926878 download finish for photo 1338926901 download finish for photo 1338926873 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette207357801740175019/ imagette207357811740175019/ imagette207357821740175019/ length of list_filenames : 11 ; length of list_pids : 11 ; length of list_args : 11 results_Auto_P20735742_21-02-2025_22_56_59.pdf 20735780 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=20735780 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette207357801740175019 20735781 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=20735781 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette207357811740175019 20735782 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=20735782 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette207357821740175019 20735783 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=20735783 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1338926885: '1740174852_1146812_1338926769_510de6947feb27734e9c63caeded282a_rle_crop_3682709119_0.png', 1338926914: '1740174872_1147091_1338926761_88af241afd46bf2b770f7192613148a6_rle_crop_3682709587_0.png', 1338926915: '1740174872_1147091_1338926758_4bdf0e5ddcad993a709b9aa02135b10a_rle_crop_3682709629_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/abed6b74e892c09dcc1fa630d5d7992f_84448664.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/66d172886e3aefacd3cc4acdc7bb20db_86043171.png change filename to text .imagette207357831740175019/ imagette207357831740175019/1740174872_1147091_1338926758_4bdf0e5ddcad993a709b9aa02135b10a_rle_crop_3682709629_0.png.png imagette207357831740175019/1740174852_1146812_1338926769_510de6947feb27734e9c63caeded282a_rle_crop_3682709119_0.png.png imagette207357831740175019/1740174872_1147091_1338926761_88af241afd46bf2b770f7192613148a6_rle_crop_3682709587_0.png.png imagette207357861740175019/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/81dd038ca52831eaf022c6d1e72300b7_87857393.png imagette207357831740175019 20735786 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=20735786 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette207357861740175019 20735787 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=20735787 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1338926908: '1740174872_1147091_1338926765_b13a897691dd8624b12e696a66e97374_rle_crop_3682709552_0.png', 1338926909: '1740174872_1147091_1338926758_4bdf0e5ddcad993a709b9aa02135b10a_rle_crop_3682709616_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/5661f26a921fba99d994b44c2365fec9_96823095.png change filename to text .imagette207357871740175019/ imagette207357871740175019/1740174872_1147091_1338926765_b13a897691dd8624b12e696a66e97374_rle_crop_3682709552_0.png.png imagette207357871740175019/1740174872_1147091_1338926758_4bdf0e5ddcad993a709b9aa02135b10a_rle_crop_3682709616_0.png.png imagette207357881740175019/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/0c506bf8c666ab05f14c79127f6f9fb0_64836264.png imagette207357871740175019 20735788 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=20735788 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette207357881740175019 20735784 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=20735784 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1338926910: '1740174872_1147091_1338926758_4bdf0e5ddcad993a709b9aa02135b10a_rle_crop_3682709623_0.png'} change filename to text .imagette207357841740175019/ imagette207357841740175019/1740174872_1147091_1338926758_4bdf0e5ddcad993a709b9aa02135b10a_rle_crop_3682709623_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/3f7514a8b0c5a863a4162865aca6419d_67156117.png imagette207357841740175019 20735785 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=20735785 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1338926902: '1740174872_1147091_1338926761_88af241afd46bf2b770f7192613148a6_rle_crop_3682709591_0.png', 1338926903: '1740174872_1147091_1338926761_88af241afd46bf2b770f7192613148a6_rle_crop_3682709585_0.png', 1338926904: '1740174872_1147091_1338926758_4bdf0e5ddcad993a709b9aa02135b10a_rle_crop_3682709626_0.png', 1338926905: '1740174872_1147091_1338926748_c0c798f237f234ecfe46df08e2bf4b6c_rle_crop_3682709657_0.png', 1338926906: '1740174872_1147091_1338926748_c0c798f237f234ecfe46df08e2bf4b6c_rle_crop_3682709655_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/e69c8a240f5564c3272489135c9bcba2_57272917.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/f7d4fa452fd2471f1ad41d5fb136d06f_64012039.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/f60ec3041f0247315fdc1c06c56229ad_5870041.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/f280058cff32bda5dc2427b083892999_98684510.png change filename to text .imagette207357851740175019/ imagette207357851740175019/1740174872_1147091_1338926748_c0c798f237f234ecfe46df08e2bf4b6c_rle_crop_3682709655_0.png.png imagette207357851740175019/1740174872_1147091_1338926748_c0c798f237f234ecfe46df08e2bf4b6c_rle_crop_3682709657_0.png.png imagette207357851740175019/1740174872_1147091_1338926758_4bdf0e5ddcad993a709b9aa02135b10a_rle_crop_3682709626_0.png.png imagette207357851740175019/1740174872_1147091_1338926761_88af241afd46bf2b770f7192613148a6_rle_crop_3682709585_0.png.png imagette207357851740175019/1740174872_1147091_1338926761_88af241afd46bf2b770f7192613148a6_rle_crop_3682709591_0.png.png imagette207357891740175020/ wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/ee83ecd00f0e6f806aeafbe138f729a2_12040666.png imagette207357851740175019 20735789 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=20735789 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette207357891740175020 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=20735742 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/20735791,20735792,20735793,20735794,20735795,20735796,20735797,20735798,20735799,20735800,20735801,20735802?tags=papier,metal,flou,mal_croppe,plastique,Carton_gris,Teint_Dans_La_Masse,cartonnette,autre_refus,kraft,Carton_brun,environnement your option no_mail is active, we will not send the real mail to your client args[1338926919] : ('0.042717348862902293',) no score found for photo 1338926919 We are sending mail with results at report@fotonower.com args[1338926912] : ('0.042717348862902293',) no score found for photo 1338926912 We are sending mail with results at report@fotonower.com args[1338926901] : ('0.042717348862902293',) no score found for photo 1338926901 We are sending mail with results at report@fotonower.com args[1338926897] : ('0.042717348862902293',) no score found for photo 1338926897 We are sending mail with results at report@fotonower.com args[1338926892] : ('0.042717348862902293',) no score found for photo 1338926892 We are sending mail with results at report@fotonower.com args[1338926878] : ('0.042717348862902293',) no score found for photo 1338926878 We are sending mail with results at report@fotonower.com args[1338926875] : ('0.042717348862902293',) no score found for photo 1338926875 We are sending mail with results at report@fotonower.com args[1338926874] : ('0.042717348862902293',) no score found for photo 1338926874 We are sending mail with results at report@fotonower.com args[1338926873] : ('0.042717348862902293',) no score found for photo 1338926873 We are sending mail with results at report@fotonower.com args[1338926869] : ('0.042717348862902293',) no score found for photo 1338926869 We are sending mail with results at report@fotonower.com args[1338926865] : ('0.042717348862902293',) no score found for photo 1338926865 We are sending mail with results at report@fotonower.com refus_total : 0.042717348862902293 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=20735742 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_P20735742_21-02-2025_22_56_59.pdf results_Auto_P20735742_21-02-2025_22_56_59.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20735742_21-02-2025_22_56_59.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','20735742','results_Auto_P20735742_21-02-2025_22_56_59.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20735742_21-02-2025_22_56_59.pdf','pdf','','0.15','0.042717348862902293') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20735742]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1338926919, 1338926912, 1338926901, 1338926897, 1338926892, 1338926878, 1338926875, 1338926874, 1338926873, 1338926869, 1338926865] map_info['map_portfolio_photo'] : {20735742: [1338926919, 1338926912, 1338926901, 1338926897, 1338926892, 1338926878, 1338926875, 1338926874, 1338926873, 1338926869, 1338926865, 1338926834, 1338926830, 1338926827, 1338926787, 1338926782, 1338926769, 1338926765, 1338926761, 1338926758, 1338926752, 1338926748, 1338926727, 1338926723, 1338926718]} final : False mtd_id 4302 list_pids : [1338926919, 1338926912, 1338926901, 1338926897, 1338926892, 1338926878, 1338926875, 1338926874, 1338926873, 1338926869, 1338926865] 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, '2606021') ('4302', '20735742', '1338926919', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926912', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926901', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926897', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926892', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926878', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926875', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926874', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926873', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926869', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926865', None, None, None, None, None, '2606021') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '20735742', '1338926919', None, None, None, None, None, '2606021'), ('4302', '20735742', '1338926912', None, None, None, None, None, '2606021'), ('4302', '20735742', '1338926901', None, None, None, None, None, '2606021'), ('4302', '20735742', '1338926897', None, None, None, None, None, '2606021'), ('4302', '20735742', '1338926892', None, None, None, None, None, '2606021'), ('4302', '20735742', '1338926878', None, None, None, None, None, '2606021'), ('4302', '20735742', '1338926875', None, None, None, None, None, '2606021'), ('4302', '20735742', '1338926874', None, None, None, None, None, '2606021'), ('4302', '20735742', '1338926873', None, None, None, None, None, '2606021'), ('4302', '20735742', '1338926869', None, None, None, None, None, '2606021'), ('4302', '20735742', '1338926865', None, None, None, None, None, '2606021')] time used for this insertion : 0.013628005981445312 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.3514201641082764 time spend to save output : 0.013940095901489258 total time spend for step 4 : 2.3653602600097656 step5:split_time_score Fri Feb 21 22:57: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 : ['20735742'] 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 : [('20735742',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20735742) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1338926912: {'path': 'temp/1740175019_938534_1338926912_a6085789aca39c617af4b1e75622263f.jpg', 'extension': 'jpg'}, 1338926919: {'path': 'temp/1740175019_938534_1338926919_170bf7dd67976587c5716a993ee832ff.jpg', 'extension': 'jpg'}, 1338926874: {'path': 'temp/1740175019_938534_1338926874_49dd9a3c8ff1640a59c5bb1b7102642f.jpg', 'extension': 'jpg'}, 1338926875: {'path': 'temp/1740175019_938534_1338926875_16fb1e339f611bc28545e597183e6c51.jpg', 'extension': 'jpg'}, 1338926878: {'path': 'temp/1740175019_938534_1338926878_00bbe9b971b4ece35cef00b6a3da7d9d.jpg', 'extension': 'jpg'}, 1338926892: {'path': 'temp/1740175019_938534_1338926892_02b1daef41d900d2c6ad08354cc07601.jpg', 'extension': 'jpg'}, 1338926897: {'path': 'temp/1740175019_938534_1338926897_3f48aaae534b55d76b20b73cd328768d.jpg', 'extension': 'jpg'}, 1338926901: {'path': 'temp/1740175019_938534_1338926901_4bd61f41752790a7a6e9ee0460793427.jpg', 'extension': 'jpg'}, 1338926865: {'path': 'temp/1740175019_938534_1338926865_b5c70c0a940dbc58830dcc65c644fe2e.jpg', 'extension': 'jpg'}, 1338926869: {'path': 'temp/1740175019_938534_1338926869_a085786a5cafb064ea6aaefffd57277a.jpg', 'extension': 'jpg'}, 1338926873: {'path': 'temp/1740175019_938534_1338926873_61c95bc75865a26364dfdb5c6e389812.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 = 20735742; (('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 = 20735742 group by h (('22', 25),) 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=20735742 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 (20735742) 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 (20735742) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 21022025 20735742 Nombre de photos uploadées : 25 / 23040 (0%) 21022025 20735742 Nombre de photos taguées (types de déchets): 0 / 25 (0%) 21022025 20735742 Nombre de photos taguées (volume) : 0 / 25 (0%) [{'photo_id': 1338926727, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/07c7ccf7bfb54b49d13476296604cafb.jpg', 'username': None, 'uploaded_at': 1740174624, 'text': 'image_21022025_22_49_04_10148.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1338926723, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/c1ba0d7dadef532248a5bc9a2858aac3.jpg', 'username': None, 'uploaded_at': 1740174624, 'text': 'image_21022025_22_49_14_10135.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1338926718, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/2c1518e019822921a2488f26880260c7.jpg', 'username': None, 'uploaded_at': 1740174624, 'text': 'image_21022025_22_49_43_9124.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1338926769, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/510de6947feb27734e9c63caeded282a.jpg', 'username': None, 'uploaded_at': 1740174684, 'text': 'image_21022025_22_49_53_10133.jpg 4e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 4.0531158447265625e-06 elapsed_time : order_list_meta_photo_and_scores 8.821487426757812e-06 ????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.00122833251953125 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 20735742, '2025-02-21' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1615145,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.021729707717895508 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= 1615145 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1615145, 'dashboard_run_id': 1625733, 'mtr_portfolio_id': 20733786, 'dashboard_result_id': 9014567, '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_P20733786_21-02-2025_22_19_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20733815, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20733816, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20733817, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20733818, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20733819, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20733820, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20733821, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20733822, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20733823, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20733824, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20733825, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20733826, 'pht': 3726}}"}, {'dashboat_entry_day': 1615145, 'dashboard_run_id': 1625733, 'mtr_portfolio_id': 20734349, 'dashboard_result_id': 9014568, '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_P20734349_21-02-2025_22_32_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20734357, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20734358, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20734359, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20734360, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20734361, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20734362, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20734363, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20734364, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20734365, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20734366, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20734367, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20734368, 'pht': 3726}}"}, {'dashboat_entry_day': 1615145, 'dashboard_run_id': 1625733, 'mtr_portfolio_id': 20734877, 'dashboard_result_id': 9014569, '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_P20734877_21-02-2025_22_53_01.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 20734886, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20734887, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20734888, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20734889, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20734890, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20734891, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20734892, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20734893, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20734894, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20734895, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20734896, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20734897, 'pht': 3726}}"}, {'dashboat_entry_day': 1615145, 'dashboard_run_id': 1625733, 'mtr_portfolio_id': 20735742, 'dashboard_result_id': 9014570, '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_P20735742_21-02-2025_22_55_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 20735779, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20735780, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20735781, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20735782, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20735783, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20735784, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20735785, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20735786, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20735787, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20735788, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20735789, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20735790, 'pht': 3726}}"}] SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 20733786 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': 2605833, 'mtr_portfolio_id': 20733786, 'created_at': datetime.datetime(2025, 2, 21, 22, 18, 59), 'result': '0.034780689882658374', 'result_long': None, 'result_double': None}] Qualite : 0.034780689882658374 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20733786 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20733786_21-02-2025_22_19_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20733786 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_P20733786_21-02-2025_22_19_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20733815, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20733816, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20733817, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20733818, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20733819, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20733820, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20733821, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20733822, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20733823, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20733824, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20733825, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20733826, 'pht': 3726}}" where mtr_portfolio_id = 20733786 and dashboard_run_id = 1625733 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`=20733786 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9014567, 0.034780689882658374, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20733786_21-02-2025_22_19_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20733815, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20733816, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20733817, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20733818, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20733819, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20733820, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20733821, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20733822, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20733823, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20733824, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20733825, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20733826, '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 = 20734349 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': 2605881, 'mtr_portfolio_id': 20734349, 'created_at': datetime.datetime(2025, 2, 21, 22, 32, 57), 'result': '0.04521464188811201', 'result_long': None, 'result_double': None}] Qualite : 0.04521464188811201 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20734349 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20734349_21-02-2025_22_32_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20734349 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_P20734349_21-02-2025_22_32_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20734357, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20734358, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20734359, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20734360, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20734361, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20734362, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20734363, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20734364, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20734365, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20734366, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20734367, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20734368, 'pht': 3726}}" where mtr_portfolio_id = 20734349 and dashboard_run_id = 1625733 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`=20734349 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9014568, 0.04521464188811201, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20734349_21-02-2025_22_32_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20734357, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20734358, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20734359, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20734360, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20734361, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20734362, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20734363, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20734364, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20734365, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20734366, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20734367, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20734368, '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 = 20734877 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': 2605952, 'mtr_portfolio_id': 20734877, 'created_at': datetime.datetime(2025, 2, 21, 22, 53), 'result': '0.03908951369506188', 'result_long': None, 'result_double': None}] Qualite : 0.03908951369506188 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20734877 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20734877_21-02-2025_22_53_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20734877 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_P20734877_21-02-2025_22_53_01.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 20734886, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20734887, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20734888, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20734889, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20734890, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20734891, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20734892, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20734893, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20734894, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20734895, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20734896, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20734897, 'pht': 3726}}" where mtr_portfolio_id = 20734877 and dashboard_run_id = 1625733 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`=20734877 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9014569, 0.03908951369506188, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20734877_21-02-2025_22_53_01.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 20734886, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20734887, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20734888, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20734889, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20734890, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20734891, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20734892, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20734893, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20734894, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20734895, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20734896, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20734897, '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 = 20735742 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': 2606021, 'mtr_portfolio_id': 20735742, 'created_at': datetime.datetime(2025, 2, 21, 22, 56, 58), 'result': '0.042717348862902293', 'result_long': None, 'result_double': None}] Qualite : 0.042717348862902293 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20735742 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20735742_21-02-2025_22_56_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20735742 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_P20735742_21-02-2025_22_56_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 20735779, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20735780, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20735781, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20735782, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20735783, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20735784, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20735785, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20735786, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20735787, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20735788, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20735789, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20735790, 'pht': 3726}}" where mtr_portfolio_id = 20735742 and dashboard_run_id = 1625733 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`=20735742 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9014570, 0.042717348862902293, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20735742_21-02-2025_22_56_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 20735779, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20735780, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20735781, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20735782, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20735783, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20735784, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20735785, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20735786, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20735787, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20735788, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20735789, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20735790, '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 (20733786,20734349,20734877,20735742) result : ((1338920453,), (1338920464,), (1338920476,), (1338920481,), (1338920501,), (1338920503,), (1338920505,), (1338920507,), (1338920509,), (1338920819,), (1338920873,), (1338920877,), (1338920895,), (1338920919,), (1338920953,), (1338920956,), (1338920959,), (1338920960,), (1338921014,), (1338921015,), (1338921017,), (1338921024,), (1338921086,), (1338921092,), (1338921094,), (1338921111,), (1338921113,), (1338921116,), (1338921214,), (1338921218,), (1338921219,), (1338921266,), (1338921273,), (1338921276,), (1338921280,), (1338921297,), (1338921377,), (1338921444,), (1338921464,), (1338921479,), (1338921482,), (1338921485,), (1338921513,), (1338921517,), (1338921521,), (1338921524,), (1338921547,), (1338921550,), (1338921554,), (1338921558,), (1338921562,), (1338921585,), (1338921591,), (1338921597,), (1338921599,), (1338921602,), (1338921604,), (1338921621,), (1338921624,), (1338921629,), (1338921631,), (1338921717,), (1338921720,), (1338921723,), (1338921725,), (1338921816,), (1338921819,), (1338921831,), (1338921835,), (1338921838,), (1338921839,), (1338921867,), (1338921858,), (1338921859,), (1338921863,), (1338922001,), (1338922003,), (1338922006,), (1338922008,), (1338922064,), (1338922067,), (1338922071,), (1338922079,), (1338922082,), (1338922100,), (1338922155,), (1338922167,), (1338922169,), (1338922187,), (1338922191,), (1338922194,), (1338922198,), (1338922202,), (1338922219,), (1338922226,), (1338922230,), (1338922235,), (1338922242,), (1338922262,), (1338922264,), (1338922267,), (1338922271,), (1338922279,), (1338922343,), (1338922345,), (1338922442,), (1338922444,), (1338922446,), (1338922449,), (1338922452,), (1338922473,), (1338922475,), (1338922478,), (1338922481,), (1338922486,), (1338922488,), (1338922513,), (1338922519,), (1338922544,), (1338922550,), (1338922557,), (1338922654,), (1338922659,), (1338922662,), (1338922664,), (1338922697,), (1338922699,), (1338922700,), (1338922738,), (1338922747,), (1338922751,), (1338922756,), (1338922759,), (1338922763,), (1338922784,), (1338922792,), (1338922794,), (1338922857,), (1338922828,), (1338922830,), (1338922842,), (1338922846,), (1338922852,), (1338922888,), (1338922895,), (1338922906,), (1338922911,), (1338922988,), (1338922991,), (1338923018,), (1338923025,), (1338923028,), (1338923030,), (1338923051,), (1338923055,), (1338923059,), (1338923095,), (1338923365,), (1338923657,), (1338923912,), (1338924210,), (1338924335,), (1338924361,), (1338924369,), (1338924373,), (1338925309,), (1338925424,), (1338925486,), (1338925495,), (1338925497,), (1338925610,), (1338925616,), (1338925770,), (1338925860,), (1338926119,), (1338926123,), (1338926233,), (1338926236,), (1338926243,), (1338926299,), (1338926313,), (1338926317,), (1338926320,), (1338926328,), (1338926346,), (1338926368,), (1338926377,), (1338926381,), (1338926382,), (1338926383,), (1338926413,), (1338926416,), (1338926452,), (1338926458,), (1338926731,), (1338926718,), (1338926723,), (1338926727,), (1338926748,), (1338926752,), (1338926758,), (1338926761,), (1338926765,), (1338926769,), (1338926782,), (1338926787,), (1338926827,), (1338926830,), (1338926834,), (1338926865,), (1338926869,), (1338926873,), (1338926874,), (1338926875,), (1338926878,), (1338926892,), (1338926897,), (1338926901,), (1338926912,), (1338926919,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'21022025': {'nb_upload': 25, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20735742]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1338926919, 1338926912, 1338926901, 1338926897, 1338926892, 1338926878, 1338926875, 1338926874, 1338926873, 1338926869, 1338926865] map_info['map_portfolio_photo'] : {20735742: [1338926919, 1338926912, 1338926901, 1338926897, 1338926892, 1338926878, 1338926875, 1338926874, 1338926873, 1338926869, 1338926865, 1338926834, 1338926830, 1338926827, 1338926787, 1338926782, 1338926769, 1338926765, 1338926761, 1338926758, 1338926752, 1338926748, 1338926727, 1338926723, 1338926718]} final : True mtd_id 4302 list_pids : [1338926919, 1338926912, 1338926901, 1338926897, 1338926892, 1338926878, 1338926875, 1338926874, 1338926873, 1338926869, 1338926865] Looping around the photos to save general results len do output : 1 /20735742Didn'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, '2606021') ('4302', '20735742', '1338926919', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926912', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926901', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926897', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926892', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926878', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926875', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926874', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926873', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926869', None, None, None, None, None, '2606021') ('4302', None, None, None, None, None, None, None, '2606021') ('4302', '20735742', '1338926865', None, None, None, None, None, '2606021') 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', None, '20735742', 'None', None, None, None, None, '2606021'), ('4302', '20735742', '1338926919', None, None, None, None, None, '2606021'), ('4302', '20735742', '1338926912', None, None, None, None, None, '2606021'), ('4302', '20735742', '1338926901', None, None, None, None, None, '2606021'), ('4302', '20735742', '1338926897', None, None, None, None, None, '2606021'), ('4302', '20735742', '1338926892', None, None, None, None, None, '2606021'), ('4302', '20735742', '1338926878', None, None, None, None, None, '2606021'), ('4302', '20735742', '1338926875', None, None, None, None, None, '2606021'), ('4302', '20735742', '1338926874', None, None, None, None, None, '2606021'), ('4302', '20735742', '1338926873', None, None, None, None, None, '2606021'), ('4302', '20735742', '1338926869', None, None, None, None, None, '2606021'), ('4302', '20735742', '1338926865', None, None, None, None, None, '2606021')] time used for this insertion : 0.013781070709228516 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.3356611728668213 time spend to save output : 0.014016151428222656 total time spend for step 5 : 0.34967732429504395 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 (2606021) 2.44user 2.17system 0:06.48elapsed 71%CPU (0avgtext+0avgdata 158856maxresident)k 5824inputs+9168outputs (79major+74746minor)pagefaults 0swaps