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 : 2673236 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 (2764814) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2764814) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22456621 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2764814'] with mtr_portfolio_ids : ['22456621'] and first list_photo_ids : [] new path : /proc/2673236/ Name: python3 Umask: 0002 State: R (running) Tgid: 2673236 Ngid: 0 Pid: 2673236 PPid: 2673235 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 2673236 NSpid: 2673236 NSpgid: 2670059 NSsid: 2670059 VmPeak: 1107232 kB VmSize: 1107232 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98808 kB VmRSS: 98808 kB RssAnon: 60188 kB RssFile: 38620 kB RssShmem: 0 kB VmData: 865980 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 616 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63054 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 52 nonvoluntary_ctxt_switches: 120 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '2673236', 'Ngid': '0', 'Pid': '2673236', 'PPid': '2673235', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '2673236', 'NSpid': '2673236', 'NSpgid': '2670059', 'NSsid': '2670059', 'VmPeak': '1107232 kB', 'VmSize': '1107232 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98808 kB', 'VmRSS': '98808 kB', 'RssAnon': '60188 kB', 'RssFile': '38620 kB', 'RssShmem': '0 kB', 'VmData': '865980 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '616 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63054', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '52', 'nonvoluntary_ctxt_switches': '120'} ('datou_batch_current', '2673236', '1107232', '0', '1107232', '865980', '98808', b'', 'marlene', '2764814') 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 (22456621) 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 (2764814 ) ) 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 (22456621) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1353945013, 'portfolio_id': 22456621}, {'photo_id': 1353945011, 'portfolio_id': 22456621}, {'photo_id': 1353944648, 'portfolio_id': 22456621}, {'photo_id': 1353944603, 'portfolio_id': 22456621}, {'photo_id': 1353944602, 'portfolio_id': 22456621}, {'photo_id': 1353944106, 'portfolio_id': 22456621}, {'photo_id': 1353944102, 'portfolio_id': 22456621}, {'photo_id': 1353943949, 'portfolio_id': 22456621}, {'photo_id': 1353943914, 'portfolio_id': 22456621}, {'photo_id': 1353943883, 'portfolio_id': 22456621}, {'photo_id': 1353943746, 'portfolio_id': 22456621}, {'photo_id': 1353943741, 'portfolio_id': 22456621}, {'photo_id': 1353943737, 'portfolio_id': 22456621}, {'photo_id': 1353943735, 'portfolio_id': 22456621}] map_portfolio_id_photo_id: {22456621: [1353945013, 1353945011, 1353944648, 1353944603, 1353944602, 1353944106, 1353944102, 1353943949, 1353943914, 1353943883, 1353943746, 1353943741, 1353943737, 1353943735]} ##### 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.01433873176574707 #### 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 Mon Apr 28 16:14: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 After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22456621) 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 : 22456621 get user id for portfolio 22456621 get sub ptf for main ptf 22456621, type 3726 and hashtags ['Carton_brun', 'mal_croppe', 'papier', 'Carton_gris', 'Teint_Dans_La_Masse', 'flou', 'plastique', 'environnement', 'kraft', 'cartonnette', 'metal', 'autre_refus'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=22456621 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','mal_croppe','papier','Carton_gris','Teint_Dans_La_Masse','flou','plastique','environnement','kraft','cartonnette','metal','autre_refus')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=22456621 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','mal_croppe','papier','Carton_gris','Teint_Dans_La_Masse','flou','plastique','environnement','kraft','cartonnette','metal','autre_refus')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_gris': {'main_port_id': 22456621, 'sub_port_id': 22456626, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14900363, 'last_updated_at': datetime.datetime(2025, 4, 28, 16, 9, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 16, 9, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 16, 4, 59)}, 'environnement': {'main_port_id': 22456621, 'sub_port_id': 22456627, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14900364, 'last_updated_at': datetime.datetime(2025, 4, 28, 16, 9, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 16, 9, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 16, 4, 59)}, 'kraft': {'main_port_id': 22456621, 'sub_port_id': 22456628, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14900365, 'last_updated_at': datetime.datetime(2025, 4, 28, 16, 9, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 16, 9, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 16, 4, 59)}, 'mal_croppe': {'main_port_id': 22456621, 'sub_port_id': 22456629, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14900366, 'last_updated_at': datetime.datetime(2025, 4, 28, 16, 9, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 16, 9, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 16, 4, 59)}, 'Teint_Dans_La_Masse': {'main_port_id': 22456621, 'sub_port_id': 22456630, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14900367, 'last_updated_at': datetime.datetime(2025, 4, 28, 16, 9, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 16, 9, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 16, 4, 59)}, 'metal': {'main_port_id': 22456621, 'sub_port_id': 22456631, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14900368, 'last_updated_at': datetime.datetime(2025, 4, 28, 16, 9, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 16, 9, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 16, 4, 59)}, 'plastique': {'main_port_id': 22456621, 'sub_port_id': 22456632, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14900369, 'last_updated_at': datetime.datetime(2025, 4, 28, 16, 9, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 16, 9, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 16, 4, 59)}, 'flou': {'main_port_id': 22456621, 'sub_port_id': 22456633, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14900370, 'last_updated_at': datetime.datetime(2025, 4, 28, 16, 9, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 16, 9, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 16, 4, 59)}, 'papier': {'main_port_id': 22456621, 'sub_port_id': 22456634, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14900371, 'last_updated_at': datetime.datetime(2025, 4, 28, 16, 9, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 16, 9, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 16, 4, 59)}, 'Carton_brun': {'main_port_id': 22456621, 'sub_port_id': 22456635, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14900372, 'last_updated_at': datetime.datetime(2025, 4, 28, 16, 9, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 16, 9, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 16, 4, 59)}, 'autre_refus': {'main_port_id': 22456621, 'sub_port_id': 22456636, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14900373, 'last_updated_at': datetime.datetime(2025, 4, 28, 16, 9, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 16, 9, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 16, 4, 59)}, 'cartonnette': {'main_port_id': 22456621, 'sub_port_id': 22456637, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14900374, 'last_updated_at': datetime.datetime(2025, 4, 28, 16, 9, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 16, 9, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 16, 4, 59)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22456626 , 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=22456621 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 (22456626) result : ((1353944636,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22456621) result : ((1353943735,), (1353943737,), (1353943741,), (1353943746,), (1353943883,), (1353943914,), (1353943949,), (1353944102,), (1353944106,), (1353944602,), (1353944603,), (1353944648,), (1353945011,), (1353945013,)) 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 22456627 , 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=22456621 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 (22456627) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22456621) result : ((1353943735,), (1353943737,), (1353943741,), (1353943746,), (1353943883,), (1353943914,), (1353943949,), (1353944102,), (1353944106,), (1353944602,), (1353944603,), (1353944648,), (1353945011,), (1353945013,)) 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 22456628 , 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=22456621 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 (22456628) result : ((1353944570,), (1353944571,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22456621) result : ((1353943735,), (1353943737,), (1353943741,), (1353943746,), (1353943883,), (1353943914,), (1353943949,), (1353944102,), (1353944106,), (1353944602,), (1353944603,), (1353944648,), (1353945011,), (1353945013,)) 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 22456629 , 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=22456621 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 (22456629) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22456621) result : ((1353943735,), (1353943737,), (1353943741,), (1353943746,), (1353943883,), (1353943914,), (1353943949,), (1353944102,), (1353944106,), (1353944602,), (1353944603,), (1353944648,), (1353945011,), (1353945013,)) 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 22456630 , 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=22456621 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 (22456630) result : ((1353944564,), (1353944565,), (1353944566,), (1353944632,), (1353944633,), (1353944634,), (1353944635,), (1353944807,), (1353944808,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22456621) result : ((1353943735,), (1353943737,), (1353943741,), (1353943746,), (1353943883,), (1353943914,), (1353943949,), (1353944102,), (1353944106,), (1353944602,), (1353944603,), (1353944648,), (1353945011,), (1353945013,)) 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 22456631 , 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=22456621 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 (22456631) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22456621) result : ((1353943735,), (1353943737,), (1353943741,), (1353943746,), (1353943883,), (1353943914,), (1353943949,), (1353944102,), (1353944106,), (1353944602,), (1353944603,), (1353944648,), (1353945011,), (1353945013,)) 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 22456632 , 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=22456621 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 (22456632) result : ((1353944638,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22456621) result : ((1353943735,), (1353943737,), (1353943741,), (1353943746,), (1353943883,), (1353943914,), (1353943949,), (1353944102,), (1353944106,), (1353944602,), (1353944603,), (1353944648,), (1353945011,), (1353945013,)) 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 22456633 , 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=22456621 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 (22456633) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22456621) result : ((1353943735,), (1353943737,), (1353943741,), (1353943746,), (1353943883,), (1353943914,), (1353943949,), (1353944102,), (1353944106,), (1353944602,), (1353944603,), (1353944648,), (1353945011,), (1353945013,)) 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 22456634 , 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=22456621 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 (22456634) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22456621) result : ((1353943735,), (1353943737,), (1353943741,), (1353943746,), (1353943883,), (1353943914,), (1353943949,), (1353944102,), (1353944106,), (1353944602,), (1353944603,), (1353944648,), (1353945011,), (1353945013,)) 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 22456635 , 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=22456621 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 (22456635) result : ((1353944568,), (1353944810,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22456621) result : ((1353943735,), (1353943737,), (1353943741,), (1353943746,), (1353943883,), (1353943914,), (1353943949,), (1353944102,), (1353944106,), (1353944602,), (1353944603,), (1353944648,), (1353945011,), (1353945013,)) 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 22456636 , 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=22456621 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 (22456636) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22456621) result : ((1353943735,), (1353943737,), (1353943741,), (1353943746,), (1353943883,), (1353943914,), (1353943949,), (1353944102,), (1353944106,), (1353944602,), (1353944603,), (1353944648,), (1353945011,), (1353945013,)) 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 22456637 , 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=22456621 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 (22456637) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22456621) result : ((1353943735,), (1353943737,), (1353943741,), (1353943746,), (1353943883,), (1353943914,), (1353943949,), (1353944102,), (1353944106,), (1353944602,), (1353944603,), (1353944648,), (1353945011,), (1353945013,)) 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`=22456621 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','mal_croppe','papier','Carton_gris','Teint_Dans_La_Masse','flou','plastique','environnement','kraft','cartonnette','metal','autre_refus')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=22456621 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','mal_croppe','papier','Carton_gris','Teint_Dans_La_Masse','flou','plastique','environnement','kraft','cartonnette','metal','autre_refus')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_gris': {'main_port_id': 22456621, 'sub_port_id': 22456638, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14900375, 'last_updated_at': datetime.datetime(2025, 4, 28, 16, 5, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 16, 5, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 16, 5, 1)}, 'environnement': {'main_port_id': 22456621, 'sub_port_id': 22456639, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14900376, 'last_updated_at': datetime.datetime(2025, 4, 28, 16, 5, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 16, 5, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 16, 5, 1)}, 'kraft': {'main_port_id': 22456621, 'sub_port_id': 22456640, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14900377, 'last_updated_at': datetime.datetime(2025, 4, 28, 16, 5, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 16, 5, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 16, 5, 1)}, 'mal_croppe': {'main_port_id': 22456621, 'sub_port_id': 22456641, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14900378, 'last_updated_at': datetime.datetime(2025, 4, 28, 16, 5, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 16, 5, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 16, 5, 1)}, 'Teint_Dans_La_Masse': {'main_port_id': 22456621, 'sub_port_id': 22456642, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14900379, 'last_updated_at': datetime.datetime(2025, 4, 28, 16, 5, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 16, 5, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 16, 5, 1)}, 'metal': {'main_port_id': 22456621, 'sub_port_id': 22456643, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14900380, 'last_updated_at': datetime.datetime(2025, 4, 28, 16, 5, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 16, 5, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 16, 5, 1)}, 'plastique': {'main_port_id': 22456621, 'sub_port_id': 22456644, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14900381, 'last_updated_at': datetime.datetime(2025, 4, 28, 16, 5, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 16, 5, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 16, 5, 1)}, 'flou': {'main_port_id': 22456621, 'sub_port_id': 22456645, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14900382, 'last_updated_at': datetime.datetime(2025, 4, 28, 16, 5, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 16, 5, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 16, 5, 1)}, 'papier': {'main_port_id': 22456621, 'sub_port_id': 22456646, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14900383, 'last_updated_at': datetime.datetime(2025, 4, 28, 16, 5, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 16, 5, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 16, 5, 1)}, 'Carton_brun': {'main_port_id': 22456621, 'sub_port_id': 22456647, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14900384, 'last_updated_at': datetime.datetime(2025, 4, 28, 16, 5, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 16, 5, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 16, 5, 1)}, 'autre_refus': {'main_port_id': 22456621, 'sub_port_id': 22456648, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14900385, 'last_updated_at': datetime.datetime(2025, 4, 28, 16, 5, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 16, 5, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 16, 5, 1)}, 'cartonnette': {'main_port_id': 22456621, 'sub_port_id': 22456649, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14900386, 'last_updated_at': datetime.datetime(2025, 4, 28, 16, 9, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 16, 9, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 16, 5, 1)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22456638,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22456626 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22456639,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22456627 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22456640,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22456628 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22456641,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22456629 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22456642,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22456630 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22456643,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22456631 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22456644,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22456632 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22456645,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22456633 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22456646,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22456634 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22456647,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22456635 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22456648,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22456636 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22456649,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22456637 lien utilise dans velours : https://www.fotonower.com/velours/22456638,22456639,22456640,22456641,22456642,22456643,22456644,22456645,22456646,22456647,22456648,22456649?tags=Carton_gris,environnement,kraft,mal_croppe,Teint_Dans_La_Masse,metal,plastique,flou,papier,Carton_brun,autre_refus,cartonnette After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22456621]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1353945013, 1353945011] map_info['map_portfolio_photo'] : {22456621: [1353945013, 1353945011, 1353944648, 1353944603, 1353944602, 1353944106, 1353944102, 1353943949, 1353943914, 1353943883, 1353943746, 1353943741, 1353943737, 1353943735]} final : False mtd_id 4302 list_pids : [1353945013, 1353945011] Looping around the photos to save general results len do output : 1 /22456621. 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, '2764814') ('4302', '22456621', '1353945013', None, None, None, None, None, '2764814') ('4302', None, None, None, None, None, None, None, '2764814') ('4302', '22456621', '1353945011', None, None, None, None, None, '2764814') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 3 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, '22456621', "{'Carton_gris': 22456626, 'environnement': 22456627, 'kraft': 22456628, 'mal_croppe': 22456629, 'Teint_Dans_La_Masse': 22456630, 'metal': 22456631, 'plastique': 22456632, 'flou': 22456633, 'papier': 22456634, 'Carton_brun': 22456635, 'autre_refus': 22456636, 'cartonnette': 22456637}", None, None, None, None, '2764814'), ('4302', '22456621', '1353945013', None, None, None, None, None, '2764814'), ('4302', '22456621', '1353945011', None, None, None, None, None, '2764814')] time used for this insertion : 0.013368844985961914 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.4813647270202637 time spend to save output : 0.013689994812011719 total time spend for step 1 : 1.4950547218322754 step2:final Mon Apr 28 16:15:00 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 (22456621) 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 22456621 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1353943746,1353943741,1353943737,1353943735,1353943949,1353943914,1353943883,1353944106,1353944102,1353944648,1353944602,1353944603,1353945013,1353945011); 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([22456621]) Inside saveOutput : final : False verbose : True original output for save of step final : {1353945013: ('0.02753564893748372',), 1353945011: ('0.02753564893748372',)} new output for save of step final : {1353945013: ('0.02753564893748372',), 1353945011: ('0.02753564893748372',)} [1353945013, 1353945011] map_info['map_portfolio_photo'] : {22456621: [1353945013, 1353945011, 1353944648, 1353944603, 1353944602, 1353944106, 1353944102, 1353943949, 1353943914, 1353943883, 1353943746, 1353943741, 1353943737, 1353943735]} final : False mtd_id 4302 list_pids : [1353945013, 1353945011] Looping around the photos to save general results len do output : 2 /1353945013.Didn't retrieve data . /1353945011.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, '2764814') ('4302', '22456621', '1353945013', None, None, None, None, None, '2764814') ('4302', None, None, None, None, None, None, None, '2764814') ('4302', '22456621', '1353945011', None, None, None, None, None, '2764814') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 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', '22456621', '1353945013', '0.02753564893748372', None, None, None, None, '2764814'), ('4302', '22456621', '1353945011', '0.02753564893748372', None, None, None, None, '2764814')] time used for this insertion : 0.012623786926269531 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06629633903503418 time spend to save output : 0.013020992279052734 total time spend for step 2 : 0.07931733131408691 step3:velours_tree Mon Apr 28 16:15:00 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 : {22456621: [{'Carton_gris': 22456626, 'environnement': 22456627, 'kraft': 22456628, 'mal_croppe': 22456629, 'Teint_Dans_La_Masse': 22456630, 'metal': 22456631, 'plastique': 22456632, 'flou': 22456633, 'papier': 22456634, 'Carton_brun': 22456635, 'autre_refus': 22456636, 'cartonnette': 22456637}]} input_args_next_step : {22456621: ()} output_args : {22456621: [{'Carton_gris': 22456626, 'environnement': 22456627, 'kraft': 22456628, 'mal_croppe': 22456629, 'Teint_Dans_La_Masse': 22456630, 'metal': 22456631, 'plastique': 22456632, 'flou': 22456633, 'papier': 22456634, 'Carton_brun': 22456635, 'autre_refus': 22456636, 'cartonnette': 22456637}]} args : 22456621 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 : ({'Carton_gris': 22456626, 'environnement': 22456627, 'kraft': 22456628, 'mal_croppe': 22456629, 'Teint_Dans_La_Masse': 22456630, 'metal': 22456631, 'plastique': 22456632, 'flou': 22456633, 'papier': 22456634, 'Carton_brun': 22456635, 'autre_refus': 22456636, 'cartonnette': 22456637},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22456621) 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([22456621]) 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.585726261138916 time spend to save output : 0.00018143653869628906 total time spend for step 3 : 0.5859076976776123 step4:send_mail_cod Mon Apr 28 16:15:00 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 : {1353945013: ('0.02753564893748372',), 1353945011: ('0.02753564893748372',)} input_args_next_step : {1353945013: ()} output_args : {1353945013: ('0.02753564893748372',), 1353945011: ('0.02753564893748372',)} args : 1353945013 depend.output_id : 0 input_args_next_step : {1353945013: ('0.02753564893748372',), 1353945011: ()} output_args : {1353945013: ('0.02753564893748372',), 1353945011: ('0.02753564893748372',)} args : 1353945011 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 : {22456621: [{'Carton_gris': 22456626, 'environnement': 22456627, 'kraft': 22456628, 'mal_croppe': 22456629, 'Teint_Dans_La_Masse': 22456630, 'metal': 22456631, 'plastique': 22456632, 'flou': 22456633, 'papier': 22456634, 'Carton_brun': 22456635, 'autre_refus': 22456636, 'cartonnette': 22456637}]} input_args_next_step : {1353945013: ('0.02753564893748372',), 1353945011: ('0.02753564893748372',), 22456621: ()} output_args : {22456621: [{'Carton_gris': 22456626, 'environnement': 22456627, 'kraft': 22456628, 'mal_croppe': 22456629, 'Teint_Dans_La_Masse': 22456630, 'metal': 22456631, 'plastique': 22456632, 'flou': 22456633, 'papier': 22456634, 'Carton_brun': 22456635, 'autre_refus': 22456636, 'cartonnette': 22456637}]} args : 22456621 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 :3, first value : ('0.02753564893748372',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22456621) 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 (1353945013,1353945011) Found this number of photos: 2 ##### Call download_photos : nb_thread : 5 begin to download photo : 1353945011 begin to download photo : 1353945013 download finish for photo 1353945013 download finish for photo 1353945011 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos length of list_filenames : 2 ; length of list_pids : 2 ; length of list_args : 2 results_Auto_P22456621_28-04-2025_16_15_00.pdf 22456628 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=22456628 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1353944570: '1745849143_2792879_1353943914_3d325aec0509f2d613f4ef352d994128_rle_crop_3771135433_0.png', 1353944571: '1745849143_2792879_1353943883_88f43e5d8f58b44b8a2b6746f1edeb8e_rle_crop_3771135470_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/2fed3ae64e92bf9bdedfe6b13eb85c71_60317588.png change filename to text .imagette224566281745849700/ imagette224566281745849700/1745849143_2792879_1353943914_3d325aec0509f2d613f4ef352d994128_rle_crop_3771135433_0.png.png imagette224566281745849700/1745849143_2792879_1353943883_88f43e5d8f58b44b8a2b6746f1edeb8e_rle_crop_3771135470_0.png.png imagette224566291745849700/ imagette224566311745849700/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/e0d426461ee179a79bedce9ba19a9998_31210256.png imagette224566281745849700 22456629 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=22456629 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette224566291745849700 22456631 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=22456631 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette224566311745849700 22456632 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=22456632 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1353944638: '1745849173_3386566_1353943735_fff6949f6acebb96190f3bce4c189494_rle_crop_3771135798_0.png'} change filename to text .imagette224566321745849701/ imagette224566321745849701/1745849173_3386566_1353943735_fff6949f6acebb96190f3bce4c189494_rle_crop_3771135798_0.png.png imagette224566331745849701/ imagette224566361745849701/ imagette224566371745849701/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/5279457851df6708656818f3f3b8f20d_11695569.png imagette224566321745849701 22456633 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=22456633 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette224566331745849701 22456636 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=22456636 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette224566361745849701 22456637 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=22456637 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette224566371745849701 22456626 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=22456626 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1353944636: '1745849173_3386566_1353943735_fff6949f6acebb96190f3bce4c189494_rle_crop_3771135801_0.png'} change filename to text .imagette224566261745849701/ imagette224566261745849701/1745849173_3386566_1353943735_fff6949f6acebb96190f3bce4c189494_rle_crop_3771135801_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/53c7def8eaaaa302fd081168fcb7bf58_69636984.png imagette224566261745849701 22456630 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=22456630 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1353944564: '1745849143_2792879_1353944106_732d6ff3d9400de9d1bc19d9aa9f2137_rle_crop_3771135422_0.png', 1353944565: '1745849143_2792879_1353943914_3d325aec0509f2d613f4ef352d994128_rle_crop_3771135434_0.png', 1353944566: '1745849143_2792879_1353943883_88f43e5d8f58b44b8a2b6746f1edeb8e_rle_crop_3771135478_0.png', 1353944632: '1745849173_3386566_1353943949_b7fd497624ffb555fb53dd77275f1daf_rle_crop_3771135751_0.png', 1353944633: '1745849173_3386566_1353943735_fff6949f6acebb96190f3bce4c189494_rle_crop_3771135807_0.png', 1353944634: '1745849173_3386566_1353943735_fff6949f6acebb96190f3bce4c189494_rle_crop_3771135804_0.png', 1353944635: '1745849173_3386566_1353943735_fff6949f6acebb96190f3bce4c189494_rle_crop_3771135803_0.png', 1353944807: '1745849381_2796605_1353944102_58f9382b669a692cb5831a6258538f4b_rle_crop_3771138066_0.png', 1353944808: '1745849381_2796605_1353944102_58f9382b669a692cb5831a6258538f4b_rle_crop_3771138072_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/78ac7f93718b78465b71b524ea10b949_60431118.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/e8e89b66d229f0c6d2e2ab0749f7783a_50783730.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/1a0f9ab5cdf811223c5476779afa6e08_44339691.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/6924dc754d6f5e4641bb8a84277102d7_71258135.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/c1050f5590cedeb8bcaf7676e09eac67_48736000.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/db43afbf3208c9df7069e4bb8e2c2ada_11468920.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/ab877bf61af1381633bdf190fb05fdfd_57790340.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/5a610d52e23ac8fe70be08965dbdbcbf_53408050.png change filename to text .imagette224566301745849701/ imagette224566301745849701/1745849173_3386566_1353943949_b7fd497624ffb555fb53dd77275f1daf_rle_crop_3771135751_0.png.png imagette224566301745849701/1745849143_2792879_1353944106_732d6ff3d9400de9d1bc19d9aa9f2137_rle_crop_3771135422_0.png.png imagette224566301745849701/1745849173_3386566_1353943735_fff6949f6acebb96190f3bce4c189494_rle_crop_3771135803_0.png.png imagette224566301745849701/1745849381_2796605_1353944102_58f9382b669a692cb5831a6258538f4b_rle_crop_3771138066_0.png.png imagette224566301745849701/1745849143_2792879_1353943914_3d325aec0509f2d613f4ef352d994128_rle_crop_3771135434_0.png.png imagette224566301745849701/1745849381_2796605_1353944102_58f9382b669a692cb5831a6258538f4b_rle_crop_3771138072_0.png.png imagette224566301745849701/1745849173_3386566_1353943735_fff6949f6acebb96190f3bce4c189494_rle_crop_3771135807_0.png.png imagette224566301745849701/1745849143_2792879_1353943883_88f43e5d8f58b44b8a2b6746f1edeb8e_rle_crop_3771135478_0.png.png imagette224566301745849701/1745849173_3386566_1353943735_fff6949f6acebb96190f3bce4c189494_rle_crop_3771135804_0.png.png wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/d44b44b2f14267d09b0217124b3a9c8a_26220535.png imagette224566301745849701 22456635 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=22456635 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1353944568: '1745849143_2792879_1353944106_732d6ff3d9400de9d1bc19d9aa9f2137_rle_crop_3771135420_0.png', 1353944810: '1745849381_2796605_1353944102_58f9382b669a692cb5831a6258538f4b_rle_crop_3771138068_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/728c65c703ea79789446591e89b0b8e7_64805764.png change filename to text .imagette224566351745849701/ imagette224566351745849701/1745849381_2796605_1353944102_58f9382b669a692cb5831a6258538f4b_rle_crop_3771138068_0.png.png imagette224566351745849701/1745849143_2792879_1353944106_732d6ff3d9400de9d1bc19d9aa9f2137_rle_crop_3771135420_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/7dc9ec598c65c6f95d7b0f545676983a_98755261.png imagette224566351745849701 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22456621 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22456638,22456639,22456640,22456641,22456642,22456643,22456644,22456645,22456646,22456647,22456648,22456649?tags=Carton_gris,environnement,kraft,mal_croppe,Teint_Dans_La_Masse,metal,plastique,flou,papier,Carton_brun,autre_refus,cartonnette your option no_mail is active, we will not send the real mail to your client args[1353945013] : ('0.02753564893748372',) no score found for photo 1353945013 We are sending mail with results at report@fotonower.com args[1353945011] : ('0.02753564893748372',) no score found for photo 1353945011 We are sending mail with results at report@fotonower.com refus_total : 0.02753564893748372 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=22456621 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_P22456621_28-04-2025_16_15_00.pdf results_Auto_P22456621_28-04-2025_16_15_00.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22456621_28-04-2025_16_15_00.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','22456621','results_Auto_P22456621_28-04-2025_16_15_00.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22456621_28-04-2025_16_15_00.pdf','pdf','','0.09','0.02753564893748372') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22456621]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1353945013, 1353945011] map_info['map_portfolio_photo'] : {22456621: [1353945013, 1353945011, 1353944648, 1353944603, 1353944602, 1353944106, 1353944102, 1353943949, 1353943914, 1353943883, 1353943746, 1353943741, 1353943737, 1353943735]} final : False mtd_id 4302 list_pids : [1353945013, 1353945011] 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, '2764814') ('4302', '22456621', '1353945013', None, None, None, None, None, '2764814') ('4302', None, None, None, None, None, None, None, '2764814') ('4302', '22456621', '1353945011', None, None, None, None, None, '2764814') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 2 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', '22456621', '1353945013', None, None, None, None, None, '2764814'), ('4302', '22456621', '1353945011', None, None, None, None, None, '2764814')] time used for this insertion : 0.015356302261352539 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.061842679977417 time spend to save output : 0.015554189682006836 total time spend for step 4 : 2.077396869659424 step5:split_time_score Mon Apr 28 16:15:02 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 : ['22456621'] 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 : [('22456621',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22456621) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1353945013: {'path': 'temp/1745849700_2673236_1353945013_597e55913df33dbe2f579b6a09e50eea.jpg', 'extension': 'jpg'}, 1353945011: {'path': 'temp/1745849700_2673236_1353945011_0436701d3f9f5f4f085b23bbdd1fef2f.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 = 22456621; (('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 = 22456621 group by h (('16', 14),) 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=22456621 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 (22456621) 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 (22456621) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 28042025 22456621 Nombre de photos uploadées : 14 / 23040 (0%) 28042025 22456621 Nombre de photos taguées (types de déchets): 0 / 14 (0%) 28042025 22456621 Nombre de photos taguées (volume) : 0 / 14 (0%) [{'photo_id': 1353943746, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/ce5c079ac32eb9fb0ab27e04d4356ac3.jpg', 'username': None, 'uploaded_at': 1745848897, 'text': 'image_28042025_16_00_04_010152m0.jpg 1e-05 for time 1, id_amount 3 this amount prod time diff : 1e-05'}, {'photo_id': 1353943741, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/8f66f14ee3d707f44d84c6a035efef61.jpg', 'username': None, 'uploaded_at': 1745848897, 'text': 'image_28042025_16_00_13_009125m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1353943737, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/129bd75a2b766971101c709d1dc0e82d.jpg', 'username': None, 'uploaded_at': 1745848897, 'text': 'image_28042025_16_00_23_010139m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1353943735, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/fff6949f6acebb96190f3bce4c189494.jpg', 'username': None, 'uploaded_at': 1745848897, 'text': 'image_28042025_16_00_44_010141m0.jpg 4e-05 for time 1, id_amount 1 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 2.384185791015625e-06 elapsed_time : order_list_meta_photo_and_scores 7.62939453125e-06 ?????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0008502006530761719 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 22456621, '2025-04-28' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1750587,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.02767467498779297 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= 1750587 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1750587, 'dashboard_run_id': 1758947, 'mtr_portfolio_id': 22454771, 'dashboard_result_id': 10116635, '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_P22454771_28-04-2025_15_32_59.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22454779, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22454780, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22454781, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22454782, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22454783, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22454784, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22454785, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22454786, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22454787, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22454788, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22454789, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22454790, 'pht': 3726}}"}, {'dashboat_entry_day': 1750587, 'dashboard_run_id': 1758947, 'mtr_portfolio_id': 22455401, 'dashboard_result_id': 10116636, '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_P22455401_28-04-2025_15_46_37.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22455426, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22455427, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22455428, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22455429, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22455430, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22455431, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22455432, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22455433, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22455434, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22455435, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22455436, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22455437, 'pht': 3726}}"}, {'dashboat_entry_day': 1750587, 'dashboard_run_id': 1758947, 'mtr_portfolio_id': 22456046, 'dashboard_result_id': 10116637, '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_P22456046_28-04-2025_16_02_32.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22456077, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22456078, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22456079, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22456080, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22456081, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22456082, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22456083, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22456084, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22456085, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22456086, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22456087, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22456088, 'pht': 3726}}"}, {'dashboat_entry_day': 1750587, 'dashboard_run_id': 1758947, 'mtr_portfolio_id': 22456621, 'dashboard_result_id': 10116638, '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_P22456621_28-04-2025_16_09_02.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22456626, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22456627, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22456628, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22456629, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22456630, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22456631, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22456632, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22456633, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22456634, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22456635, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22456636, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22456637, '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 = 22454771 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': 2764642, 'mtr_portfolio_id': 22454771, 'created_at': datetime.datetime(2025, 4, 28, 15, 32, 58), 'result': '0.061645324297743324', 'result_long': None, 'result_double': None}] Qualite : 0.061645324297743324 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22454771 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22454771_28-04-2025_15_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22454771 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_P22454771_28-04-2025_15_32_59.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22454779, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22454780, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22454781, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22454782, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22454783, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22454784, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22454785, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22454786, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22454787, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22454788, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22454789, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22454790, 'pht': 3726}}" where mtr_portfolio_id = 22454771 and dashboard_run_id = 1758947 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`=22454771 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10116635, 0.061645324297743324, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22454771_28-04-2025_15_32_59.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22454779, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22454780, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22454781, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22454782, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22454783, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22454784, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22454785, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22454786, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22454787, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22454788, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22454789, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22454790, '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 = 22455401 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': 2764712, 'mtr_portfolio_id': 22455401, 'created_at': datetime.datetime(2025, 4, 28, 15, 46, 36), 'result': '0.04261826871360352', 'result_long': None, 'result_double': None}] Qualite : 0.04261826871360352 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22455401 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22455401_28-04-2025_15_46_37.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22455401 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_P22455401_28-04-2025_15_46_37.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22455426, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22455427, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22455428, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22455429, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22455430, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22455431, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22455432, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22455433, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22455434, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22455435, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22455436, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22455437, 'pht': 3726}}" where mtr_portfolio_id = 22455401 and dashboard_run_id = 1758947 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`=22455401 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10116636, 0.04261826871360352, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22455401_28-04-2025_15_46_37.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22455426, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22455427, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22455428, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22455429, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22455430, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22455431, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22455432, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22455433, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22455434, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22455435, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22455436, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22455437, '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 = 22456046 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': 2764755, 'mtr_portfolio_id': 22456046, 'created_at': datetime.datetime(2025, 4, 28, 16, 2, 31), 'result': '0.0566092653677605', 'result_long': None, 'result_double': None}] Qualite : 0.0566092653677605 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22456046 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22456046_28-04-2025_16_02_32.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22456046 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_P22456046_28-04-2025_16_02_32.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22456077, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22456078, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22456079, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22456080, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22456081, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22456082, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22456083, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22456084, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22456085, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22456086, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22456087, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22456088, 'pht': 3726}}" where mtr_portfolio_id = 22456046 and dashboard_run_id = 1758947 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`=22456046 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10116637, 0.0566092653677605, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22456046_28-04-2025_16_02_32.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22456077, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22456078, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22456079, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22456080, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22456081, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22456082, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22456083, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22456084, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22456085, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22456086, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22456087, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22456088, '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 = 22456621 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': 2764814, 'mtr_portfolio_id': 22456621, 'created_at': datetime.datetime(2025, 4, 28, 16, 15), 'result': '0.02753564893748372', 'result_long': None, 'result_double': None}] Qualite : 0.02753564893748372 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22456621 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22456621_28-04-2025_16_15_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22456621 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_P22456621_28-04-2025_16_15_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22456626, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22456627, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22456628, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22456629, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22456630, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22456631, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22456632, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22456633, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22456634, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22456635, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22456636, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22456637, 'pht': 3726}}" where mtr_portfolio_id = 22456621 and dashboard_run_id = 1758947 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`=22456621 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10116638, 0.02753564893748372, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22456621_28-04-2025_16_15_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22456626, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22456627, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22456628, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22456629, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22456630, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22456631, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22456632, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22456633, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22456634, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22456635, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22456636, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22456637, '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 (22454771,22455401,22456046,22456621) result : ((1353934356,), (1353934359,), (1353934364,), (1353934415,), (1353934417,), (1353934419,), (1353934422,), (1353934424,), (1353934428,), (1353934500,), (1353934508,), (1353934527,), (1353934604,), (1353934608,), (1353934611,), (1353934615,), (1353934618,), (1353934622,), (1353934687,), (1353934693,), (1353934696,), (1353934701,), (1353934716,), (1353934719,), (1353934726,), (1353934732,), (1353934744,), (1353934762,), (1353934831,), (1353934838,), (1353934841,), (1353934844,), (1353934847,), (1353934850,), (1353934901,), (1353934904,), (1353934907,), (1353934958,), (1353934967,), (1353934971,), (1353934977,), (1353934981,), (1353934984,), (1353935035,), (1353935036,), (1353935039,), (1353935040,), (1353935044,), (1353935045,), (1353935048,), (1353935049,), (1353935206,), (1353935238,), (1353935271,), (1353935305,), (1353935336,), (1353935366,), (1353935468,), (1353935501,), (1353935532,), (1353935571,), (1353935975,), (1353936016,), (1353936053,), (1353936082,), (1353936112,), (1353936497,), (1353936527,), (1353936555,), (1353936584,), (1353936657,), (1353936663,), (1353936667,), (1353936670,), (1353936673,), (1353936676,), (1353936768,), (1353936749,), (1353936752,), (1353936762,), (1353936864,), (1353936902,), (1353936933,), (1353936965,), (1353937374,), (1353937406,), (1353937449,), (1353937485,), (1353937698,), (1353937701,), (1353937827,), (1353937974,), (1353937978,), (1353937985,), (1353938046,), (1353938081,), (1353938114,), (1353938162,), (1353938191,), (1353938230,), (1353938558,), (1353938563,), (1353938574,), (1353938584,), (1353938589,), (1353938593,), (1353938598,), (1353938603,), (1353938608,), (1353938672,), (1353938675,), (1353938680,), (1353938684,), (1353938754,), (1353938760,), (1353938766,), (1353938772,), (1353938778,), (1353938868,), (1353938873,), (1353938878,), (1353938940,), (1353938946,), (1353938952,), (1353938956,), (1353938961,), (1353938964,), (1353939137,), (1353939145,), (1353939149,), (1353939152,), (1353939153,), (1353939213,), (1353939226,), (1353939234,), (1353939532,), (1353939537,), (1353939545,), (1353939579,), (1353939611,), (1353939644,), (1353939806,), (1353939837,), (1353940139,), (1353940306,), (1353940337,), (1353940423,), (1353940430,), (1353940446,), (1353940455,), (1353940507,), (1353940582,), (1353940782,), (1353940954,), (1353941070,), (1353941075,), (1353941080,), (1353941195,), (1353941200,), (1353941203,), (1353941206,), (1353941209,), (1353941212,), (1353941307,), (1353941309,), (1353941328,), (1353941329,), (1353941337,), (1353941338,), (1353941343,), (1353941344,), (1353941358,), (1353941361,), (1353941409,), (1353941414,), (1353941426,), (1353941440,), (1353941479,), (1353941533,), (1353941641,), (1353941665,), (1353941667,), (1353941671,), (1353941868,), (1353941873,), (1353941879,), (1353941884,), (1353941887,), (1353941941,), (1353941944,), (1353941948,), (1353941951,), (1353941957,), (1353941998,), (1353942003,), (1353942007,), (1353942010,), (1353942025,), (1353942034,), (1353942469,), (1353942530,), (1353943074,), (1353943140,), (1353943204,), (1353943239,), (1353943387,), (1353943393,), (1353943436,), (1353943440,), (1353943466,), (1353943476,), (1353943777,), (1353943735,), (1353943737,), (1353943741,), (1353943746,), (1353943883,), (1353943914,), (1353943949,), (1353944102,), (1353944106,), (1353944602,), (1353944603,), (1353944648,), (1353945011,), (1353945013,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'28042025': {'nb_upload': 14, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22456621]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1353945013, 1353945011] map_info['map_portfolio_photo'] : {22456621: [1353945013, 1353945011, 1353944648, 1353944603, 1353944602, 1353944106, 1353944102, 1353943949, 1353943914, 1353943883, 1353943746, 1353943741, 1353943737, 1353943735]} final : True mtd_id 4302 list_pids : [1353945013, 1353945011] Looping around the photos to save general results len do output : 1 /22456621Didn'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, '2764814') ('4302', '22456621', '1353945013', None, None, None, None, None, '2764814') ('4302', None, None, None, None, None, None, None, '2764814') ('4302', '22456621', '1353945011', None, None, None, None, None, '2764814') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 3 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, '22456621', 'None', None, None, None, None, '2764814'), ('4302', '22456621', '1353945013', None, None, None, None, None, '2764814'), ('4302', '22456621', '1353945011', None, None, None, None, None, '2764814')] time used for this insertion : 0.012461662292480469 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.3669168949127197 time spend to save output : 0.012652873992919922 total time spend for step 5 : 0.37956976890563965 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 (2764814) 2.17user 2.19system 0:07.70elapsed 56%CPU (0avgtext+0avgdata 158328maxresident)k 57824inputs+4936outputs (183major+74667minor)pagefaults 0swaps