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 : 378938 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 w4302 [] 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 (2710027) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2710027) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21918094 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2710027'] with mtr_portfolio_ids : ['21918094'] and first list_photo_ids : [] new path : /proc/378938/ Name: python3 Umask: 0002 State: R (running) Tgid: 378938 Ngid: 0 Pid: 378938 PPid: 378937 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 378938 NSpid: 378938 NSpgid: 375269 NSsid: 375269 VmPeak: 1106932 kB VmSize: 1106932 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 97688 kB VmRSS: 97688 kB RssAnon: 59772 kB RssFile: 37916 kB RssShmem: 0 kB VmData: 865680 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 608 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: 77 nonvoluntary_ctxt_switches: 117 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '378938', 'Ngid': '0', 'Pid': '378938', 'PPid': '378937', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '378938', 'NSpid': '378938', 'NSpgid': '375269', 'NSsid': '375269', 'VmPeak': '1106932 kB', 'VmSize': '1106932 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '97688 kB', 'VmRSS': '97688 kB', 'RssAnon': '59772 kB', 'RssFile': '37916 kB', 'RssShmem': '0 kB', 'VmData': '865680 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '608 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': '77', 'nonvoluntary_ctxt_switches': '117'} ('datou_batch_current', '378938', '1106932', '0', '1106932', '865680', '97688', b'', 'marlene', '2710027') 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 (21918094) 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 (2710027 ) ) 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 (21918094) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1349053461, 'portfolio_id': 21918094}, {'photo_id': 1349053458, 'portfolio_id': 21918094}, {'photo_id': 1349053197, 'portfolio_id': 21918094}, {'photo_id': 1349053087, 'portfolio_id': 21918094}, {'photo_id': 1349053032, 'portfolio_id': 21918094}, {'photo_id': 1349053003, 'portfolio_id': 21918094}, {'photo_id': 1349052974, 'portfolio_id': 21918094}, {'photo_id': 1349052952, 'portfolio_id': 21918094}, {'photo_id': 1349052926, 'portfolio_id': 21918094}, {'photo_id': 1349052729, 'portfolio_id': 21918094}, {'photo_id': 1349052716, 'portfolio_id': 21918094}, {'photo_id': 1349052710, 'portfolio_id': 21918094}, {'photo_id': 1349052613, 'portfolio_id': 21918094}, {'photo_id': 1349052404, 'portfolio_id': 21918094}, {'photo_id': 1349052397, 'portfolio_id': 21918094}, {'photo_id': 1349052390, 'portfolio_id': 21918094}, {'photo_id': 1349052387, 'portfolio_id': 21918094}, {'photo_id': 1349052377, 'portfolio_id': 21918094}] map_portfolio_id_photo_id: {21918094: [1349053461, 1349053458, 1349053197, 1349053087, 1349053032, 1349053003, 1349052974, 1349052952, 1349052926, 1349052729, 1349052716, 1349052710, 1349052613, 1349052404, 1349052397, 1349052390, 1349052387, 1349052377]} ##### 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.01495361328125 #### 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 Mar 31 18:20: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 (21918094) 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 : 21918094 get user id for portfolio 21918094 get sub ptf for main ptf 21918094, type 3726 and hashtags ['flou', 'papier', 'Carton_brun', 'Teint_Dans_La_Masse', 'metal', 'Carton_gris', 'cartonnette', 'plastique', 'mal_croppe', 'environnement', 'kraft', '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`=21918094 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','papier','Carton_brun','Teint_Dans_La_Masse','metal','Carton_gris','cartonnette','plastique','mal_croppe','environnement','kraft','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`=21918094 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','papier','Carton_brun','Teint_Dans_La_Masse','metal','Carton_gris','cartonnette','plastique','mal_croppe','environnement','kraft','autre_refus')) AND mptpi.`min_score`=0.5 To do returned map {'flou': {'main_port_id': 21918094, 'sub_port_id': 21918136, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14423908, 'last_updated_at': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 18, 19, 27)}, 'metal': {'main_port_id': 21918094, 'sub_port_id': 21918137, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14423909, 'last_updated_at': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 18, 19, 27)}, 'cartonnette': {'main_port_id': 21918094, 'sub_port_id': 21918138, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14423910, 'last_updated_at': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 18, 19, 27)}, 'autre_refus': {'main_port_id': 21918094, 'sub_port_id': 21918139, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14423911, 'last_updated_at': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 18, 19, 27)}, 'plastique': {'main_port_id': 21918094, 'sub_port_id': 21918140, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14423912, 'last_updated_at': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 18, 19, 27)}, 'papier': {'main_port_id': 21918094, 'sub_port_id': 21918141, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14423913, 'last_updated_at': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 18, 19, 27)}, 'environnement': {'main_port_id': 21918094, 'sub_port_id': 21918142, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14423914, 'last_updated_at': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 18, 19, 27)}, 'Carton_gris': {'main_port_id': 21918094, 'sub_port_id': 21918143, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14423915, 'last_updated_at': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 18, 19, 27)}, 'Teint_Dans_La_Masse': {'main_port_id': 21918094, 'sub_port_id': 21918144, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14423916, 'last_updated_at': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 18, 19, 27)}, 'Carton_brun': {'main_port_id': 21918094, 'sub_port_id': 21918145, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14423917, 'last_updated_at': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 18, 19, 27)}, 'mal_croppe': {'main_port_id': 21918094, 'sub_port_id': 21918146, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14423918, 'last_updated_at': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 18, 19, 27)}, 'kraft': {'main_port_id': 21918094, 'sub_port_id': 21918147, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14423919, 'last_updated_at': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 18, 19, 27)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21918136 , 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=21918094 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 (21918136) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21918094) result : ((1349052377,), (1349052387,), (1349052390,), (1349052397,), (1349052404,), (1349052613,), (1349052710,), (1349052716,), (1349052729,), (1349052926,), (1349052952,), (1349052974,), (1349053003,), (1349053032,), (1349053087,), (1349053197,), (1349053458,), (1349053461,)) 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 21918137 , 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=21918094 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 (21918137) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21918094) result : ((1349052377,), (1349052387,), (1349052390,), (1349052397,), (1349052404,), (1349052613,), (1349052710,), (1349052716,), (1349052729,), (1349052926,), (1349052952,), (1349052974,), (1349053003,), (1349053032,), (1349053087,), (1349053197,), (1349053458,), (1349053461,)) 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 21918138 , 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=21918094 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 (21918138) result : ((1349053472,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21918094) result : ((1349052377,), (1349052387,), (1349052390,), (1349052397,), (1349052404,), (1349052613,), (1349052710,), (1349052716,), (1349052729,), (1349052926,), (1349052952,), (1349052974,), (1349053003,), (1349053032,), (1349053087,), (1349053197,), (1349053458,), (1349053461,)) 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 21918139 , 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=21918094 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 (21918139) result : ((1349053462,), (1349053463,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21918094) result : ((1349052377,), (1349052387,), (1349052390,), (1349052397,), (1349052404,), (1349052613,), (1349052710,), (1349052716,), (1349052729,), (1349052926,), (1349052952,), (1349052974,), (1349053003,), (1349053032,), (1349053087,), (1349053197,), (1349053458,), (1349053461,)) 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 21918140 , 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=21918094 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 (21918140) result : ((1349053416,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21918094) result : ((1349052377,), (1349052387,), (1349052390,), (1349052397,), (1349052404,), (1349052613,), (1349052710,), (1349052716,), (1349052729,), (1349052926,), (1349052952,), (1349052974,), (1349053003,), (1349053032,), (1349053087,), (1349053197,), (1349053458,), (1349053461,)) 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 21918141 , 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=21918094 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 (21918141) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21918094) result : ((1349052377,), (1349052387,), (1349052390,), (1349052397,), (1349052404,), (1349052613,), (1349052710,), (1349052716,), (1349052729,), (1349052926,), (1349052952,), (1349052974,), (1349053003,), (1349053032,), (1349053087,), (1349053197,), (1349053458,), (1349053461,)) 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 21918142 , 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=21918094 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 (21918142) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21918094) result : ((1349052377,), (1349052387,), (1349052390,), (1349052397,), (1349052404,), (1349052613,), (1349052710,), (1349052716,), (1349052729,), (1349052926,), (1349052952,), (1349052974,), (1349053003,), (1349053032,), (1349053087,), (1349053197,), (1349053458,), (1349053461,)) 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 21918143 , 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=21918094 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 (21918143) result : ((1349053466,), (1349053467,), (1349053468,), (1349053469,), (1349053470,), (1349053471,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21918094) result : ((1349052377,), (1349052387,), (1349052390,), (1349052397,), (1349052404,), (1349052613,), (1349052710,), (1349052716,), (1349052729,), (1349052926,), (1349052952,), (1349052974,), (1349053003,), (1349053032,), (1349053087,), (1349053197,), (1349053458,), (1349053461,)) 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 21918144 , 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=21918094 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 (21918144) result : ((1349053401,), (1349053403,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21918094) result : ((1349052377,), (1349052387,), (1349052390,), (1349052397,), (1349052404,), (1349052613,), (1349052710,), (1349052716,), (1349052729,), (1349052926,), (1349052952,), (1349052974,), (1349053003,), (1349053032,), (1349053087,), (1349053197,), (1349053458,), (1349053461,)) 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 21918145 , 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=21918094 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 (21918145) result : ((1349053411,), (1349053474,), (1349053475,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21918094) result : ((1349052377,), (1349052387,), (1349052390,), (1349052397,), (1349052404,), (1349052613,), (1349052710,), (1349052716,), (1349052729,), (1349052926,), (1349052952,), (1349052974,), (1349053003,), (1349053032,), (1349053087,), (1349053197,), (1349053458,), (1349053461,)) 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 21918146 , 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=21918094 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 (21918146) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21918094) result : ((1349052377,), (1349052387,), (1349052390,), (1349052397,), (1349052404,), (1349052613,), (1349052710,), (1349052716,), (1349052729,), (1349052926,), (1349052952,), (1349052974,), (1349053003,), (1349053032,), (1349053087,), (1349053197,), (1349053458,), (1349053461,)) 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 21918147 , 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=21918094 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 (21918147) result : ((1349053477,), (1349053478,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21918094) result : ((1349052377,), (1349052387,), (1349052390,), (1349052397,), (1349052404,), (1349052613,), (1349052710,), (1349052716,), (1349052729,), (1349052926,), (1349052952,), (1349052974,), (1349053003,), (1349053032,), (1349053087,), (1349053197,), (1349053458,), (1349053461,)) 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`=21918094 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','papier','Carton_brun','Teint_Dans_La_Masse','metal','Carton_gris','cartonnette','plastique','mal_croppe','environnement','kraft','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`=21918094 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','papier','Carton_brun','Teint_Dans_La_Masse','metal','Carton_gris','cartonnette','plastique','mal_croppe','environnement','kraft','autre_refus')) AND mptpi.`min_score`=0.5 To do returned map {'flou': {'main_port_id': 21918094, 'sub_port_id': 21918148, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14423920, 'last_updated_at': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 18, 19, 29)}, 'metal': {'main_port_id': 21918094, 'sub_port_id': 21918149, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14423921, 'last_updated_at': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 18, 19, 29)}, 'cartonnette': {'main_port_id': 21918094, 'sub_port_id': 21918150, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14423922, 'last_updated_at': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 18, 19, 29)}, 'autre_refus': {'main_port_id': 21918094, 'sub_port_id': 21918151, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14423923, 'last_updated_at': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 18, 19, 29)}, 'plastique': {'main_port_id': 21918094, 'sub_port_id': 21918152, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14423924, 'last_updated_at': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 18, 19, 29)}, 'papier': {'main_port_id': 21918094, 'sub_port_id': 21918153, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14423925, 'last_updated_at': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 18, 19, 29)}, 'environnement': {'main_port_id': 21918094, 'sub_port_id': 21918154, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14423926, 'last_updated_at': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 18, 19, 29)}, 'Carton_gris': {'main_port_id': 21918094, 'sub_port_id': 21918155, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14423927, 'last_updated_at': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 18, 19, 29)}, 'Teint_Dans_La_Masse': {'main_port_id': 21918094, 'sub_port_id': 21918156, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14423928, 'last_updated_at': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 18, 19, 29)}, 'Carton_brun': {'main_port_id': 21918094, 'sub_port_id': 21918157, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14423929, 'last_updated_at': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 18, 19, 29)}, 'mal_croppe': {'main_port_id': 21918094, 'sub_port_id': 21918158, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14423930, 'last_updated_at': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 18, 19, 29)}, 'kraft': {'main_port_id': 21918094, 'sub_port_id': 21918159, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14423931, 'last_updated_at': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 18, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 18, 19, 29)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21918148,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21918136 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21918149,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21918137 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21918150,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21918138 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21918151,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21918139 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21918152,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21918140 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21918153,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21918141 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21918154,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21918142 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21918155,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21918143 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21918156,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21918144 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21918157,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21918145 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21918158,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21918146 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21918159,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21918147 lien utilise dans velours : https://www.fotonower.com/velours/21918148,21918149,21918150,21918151,21918152,21918153,21918154,21918155,21918156,21918157,21918158,21918159?tags=flou,metal,cartonnette,autre_refus,plastique,papier,environnement,Carton_gris,Teint_Dans_La_Masse,Carton_brun,mal_croppe,kraft After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21918094]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1349053461, 1349053458, 1349053197, 1349053087, 1349053032, 1349053003, 1349052974, 1349052952, 1349052926] map_info['map_portfolio_photo'] : {21918094: [1349053461, 1349053458, 1349053197, 1349053087, 1349053032, 1349053003, 1349052974, 1349052952, 1349052926, 1349052729, 1349052716, 1349052710, 1349052613, 1349052404, 1349052397, 1349052390, 1349052387, 1349052377]} final : False mtd_id 4302 list_pids : [1349053461, 1349053458, 1349053197, 1349053087, 1349053032, 1349053003, 1349052974, 1349052952, 1349052926] Looping around the photos to save general results len do output : 1 /21918094. 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, '2710027') ('4302', '21918094', '1349053461', None, None, None, None, None, '2710027') ('4302', None, None, None, None, None, None, None, '2710027') ('4302', '21918094', '1349053458', None, None, None, None, None, '2710027') ('4302', None, None, None, None, None, None, None, '2710027') ('4302', '21918094', '1349053197', None, None, None, None, None, '2710027') ('4302', None, None, None, None, None, None, None, '2710027') ('4302', '21918094', '1349053087', None, None, None, None, None, '2710027') ('4302', None, None, None, None, None, None, None, '2710027') ('4302', '21918094', '1349053032', None, None, None, None, None, '2710027') ('4302', None, None, None, None, None, None, None, '2710027') ('4302', '21918094', '1349053003', None, None, None, None, None, '2710027') ('4302', None, None, None, None, None, None, None, '2710027') ('4302', '21918094', '1349052974', None, None, None, None, None, '2710027') ('4302', None, None, None, None, None, None, None, '2710027') ('4302', '21918094', '1349052952', None, None, None, None, None, '2710027') ('4302', None, None, None, None, None, None, None, '2710027') ('4302', '21918094', '1349052926', None, None, None, None, None, '2710027') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '21918094', "{'flou': 21918136, 'metal': 21918137, 'cartonnette': 21918138, 'autre_refus': 21918139, 'plastique': 21918140, 'papier': 21918141, 'environnement': 21918142, 'Carton_gris': 21918143, 'Teint_Dans_La_Masse': 21918144, 'Carton_brun': 21918145, 'mal_croppe': 21918146, 'kraft': 21918147}", None, None, None, None, '2710027'), ('4302', '21918094', '1349053461', None, None, None, None, None, '2710027'), ('4302', '21918094', '1349053458', None, None, None, None, None, '2710027'), ('4302', '21918094', '1349053197', None, None, None, None, None, '2710027'), ('4302', '21918094', '1349053087', None, None, None, None, None, '2710027'), ('4302', '21918094', '1349053032', None, None, None, None, None, '2710027'), ('4302', '21918094', '1349053003', None, None, None, None, None, '2710027'), ('4302', '21918094', '1349052974', None, None, None, None, None, '2710027'), ('4302', '21918094', '1349052952', None, None, None, None, None, '2710027'), ('4302', '21918094', '1349052926', None, None, None, None, None, '2710027')] time used for this insertion : 0.013634443283081055 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5467956066131592 time spend to save output : 0.014083623886108398 total time spend for step 1 : 1.5608792304992676 step2:final Mon Mar 31 18:20:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! 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 (21918094) 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 21918094 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1349052404,1349052397,1349052390,1349052387,1349052377,1349052729,1349052716,1349052710,1349052613,1349053087,1349053032,1349053003,1349052974,1349052952,1349052926,1349053197,1349053461,1349053458); 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([21918094]) Inside saveOutput : final : False verbose : True original output for save of step final : {1349053461: ('0.048028956878115515',), 1349053458: ('0.048028956878115515',), 1349053197: ('0.048028956878115515',), 1349053087: ('0.048028956878115515',), 1349053032: ('0.048028956878115515',), 1349053003: ('0.048028956878115515',), 1349052974: ('0.048028956878115515',), 1349052952: ('0.048028956878115515',), 1349052926: ('0.048028956878115515',)} new output for save of step final : {1349053461: ('0.048028956878115515',), 1349053458: ('0.048028956878115515',), 1349053197: ('0.048028956878115515',), 1349053087: ('0.048028956878115515',), 1349053032: ('0.048028956878115515',), 1349053003: ('0.048028956878115515',), 1349052974: ('0.048028956878115515',), 1349052952: ('0.048028956878115515',), 1349052926: ('0.048028956878115515',)} [1349053461, 1349053458, 1349053197, 1349053087, 1349053032, 1349053003, 1349052974, 1349052952, 1349052926] map_info['map_portfolio_photo'] : {21918094: [1349053461, 1349053458, 1349053197, 1349053087, 1349053032, 1349053003, 1349052974, 1349052952, 1349052926, 1349052729, 1349052716, 1349052710, 1349052613, 1349052404, 1349052397, 1349052390, 1349052387, 1349052377]} final : False mtd_id 4302 list_pids : [1349053461, 1349053458, 1349053197, 1349053087, 1349053032, 1349053003, 1349052974, 1349052952, 1349052926] Looping around the photos to save general results len do output : 9 /1349053461.Didn't retrieve data . /1349053458.Didn't retrieve data . /1349053197.Didn't retrieve data . /1349053087.Didn't retrieve data . /1349053032.Didn't retrieve data . /1349053003.Didn't retrieve data . /1349052974.Didn't retrieve data . /1349052952.Didn't retrieve data . /1349052926.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, '2710027') ('4302', '21918094', '1349053461', None, None, None, None, None, '2710027') ('4302', None, None, None, None, None, None, None, '2710027') ('4302', '21918094', '1349053458', None, None, None, None, None, '2710027') ('4302', None, None, None, None, None, None, None, '2710027') ('4302', '21918094', '1349053197', None, None, None, None, None, '2710027') ('4302', None, None, None, None, None, None, None, '2710027') ('4302', '21918094', '1349053087', None, None, None, None, None, '2710027') ('4302', None, None, None, None, None, None, None, '2710027') ('4302', '21918094', '1349053032', None, None, None, None, None, '2710027') ('4302', None, None, None, None, None, None, None, '2710027') ('4302', '21918094', '1349053003', None, None, None, None, None, '2710027') ('4302', None, None, None, None, None, None, None, '2710027') ('4302', '21918094', '1349052974', None, None, None, None, None, '2710027') ('4302', None, None, None, None, None, None, None, '2710027') ('4302', '21918094', '1349052952', None, None, None, None, None, '2710027') ('4302', None, None, None, None, None, None, None, '2710027') ('4302', '21918094', '1349052926', None, None, None, None, None, '2710027') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 27 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', '21918094', '1349053461', '0.048028956878115515', None, None, None, None, '2710027'), ('4302', '21918094', '1349053458', '0.048028956878115515', None, None, None, None, '2710027'), ('4302', '21918094', '1349053197', '0.048028956878115515', None, None, None, None, '2710027'), ('4302', '21918094', '1349053087', '0.048028956878115515', None, None, None, None, '2710027'), ('4302', '21918094', '1349053032', '0.048028956878115515', None, None, None, None, '2710027'), ('4302', '21918094', '1349053003', '0.048028956878115515', None, None, None, None, '2710027'), ('4302', '21918094', '1349052974', '0.048028956878115515', None, None, None, None, '2710027'), ('4302', '21918094', '1349052952', '0.048028956878115515', None, None, None, None, '2710027'), ('4302', '21918094', '1349052926', '0.048028956878115515', None, None, None, None, '2710027')] time used for this insertion : 0.04046058654785156 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06395483016967773 time spend to save output : 0.041060686111450195 total time spend for step 2 : 0.10501551628112793 step3:velours_tree Mon Mar 31 18:20:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {21918094: [{'flou': 21918136, 'metal': 21918137, 'cartonnette': 21918138, 'autre_refus': 21918139, 'plastique': 21918140, 'papier': 21918141, 'environnement': 21918142, 'Carton_gris': 21918143, 'Teint_Dans_La_Masse': 21918144, 'Carton_brun': 21918145, 'mal_croppe': 21918146, 'kraft': 21918147}]} input_args_next_step : {21918094: ()} output_args : {21918094: [{'flou': 21918136, 'metal': 21918137, 'cartonnette': 21918138, 'autre_refus': 21918139, 'plastique': 21918140, 'papier': 21918141, 'environnement': 21918142, 'Carton_gris': 21918143, 'Teint_Dans_La_Masse': 21918144, 'Carton_brun': 21918145, 'mal_croppe': 21918146, 'kraft': 21918147}]} args : 21918094 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 : ({'flou': 21918136, 'metal': 21918137, 'cartonnette': 21918138, 'autre_refus': 21918139, 'plastique': 21918140, 'papier': 21918141, 'environnement': 21918142, 'Carton_gris': 21918143, 'Teint_Dans_La_Masse': 21918144, 'Carton_brun': 21918145, 'mal_croppe': 21918146, 'kraft': 21918147},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21918094) 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([21918094]) 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.3948078155517578 time spend to save output : 8.726119995117188e-05 total time spend for step 3 : 0.394895076751709 step4:send_mail_cod Mon Mar 31 18:21: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 : {1349053461: ('0.048028956878115515',), 1349053458: ('0.048028956878115515',), 1349053197: ('0.048028956878115515',), 1349053087: ('0.048028956878115515',), 1349053032: ('0.048028956878115515',), 1349053003: ('0.048028956878115515',), 1349052974: ('0.048028956878115515',), 1349052952: ('0.048028956878115515',), 1349052926: ('0.048028956878115515',)} input_args_next_step : {1349053461: ()} output_args : {1349053461: ('0.048028956878115515',), 1349053458: ('0.048028956878115515',), 1349053197: ('0.048028956878115515',), 1349053087: ('0.048028956878115515',), 1349053032: ('0.048028956878115515',), 1349053003: ('0.048028956878115515',), 1349052974: ('0.048028956878115515',), 1349052952: ('0.048028956878115515',), 1349052926: ('0.048028956878115515',)} args : 1349053461 depend.output_id : 0 input_args_next_step : {1349053461: ('0.048028956878115515',), 1349053458: ()} output_args : {1349053461: ('0.048028956878115515',), 1349053458: ('0.048028956878115515',), 1349053197: ('0.048028956878115515',), 1349053087: ('0.048028956878115515',), 1349053032: ('0.048028956878115515',), 1349053003: ('0.048028956878115515',), 1349052974: ('0.048028956878115515',), 1349052952: ('0.048028956878115515',), 1349052926: ('0.048028956878115515',)} args : 1349053458 depend.output_id : 0 input_args_next_step : {1349053461: ('0.048028956878115515',), 1349053458: ('0.048028956878115515',), 1349053197: ()} output_args : {1349053461: ('0.048028956878115515',), 1349053458: ('0.048028956878115515',), 1349053197: ('0.048028956878115515',), 1349053087: ('0.048028956878115515',), 1349053032: ('0.048028956878115515',), 1349053003: ('0.048028956878115515',), 1349052974: ('0.048028956878115515',), 1349052952: ('0.048028956878115515',), 1349052926: ('0.048028956878115515',)} args : 1349053197 depend.output_id : 0 input_args_next_step : {1349053461: ('0.048028956878115515',), 1349053458: ('0.048028956878115515',), 1349053197: ('0.048028956878115515',), 1349053087: ()} output_args : {1349053461: ('0.048028956878115515',), 1349053458: ('0.048028956878115515',), 1349053197: ('0.048028956878115515',), 1349053087: ('0.048028956878115515',), 1349053032: ('0.048028956878115515',), 1349053003: ('0.048028956878115515',), 1349052974: ('0.048028956878115515',), 1349052952: ('0.048028956878115515',), 1349052926: ('0.048028956878115515',)} args : 1349053087 depend.output_id : 0 input_args_next_step : {1349053461: ('0.048028956878115515',), 1349053458: ('0.048028956878115515',), 1349053197: ('0.048028956878115515',), 1349053087: ('0.048028956878115515',), 1349053032: ()} output_args : {1349053461: ('0.048028956878115515',), 1349053458: ('0.048028956878115515',), 1349053197: ('0.048028956878115515',), 1349053087: ('0.048028956878115515',), 1349053032: ('0.048028956878115515',), 1349053003: ('0.048028956878115515',), 1349052974: ('0.048028956878115515',), 1349052952: ('0.048028956878115515',), 1349052926: ('0.048028956878115515',)} args : 1349053032 depend.output_id : 0 input_args_next_step : {1349053461: ('0.048028956878115515',), 1349053458: ('0.048028956878115515',), 1349053197: ('0.048028956878115515',), 1349053087: ('0.048028956878115515',), 1349053032: ('0.048028956878115515',), 1349053003: ()} output_args : {1349053461: ('0.048028956878115515',), 1349053458: ('0.048028956878115515',), 1349053197: ('0.048028956878115515',), 1349053087: ('0.048028956878115515',), 1349053032: ('0.048028956878115515',), 1349053003: ('0.048028956878115515',), 1349052974: ('0.048028956878115515',), 1349052952: ('0.048028956878115515',), 1349052926: ('0.048028956878115515',)} args : 1349053003 depend.output_id : 0 input_args_next_step : {1349053461: ('0.048028956878115515',), 1349053458: ('0.048028956878115515',), 1349053197: ('0.048028956878115515',), 1349053087: ('0.048028956878115515',), 1349053032: ('0.048028956878115515',), 1349053003: ('0.048028956878115515',), 1349052974: ()} output_args : {1349053461: ('0.048028956878115515',), 1349053458: ('0.048028956878115515',), 1349053197: ('0.048028956878115515',), 1349053087: ('0.048028956878115515',), 1349053032: ('0.048028956878115515',), 1349053003: ('0.048028956878115515',), 1349052974: ('0.048028956878115515',), 1349052952: ('0.048028956878115515',), 1349052926: ('0.048028956878115515',)} args : 1349052974 depend.output_id : 0 input_args_next_step : {1349053461: ('0.048028956878115515',), 1349053458: ('0.048028956878115515',), 1349053197: ('0.048028956878115515',), 1349053087: ('0.048028956878115515',), 1349053032: ('0.048028956878115515',), 1349053003: ('0.048028956878115515',), 1349052974: ('0.048028956878115515',), 1349052952: ()} output_args : {1349053461: ('0.048028956878115515',), 1349053458: ('0.048028956878115515',), 1349053197: ('0.048028956878115515',), 1349053087: ('0.048028956878115515',), 1349053032: ('0.048028956878115515',), 1349053003: ('0.048028956878115515',), 1349052974: ('0.048028956878115515',), 1349052952: ('0.048028956878115515',), 1349052926: ('0.048028956878115515',)} args : 1349052952 depend.output_id : 0 input_args_next_step : {1349053461: ('0.048028956878115515',), 1349053458: ('0.048028956878115515',), 1349053197: ('0.048028956878115515',), 1349053087: ('0.048028956878115515',), 1349053032: ('0.048028956878115515',), 1349053003: ('0.048028956878115515',), 1349052974: ('0.048028956878115515',), 1349052952: ('0.048028956878115515',), 1349052926: ()} output_args : {1349053461: ('0.048028956878115515',), 1349053458: ('0.048028956878115515',), 1349053197: ('0.048028956878115515',), 1349053087: ('0.048028956878115515',), 1349053032: ('0.048028956878115515',), 1349053003: ('0.048028956878115515',), 1349052974: ('0.048028956878115515',), 1349052952: ('0.048028956878115515',), 1349052926: ('0.048028956878115515',)} args : 1349052926 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 : {21918094: [{'flou': 21918136, 'metal': 21918137, 'cartonnette': 21918138, 'autre_refus': 21918139, 'plastique': 21918140, 'papier': 21918141, 'environnement': 21918142, 'Carton_gris': 21918143, 'Teint_Dans_La_Masse': 21918144, 'Carton_brun': 21918145, 'mal_croppe': 21918146, 'kraft': 21918147}]} input_args_next_step : {1349053461: ('0.048028956878115515',), 1349053458: ('0.048028956878115515',), 1349053197: ('0.048028956878115515',), 1349053087: ('0.048028956878115515',), 1349053032: ('0.048028956878115515',), 1349053003: ('0.048028956878115515',), 1349052974: ('0.048028956878115515',), 1349052952: ('0.048028956878115515',), 1349052926: ('0.048028956878115515',), 21918094: ()} output_args : {21918094: [{'flou': 21918136, 'metal': 21918137, 'cartonnette': 21918138, 'autre_refus': 21918139, 'plastique': 21918140, 'papier': 21918141, 'environnement': 21918142, 'Carton_gris': 21918143, 'Teint_Dans_La_Masse': 21918144, 'Carton_brun': 21918145, 'mal_croppe': 21918146, 'kraft': 21918147}]} args : 21918094 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 :10, first value : ('0.048028956878115515',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21918094) 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 (1349053461,1349053458,1349053197,1349053087,1349053032,1349053003,1349052974,1349052952,1349052926) Found this number of photos: 9 ##### Call download_photos : nb_thread : 5 begin to download photo : 1349052926 begin to download photo : 1349052974 begin to download photo : 1349053032 begin to download photo : 1349053197 begin to download photo : 1349053461 download finish for photo 1349053461 download finish for photo 1349052974 begin to download photo : 1349053003 download finish for photo 1349053197 begin to download photo : 1349053458 download finish for photo 1349053032 begin to download photo : 1349053087 download finish for photo 1349052926 begin to download photo : 1349052952 download finish for photo 1349053458 download finish for photo 1349053003 download finish for photo 1349053087 download finish for photo 1349052952 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette219181361743438060/ imagette219181371743438060/ length of list_filenames : 9 ; length of list_pids : 9 ; length of list_args : 9 results_Auto_P21918094_31-03-2025_18_21_00.pdf 21918136 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=21918136 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette219181361743438060 21918137 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=21918137 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette219181371743438060 21918138 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=21918138 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349053472: '1743437966_1259364_1349052390_dab9d00c8a0a93409bab096a77d3173d_rle_crop_3741326370_0.png'} change filename to text .imagette219181381743438060/ imagette219181381743438060/1743437966_1259364_1349052390_dab9d00c8a0a93409bab096a77d3173d_rle_crop_3741326370_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/335478466953f2c930f624f0a567c9d5_29139204.png imagette219181381743438060 21918139 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=21918139 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349053462: '1743437966_1259364_1349052729_df597ef7639c1166b6ed7eea2f0ee442_rle_crop_3741326333_0.png', 1349053463: '1743437966_1259364_1349052729_df597ef7639c1166b6ed7eea2f0ee442_rle_crop_3741326335_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/5e46f24b60491aeb4b787469cb263f0b_59291664.png change filename to text .imagette219181391743438060/ imagette219181391743438060/1743437966_1259364_1349052729_df597ef7639c1166b6ed7eea2f0ee442_rle_crop_3741326333_0.png.png imagette219181391743438060/1743437966_1259364_1349052729_df597ef7639c1166b6ed7eea2f0ee442_rle_crop_3741326335_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/18d6ccdb28a6fced5ff963a7665a04c3_56414557.png imagette219181391743438060 21918140 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=21918140 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349053416: '1743437952_3692032_1349052716_026322e7674b5b1e855eec159c376803_rle_crop_3741326250_0.png'} change filename to text .imagette219181401743438060/ imagette219181401743438060/1743437952_3692032_1349052716_026322e7674b5b1e855eec159c376803_rle_crop_3741326250_0.png.png imagette219181461743438060/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/c8f33d58fa75747e745a095ab804e024_54213409.png imagette219181401743438060 21918146 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=21918146 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette219181461743438060 21918147 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=21918147 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349053477: '1743437966_1259364_1349052729_df597ef7639c1166b6ed7eea2f0ee442_rle_crop_3741326329_0.png', 1349053478: '1743437966_1259364_1349052377_18998c6b36836f42a8c6f03891ec7ac2_rle_crop_3741326403_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/5bb433729ad5cf004981f2b207971431_92288572.png change filename to text .imagette219181471743438060/ imagette219181471743438060/1743437966_1259364_1349052729_df597ef7639c1166b6ed7eea2f0ee442_rle_crop_3741326329_0.png.png imagette219181471743438060/1743437966_1259364_1349052377_18998c6b36836f42a8c6f03891ec7ac2_rle_crop_3741326403_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/eff97a8a91e057bee2ab89f90d50b080_58214329.png imagette219181471743438060 21918143 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=21918143 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349053466: '1743437966_1259364_1349052404_d8d54abab2ba1532c9376190d5dfa4e4_rle_crop_3741326346_0.png', 1349053467: '1743437966_1259364_1349052404_d8d54abab2ba1532c9376190d5dfa4e4_rle_crop_3741326349_0.png', 1349053468: '1743437966_1259364_1349052404_d8d54abab2ba1532c9376190d5dfa4e4_rle_crop_3741326344_0.png', 1349053469: '1743437966_1259364_1349052397_f6f90e72903d9c1d565da8e2b6d37cb2_rle_crop_3741326358_0.png', 1349053470: '1743437966_1259364_1349052390_dab9d00c8a0a93409bab096a77d3173d_rle_crop_3741326375_0.png', 1349053471: '1743437966_1259364_1349052377_18998c6b36836f42a8c6f03891ec7ac2_rle_crop_3741326401_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/3ad02687837d15409d6ddaa3cc506ea8_94937954.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/b497fd691baac22611d51db39b3997d4_90394761.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/4d0607e0057816c587d651a1806726ac_91820144.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/5309d5308b522a9879a5916868bfb390_36370556.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/ac6354f63dd74ada8d764d50061e6a8d_80491674.png change filename to text .imagette219181431743438061/ imagette219181431743438061/1743437966_1259364_1349052404_d8d54abab2ba1532c9376190d5dfa4e4_rle_crop_3741326344_0.png.png imagette219181431743438061/1743437966_1259364_1349052404_d8d54abab2ba1532c9376190d5dfa4e4_rle_crop_3741326349_0.png.png imagette219181431743438061/1743437966_1259364_1349052397_f6f90e72903d9c1d565da8e2b6d37cb2_rle_crop_3741326358_0.png.png imagette219181431743438061/1743437966_1259364_1349052390_dab9d00c8a0a93409bab096a77d3173d_rle_crop_3741326375_0.png.png imagette219181431743438061/1743437966_1259364_1349052404_d8d54abab2ba1532c9376190d5dfa4e4_rle_crop_3741326346_0.png.png imagette219181431743438061/1743437966_1259364_1349052377_18998c6b36836f42a8c6f03891ec7ac2_rle_crop_3741326401_0.png.png wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/71fa05f2fb0b98d34dcc1b9e423e0f19_78018104.png imagette219181431743438061 21918144 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=21918144 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349053401: '1743437952_3692032_1349052716_026322e7674b5b1e855eec159c376803_rle_crop_3741326254_0.png', 1349053403: '1743437952_3692032_1349052716_026322e7674b5b1e855eec159c376803_rle_crop_3741326259_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/a80a6db112d8f9c35b6682ca1d618514_36147982.png change filename to text .imagette219181441743438061/ imagette219181441743438061/1743437952_3692032_1349052716_026322e7674b5b1e855eec159c376803_rle_crop_3741326259_0.png.png imagette219181441743438061/1743437952_3692032_1349052716_026322e7674b5b1e855eec159c376803_rle_crop_3741326254_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/20ebf45bfc39867d614f9bd8e3a7993d_67814971.png imagette219181441743438061 21918145 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=21918145 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349053411: '1743437952_3692032_1349052716_026322e7674b5b1e855eec159c376803_rle_crop_3741326253_0.png', 1349053474: '1743437966_1259364_1349052729_df597ef7639c1166b6ed7eea2f0ee442_rle_crop_3741326337_0.png', 1349053475: '1743437966_1259364_1349052377_18998c6b36836f42a8c6f03891ec7ac2_rle_crop_3741326409_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/0fd3e96a5d240c357331513d68d24a1d_43468158.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/ffd8f43ae15cd753d3f42a521d81e886_7157284.png change filename to text .imagette219181451743438061/ imagette219181451743438061/1743437966_1259364_1349052377_18998c6b36836f42a8c6f03891ec7ac2_rle_crop_3741326409_0.png.png imagette219181451743438061/1743437966_1259364_1349052729_df597ef7639c1166b6ed7eea2f0ee442_rle_crop_3741326337_0.png.png imagette219181451743438061/1743437952_3692032_1349052716_026322e7674b5b1e855eec159c376803_rle_crop_3741326253_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/5c66fe7c61e1534e731448c307f2aeaa_17843393.png imagette219181451743438061 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=21918094 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/21918148,21918149,21918150,21918151,21918152,21918153,21918154,21918155,21918156,21918157,21918158,21918159?tags=flou,metal,cartonnette,autre_refus,plastique,papier,environnement,Carton_gris,Teint_Dans_La_Masse,Carton_brun,mal_croppe,kraft your option no_mail is active, we will not send the real mail to your client args[1349053461] : ('0.048028956878115515',) no score found for photo 1349053461 We are sending mail with results at report@fotonower.com args[1349053458] : ('0.048028956878115515',) no score found for photo 1349053458 We are sending mail with results at report@fotonower.com args[1349053197] : ('0.048028956878115515',) no score found for photo 1349053197 We are sending mail with results at report@fotonower.com args[1349053087] : ('0.048028956878115515',) no score found for photo 1349053087 We are sending mail with results at report@fotonower.com args[1349053032] : ('0.048028956878115515',) no score found for photo 1349053032 We are sending mail with results at report@fotonower.com args[1349053003] : ('0.048028956878115515',) no score found for photo 1349053003 We are sending mail with results at report@fotonower.com args[1349052974] : ('0.048028956878115515',) no score found for photo 1349052974 We are sending mail with results at report@fotonower.com args[1349052952] : ('0.048028956878115515',) no score found for photo 1349052952 We are sending mail with results at report@fotonower.com args[1349052926] : ('0.048028956878115515',) no score found for photo 1349052926 We are sending mail with results at report@fotonower.com refus_total : 0.048028956878115515 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=21918094 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_P21918094_31-03-2025_18_21_00.pdf results_Auto_P21918094_31-03-2025_18_21_00.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21918094_31-03-2025_18_21_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','21918094','results_Auto_P21918094_31-03-2025_18_21_00.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21918094_31-03-2025_18_21_00.pdf','pdf','','0.14','0.048028956878115515') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21918094]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1349053461, 1349053458, 1349053197, 1349053087, 1349053032, 1349053003, 1349052974, 1349052952, 1349052926] map_info['map_portfolio_photo'] : {21918094: [1349053461, 1349053458, 1349053197, 1349053087, 1349053032, 1349053003, 1349052974, 1349052952, 1349052926, 1349052729, 1349052716, 1349052710, 1349052613, 1349052404, 1349052397, 1349052390, 1349052387, 1349052377]} final : False mtd_id 4302 list_pids : [1349053461, 1349053458, 1349053197, 1349053087, 1349053032, 1349053003, 1349052974, 1349052952, 1349052926] 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, '2710027') ('4302', '21918094', '1349053461', None, None, None, None, None, '2710027') ('4302', None, None, None, None, None, None, None, '2710027') ('4302', '21918094', '1349053458', None, None, None, None, None, '2710027') ('4302', None, None, None, None, None, None, None, '2710027') ('4302', '21918094', '1349053197', None, None, None, None, None, '2710027') ('4302', None, None, None, None, None, None, None, '2710027') ('4302', '21918094', '1349053087', None, None, None, None, None, '2710027') ('4302', None, None, None, None, None, None, None, '2710027') ('4302', '21918094', '1349053032', None, None, None, None, None, '2710027') ('4302', None, None, None, None, None, None, None, '2710027') ('4302', '21918094', '1349053003', None, None, None, None, None, '2710027') ('4302', None, None, None, None, None, None, None, '2710027') ('4302', '21918094', '1349052974', None, None, None, None, None, '2710027') ('4302', None, None, None, None, None, None, None, '2710027') ('4302', '21918094', '1349052952', None, None, None, None, None, '2710027') ('4302', None, None, None, None, None, None, None, '2710027') ('4302', '21918094', '1349052926', None, None, None, None, None, '2710027') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 9 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', '21918094', '1349053461', None, None, None, None, None, '2710027'), ('4302', '21918094', '1349053458', None, None, None, None, None, '2710027'), ('4302', '21918094', '1349053197', None, None, None, None, None, '2710027'), ('4302', '21918094', '1349053087', None, None, None, None, None, '2710027'), ('4302', '21918094', '1349053032', None, None, None, None, None, '2710027'), ('4302', '21918094', '1349053003', None, None, None, None, None, '2710027'), ('4302', '21918094', '1349052974', None, None, None, None, None, '2710027'), ('4302', '21918094', '1349052952', None, None, None, None, None, '2710027'), ('4302', '21918094', '1349052926', None, None, None, None, None, '2710027')] time used for this insertion : 0.014008283615112305 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.4869978427886963 time spend to save output : 0.014396905899047852 total time spend for step 4 : 2.501394748687744 step5:split_time_score Mon Mar 31 18:21: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 : ['21918094'] 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 : [('21918094',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21918094) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1349053461: {'path': 'temp/1743438060_378938_1349053461_76dfbb2c67890ecc698196829cd920ab.jpg', 'extension': 'jpg'}, 1349053197: {'path': 'temp/1743438060_378938_1349053197_3122710a80d84f4ca7a388a17167edac.jpg', 'extension': 'jpg'}, 1349053458: {'path': 'temp/1743438060_378938_1349053458_30f825f4c93cbd9cb7c99cb6a09bf0db.jpg', 'extension': 'jpg'}, 1349052974: {'path': 'temp/1743438060_378938_1349052974_be15cce198e7a9e7739cac55b03a6cdb.jpg', 'extension': 'jpg'}, 1349053003: {'path': 'temp/1743438060_378938_1349053003_144b0a1b98093fd6580f54eb68281489.jpg', 'extension': 'jpg'}, 1349053032: {'path': 'temp/1743438060_378938_1349053032_6a5e65f57c5ae42df00c3fc1a9e91072.jpg', 'extension': 'jpg'}, 1349053087: {'path': 'temp/1743438060_378938_1349053087_ee5082524e3acbc266d18e78272890f1.jpg', 'extension': 'jpg'}, 1349052926: {'path': 'temp/1743438060_378938_1349052926_3fbec5302d60312f7f61b9a8c49270d4.jpg', 'extension': 'jpg'}, 1349052952: {'path': 'temp/1743438060_378938_1349052952_06c89591cccf26a3d78c4fc3846bab06.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 = 21918094; (('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 = 21918094 group by h (('18', 18),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=21918094 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 (21918094) 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 (21918094) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 31032025 21918094 Nombre de photos uploadées : 18 / 23040 (0%) 31032025 21918094 Nombre de photos taguées (types de déchets): 0 / 18 (0%) 31032025 21918094 Nombre de photos taguées (volume) : 0 / 18 (0%) [{'photo_id': 1349052404, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/d8d54abab2ba1532c9376190d5dfa4e4.jpg', 'username': None, 'uploaded_at': 1743437767, 'text': 'image_31032025_18_15_05_10151.jpg'}, {'photo_id': 1349052397, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/f6f90e72903d9c1d565da8e2b6d37cb2.jpg', 'username': None, 'uploaded_at': 1743437767, 'text': 'image_31032025_18_15_15_10135.jpg'}, {'photo_id': 1349052390, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/dab9d00c8a0a93409bab096a77d3173d.jpg', 'username': None, 'uploaded_at': 1743437767, 'text': 'image_31032025_18_15_25_10135.jpg'}, {'photo_id': 1349052387, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/46270a52a8e05009106bc7159f240493.jpg', 'username': None, 'uploaded_at': 1743437767, 'text': 'image_31032025_18_15_34_9130.jpg'}] 0 [] elapsed_time : load_data_split_time_score 6.67572021484375e-06 elapsed_time : order_list_meta_photo_and_scores 1.9550323486328125e-05 ?????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.001249074935913086 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 21918094, '2025-03-31' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1702716,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.02259540557861328 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= 1702716 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1702716, 'dashboard_run_id': 1712041, 'mtr_portfolio_id': 21917495, 'dashboard_result_id': 9765383, '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_P21917495_31-03-2025_18_19_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 21917499, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21917500, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21917501, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21917502, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21917503, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21917504, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21917505, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21917506, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21917507, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21917508, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21917509, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21917510, 'pht': 3726}}"}, {'dashboat_entry_day': 1702716, 'dashboard_run_id': 1712041, 'mtr_portfolio_id': 21918094, 'dashboard_result_id': 9765384, '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_P21918094_31-03-2025_18_19_30.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 21918136, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21918137, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21918138, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21918139, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21918140, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21918141, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21918142, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21918143, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21918144, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21918145, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21918146, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21918147, '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 = 21917495 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': 2709988, 'mtr_portfolio_id': 21917495, 'created_at': datetime.datetime(2025, 3, 31, 18, 19), 'result': '0.04382491078363229', 'result_long': None, 'result_double': None}] Qualite : 0.04382491078363229 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21917495 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21917495_31-03-2025_18_19_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21917495 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_P21917495_31-03-2025_18_19_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 21917499, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21917500, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21917501, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21917502, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21917503, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21917504, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21917505, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21917506, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21917507, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21917508, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21917509, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21917510, 'pht': 3726}}" where mtr_portfolio_id = 21917495 and dashboard_run_id = 1712041 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`=21917495 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9765383, 0.04382491078363229, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21917495_31-03-2025_18_19_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 21917499, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21917500, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21917501, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21917502, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21917503, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21917504, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21917505, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21917506, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21917507, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21917508, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21917509, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21917510, '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 = 21918094 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': 2710027, 'mtr_portfolio_id': 21918094, 'created_at': datetime.datetime(2025, 3, 31, 18, 20, 59), 'result': '0.048028956878115515', 'result_long': None, 'result_double': None}] Qualite : 0.048028956878115515 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21918094 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21918094_31-03-2025_18_21_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21918094 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_P21918094_31-03-2025_18_21_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 21918136, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21918137, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21918138, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21918139, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21918140, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21918141, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21918142, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21918143, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21918144, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21918145, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21918146, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21918147, 'pht': 3726}}" where mtr_portfolio_id = 21918094 and dashboard_run_id = 1712041 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`=21918094 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9765384, 0.048028956878115515, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21918094_31-03-2025_18_21_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 21918136, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21918137, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21918138, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21918139, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21918140, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21918141, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21918142, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21918143, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21918144, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21918145, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21918146, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21918147, '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 (21917495,21918094) result : ((1349049159,), (1349049192,), (1349049222,), (1349049599,), (1349049614,), (1349049619,), (1349049650,), (1349049655,), (1349049658,), (1349049828,), (1349049833,), (1349049956,), (1349049964,), (1349049969,), (1349049974,), (1349050053,), (1349050061,), (1349050093,), (1349050144,), (1349050176,), (1349050182,), (1349050204,), (1349050208,), (1349050225,), (1349050228,), (1349050278,), (1349050439,), (1349050441,), (1349050444,), (1349050447,), (1349050619,), (1349050663,), (1349050699,), (1349050731,), (1349050770,), (1349050773,), (1349050884,), (1349050902,), (1349050913,), (1349050917,), (1349051030,), (1349051035,), (1349051039,), (1349051064,), (1349051076,), (1349051083,), (1349051342,), (1349051374,), (1349051392,), (1349051398,), (1349051409,), (1349051415,), (1349051573,), (1349051578,), (1349051594,), (1349051615,), (1349051645,), (1349051725,), (1349051727,), (1349051731,), (1349051734,), (1349052437,), (1349052377,), (1349052387,), (1349052390,), (1349052397,), (1349052404,), (1349052613,), (1349052710,), (1349052716,), (1349052729,), (1349052926,), (1349052952,), (1349052974,), (1349053003,), (1349053032,), (1349053087,), (1349053197,), (1349053458,), (1349053461,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'31032025': {'nb_upload': 18, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21918094]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1349053461, 1349053458, 1349053197, 1349053087, 1349053032, 1349053003, 1349052974, 1349052952, 1349052926] map_info['map_portfolio_photo'] : {21918094: [1349053461, 1349053458, 1349053197, 1349053087, 1349053032, 1349053003, 1349052974, 1349052952, 1349052926, 1349052729, 1349052716, 1349052710, 1349052613, 1349052404, 1349052397, 1349052390, 1349052387, 1349052377]} final : True mtd_id 4302 list_pids : [1349053461, 1349053458, 1349053197, 1349053087, 1349053032, 1349053003, 1349052974, 1349052952, 1349052926] Looping around the photos to save general results len do output : 1 /21918094Didn'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, '2710027') ('4302', '21918094', '1349053461', None, None, None, None, None, '2710027') ('4302', None, None, None, None, None, None, None, '2710027') ('4302', '21918094', '1349053458', None, None, None, None, None, '2710027') ('4302', None, None, None, None, None, None, None, '2710027') ('4302', '21918094', '1349053197', None, None, None, None, None, '2710027') ('4302', None, None, None, None, None, None, None, '2710027') ('4302', '21918094', '1349053087', None, None, None, None, None, '2710027') ('4302', None, None, None, None, None, None, None, '2710027') ('4302', '21918094', '1349053032', None, None, None, None, None, '2710027') ('4302', None, None, None, None, None, None, None, '2710027') ('4302', '21918094', '1349053003', None, None, None, None, None, '2710027') ('4302', None, None, None, None, None, None, None, '2710027') ('4302', '21918094', '1349052974', None, None, None, None, None, '2710027') ('4302', None, None, None, None, None, None, None, '2710027') ('4302', '21918094', '1349052952', None, None, None, None, None, '2710027') ('4302', None, None, None, None, None, None, None, '2710027') ('4302', '21918094', '1349052926', None, None, None, None, None, '2710027') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '21918094', 'None', None, None, None, None, '2710027'), ('4302', '21918094', '1349053461', None, None, None, None, None, '2710027'), ('4302', '21918094', '1349053458', None, None, None, None, None, '2710027'), ('4302', '21918094', '1349053197', None, None, None, None, None, '2710027'), ('4302', '21918094', '1349053087', None, None, None, None, None, '2710027'), ('4302', '21918094', '1349053032', None, None, None, None, None, '2710027'), ('4302', '21918094', '1349053003', None, None, None, None, None, '2710027'), ('4302', '21918094', '1349052974', None, None, None, None, None, '2710027'), ('4302', '21918094', '1349052952', None, None, None, None, None, '2710027'), ('4302', '21918094', '1349052926', None, None, None, None, None, '2710027')] time used for this insertion : 0.2702312469482422 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.23304986953735352 time spend to save output : 0.2706632614135742 total time spend for step 5 : 0.5037131309509277 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 (2710027) 2.14user 2.31system 0:07.50elapsed 59%CPU (0avgtext+0avgdata 159584maxresident)k 608inputs+8328outputs (10major+77974minor)pagefaults 0swaps