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 : 2877353 load datou : 4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! Unexpected type seems boolean for variable list_input_json ERROR or WARNING : can't parse json string Expecting value: line 1 column 1 (char 0) Tried to parse : None was removed should we ? donnée sous forme de texte was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? id de la photo (peut être local ou global) was removed should we ? donnée sous forme de texte was removed should we ? donnée sous forme de texte was removed should we ? donnée sous forme de texte was removed should we ? None was removed should we ? donnée sous forme de nombre was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? donnée sous forme de texte was removed should we ? None was removed should we ? donnée sous forme de texte was removed should we ? [ptf_id0,ptf_id1...] was removed should we ? load thcls load pdts Running datou job : batch_current 4302 [] TODO datou_current to load to do maybe to take outside batchDatouExec SELECT * from MTRPhoto.mtr_datou_current where state = 0 AND mtr_portfolio_id is not NULL AND mtd_id = 4302 order by created_at desc LIMIT 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2581903) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2581903) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20502819 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2581903'] with mtr_portfolio_ids : ['20502819'] and first list_photo_ids : [] new path : /proc/2877353/ Name: python3 Umask: 0002 State: R (running) Tgid: 2877353 Ngid: 0 Pid: 2877353 PPid: 2877352 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 2877353 NSpid: 2877353 NSpgid: 2874834 NSsid: 2874834 VmPeak: 1106840 kB VmSize: 1106840 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99828 kB VmRSS: 99828 kB RssAnon: 59752 kB RssFile: 40076 kB RssShmem: 0 kB VmData: 865592 kB VmStk: 132 kB VmExe: 2640 kB VmLib: 130468 kB VmPTE: 616 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63054 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 53 nonvoluntary_ctxt_switches: 92 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '2877353', 'Ngid': '0', 'Pid': '2877353', 'PPid': '2877352', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '2877353', 'NSpid': '2877353', 'NSpgid': '2874834', 'NSsid': '2874834', 'VmPeak': '1106840 kB', 'VmSize': '1106840 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99828 kB', 'VmRSS': '99828 kB', 'RssAnon': '59752 kB', 'RssFile': '40076 kB', 'RssShmem': '0 kB', 'VmData': '865592 kB', 'VmStk': '132 kB', 'VmExe': '2640 kB', 'VmLib': '130468 kB', 'VmPTE': '616 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63054', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '53', 'nonvoluntary_ctxt_switches': '92'} ('datou_batch_current', '2877353', '1106840', '0', '1106840', '865592', '99828', b'', 'marlene', '2581903') 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 (20502819) 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 (2581903 ) ) 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 (20502819) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1337300083, 'portfolio_id': 20502819}, {'photo_id': 1337300075, 'portfolio_id': 20502819}, {'photo_id': 1337300054, 'portfolio_id': 20502819}, {'photo_id': 1337300048, 'portfolio_id': 20502819}, {'photo_id': 1337300007, 'portfolio_id': 20502819}, {'photo_id': 1337300004, 'portfolio_id': 20502819}, {'photo_id': 1337300001, 'portfolio_id': 20502819}, {'photo_id': 1337299970, 'portfolio_id': 20502819}, {'photo_id': 1337299787, 'portfolio_id': 20502819}, {'photo_id': 1337299783, 'portfolio_id': 20502819}, {'photo_id': 1337299780, 'portfolio_id': 20502819}, {'photo_id': 1337299647, 'portfolio_id': 20502819}, {'photo_id': 1337299633, 'portfolio_id': 20502819}, {'photo_id': 1337299571, 'portfolio_id': 20502819}, {'photo_id': 1337299568, 'portfolio_id': 20502819}, {'photo_id': 1337299566, 'portfolio_id': 20502819}, {'photo_id': 1337299516, 'portfolio_id': 20502819}, {'photo_id': 1337299513, 'portfolio_id': 20502819}, {'photo_id': 1337299428, 'portfolio_id': 20502819}, {'photo_id': 1337299229, 'portfolio_id': 20502819}, {'photo_id': 1337299225, 'portfolio_id': 20502819}, {'photo_id': 1337299223, 'portfolio_id': 20502819}, {'photo_id': 1337299190, 'portfolio_id': 20502819}, {'photo_id': 1337299153, 'portfolio_id': 20502819}, {'photo_id': 1337299138, 'portfolio_id': 20502819}, {'photo_id': 1337298778, 'portfolio_id': 20502819}, {'photo_id': 1337298775, 'portfolio_id': 20502819}, {'photo_id': 1337298744, 'portfolio_id': 20502819}, {'photo_id': 1337298662, 'portfolio_id': 20502819}, {'photo_id': 1337298631, 'portfolio_id': 20502819}, {'photo_id': 1337298628, 'portfolio_id': 20502819}, {'photo_id': 1337298566, 'portfolio_id': 20502819}, {'photo_id': 1337298564, 'portfolio_id': 20502819}, {'photo_id': 1337298561, 'portfolio_id': 20502819}, {'photo_id': 1337298558, 'portfolio_id': 20502819}, {'photo_id': 1337298556, 'portfolio_id': 20502819}, {'photo_id': 1337298324, 'portfolio_id': 20502819}, {'photo_id': 1337298316, 'portfolio_id': 20502819}, {'photo_id': 1337298311, 'portfolio_id': 20502819}, {'photo_id': 1337298308, 'portfolio_id': 20502819}, {'photo_id': 1337298305, 'portfolio_id': 20502819}, {'photo_id': 1337298298, 'portfolio_id': 20502819}, {'photo_id': 1337298093, 'portfolio_id': 20502819}, {'photo_id': 1337298090, 'portfolio_id': 20502819}, {'photo_id': 1337298088, 'portfolio_id': 20502819}, {'photo_id': 1337298064, 'portfolio_id': 20502819}] map_portfolio_id_photo_id: {20502819: [1337300083, 1337300075, 1337300054, 1337300048, 1337300007, 1337300004, 1337300001, 1337299970, 1337299787, 1337299783, 1337299780, 1337299647, 1337299633, 1337299571, 1337299568, 1337299566, 1337299516, 1337299513, 1337299428, 1337299229, 1337299225, 1337299223, 1337299190, 1337299153, 1337299138, 1337298778, 1337298775, 1337298744, 1337298662, 1337298631, 1337298628, 1337298566, 1337298564, 1337298561, 1337298558, 1337298556, 1337298324, 1337298316, 1337298311, 1337298308, 1337298305, 1337298298, 1337298093, 1337298090, 1337298088, 1337298064]} ##### 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.014539003372192383 #### 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 Thu Feb 13 08:30:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20502819) 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 : 20502819 get user id for portfolio 20502819 get sub ptf for main ptf 20502819, type 3726 and hashtags ['kraft', 'cartonnette', 'metal', 'Carton_brun', 'autre_refus', 'Carton_gris', 'papier', 'mal_croppe', 'plastique', 'flou', 'Teint_Dans_La_Masse', 'environnement'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=20502819 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','cartonnette','metal','Carton_brun','autre_refus','Carton_gris','papier','mal_croppe','plastique','flou','Teint_Dans_La_Masse','environnement')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=20502819 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','cartonnette','metal','Carton_brun','autre_refus','Carton_gris','papier','mal_croppe','plastique','flou','Teint_Dans_La_Masse','environnement')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_gris': {'main_port_id': 20502819, 'sub_port_id': 20502893, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13171811, 'last_updated_at': datetime.datetime(2025, 2, 13, 8, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 13, 8, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 13, 8, 19, 27)}, 'papier': {'main_port_id': 20502819, 'sub_port_id': 20502894, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13171812, 'last_updated_at': datetime.datetime(2025, 2, 13, 8, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 13, 8, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 13, 8, 19, 27)}, 'mal_croppe': {'main_port_id': 20502819, 'sub_port_id': 20502895, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13171813, 'last_updated_at': datetime.datetime(2025, 2, 13, 8, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 13, 8, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 13, 8, 19, 27)}, 'Teint_Dans_La_Masse': {'main_port_id': 20502819, 'sub_port_id': 20502896, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13171814, 'last_updated_at': datetime.datetime(2025, 2, 13, 8, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 13, 8, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 13, 8, 19, 27)}, 'kraft': {'main_port_id': 20502819, 'sub_port_id': 20502897, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13171815, 'last_updated_at': datetime.datetime(2025, 2, 13, 8, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 13, 8, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 13, 8, 19, 27)}, 'environnement': {'main_port_id': 20502819, 'sub_port_id': 20502898, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13171816, 'last_updated_at': datetime.datetime(2025, 2, 13, 8, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 13, 8, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 13, 8, 19, 27)}, 'plastique': {'main_port_id': 20502819, 'sub_port_id': 20502899, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13171817, 'last_updated_at': datetime.datetime(2025, 2, 13, 8, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 13, 8, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 13, 8, 19, 27)}, 'cartonnette': {'main_port_id': 20502819, 'sub_port_id': 20502900, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13171818, 'last_updated_at': datetime.datetime(2025, 2, 13, 8, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 13, 8, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 13, 8, 19, 27)}, 'flou': {'main_port_id': 20502819, 'sub_port_id': 20502901, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13171819, 'last_updated_at': datetime.datetime(2025, 2, 13, 8, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 13, 8, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 13, 8, 19, 27)}, 'autre_refus': {'main_port_id': 20502819, 'sub_port_id': 20502902, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13171820, 'last_updated_at': datetime.datetime(2025, 2, 13, 8, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 13, 8, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 13, 8, 19, 27)}, 'Carton_brun': {'main_port_id': 20502819, 'sub_port_id': 20502903, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13171821, 'last_updated_at': datetime.datetime(2025, 2, 13, 8, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 13, 8, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 13, 8, 19, 27)}, 'metal': {'main_port_id': 20502819, 'sub_port_id': 20502904, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13171822, 'last_updated_at': datetime.datetime(2025, 2, 13, 8, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 13, 8, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 13, 8, 19, 27)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20502893 , 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=20502819 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 (20502893) result : ((1337299514,), (1337299613,), (1337299690,), (1337299957,), (1337300036,), (1337300049,), (1337300050,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20502819) result : ((1337298064,), (1337298088,), (1337298090,), (1337298093,), (1337298298,), (1337298305,), (1337298308,), (1337298311,), (1337298316,), (1337298324,), (1337298556,), (1337298558,), (1337298561,), (1337298564,), (1337298566,), (1337298628,), (1337298631,), (1337298662,), (1337298744,), (1337298775,), (1337298778,), (1337299138,), (1337299153,), (1337299190,), (1337299223,), (1337299225,), (1337299229,), (1337299428,), (1337299513,), (1337299516,), (1337299566,), (1337299568,), (1337299571,), (1337299633,), (1337299647,), (1337299780,), (1337299783,), (1337299787,), (1337299970,), (1337300001,), (1337300004,), (1337300007,), (1337300048,), (1337300054,), (1337300075,), (1337300083,)) 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 20502894 , 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=20502819 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 (20502894) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20502819) result : ((1337298064,), (1337298088,), (1337298090,), (1337298093,), (1337298298,), (1337298305,), (1337298308,), (1337298311,), (1337298316,), (1337298324,), (1337298556,), (1337298558,), (1337298561,), (1337298564,), (1337298566,), (1337298628,), (1337298631,), (1337298662,), (1337298744,), (1337298775,), (1337298778,), (1337299138,), (1337299153,), (1337299190,), (1337299223,), (1337299225,), (1337299229,), (1337299428,), (1337299513,), (1337299516,), (1337299566,), (1337299568,), (1337299571,), (1337299633,), (1337299647,), (1337299780,), (1337299783,), (1337299787,), (1337299970,), (1337300001,), (1337300004,), (1337300007,), (1337300048,), (1337300054,), (1337300075,), (1337300083,)) 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 20502895 , 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=20502819 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 (20502895) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20502819) result : ((1337298064,), (1337298088,), (1337298090,), (1337298093,), (1337298298,), (1337298305,), (1337298308,), (1337298311,), (1337298316,), (1337298324,), (1337298556,), (1337298558,), (1337298561,), (1337298564,), (1337298566,), (1337298628,), (1337298631,), (1337298662,), (1337298744,), (1337298775,), (1337298778,), (1337299138,), (1337299153,), (1337299190,), (1337299223,), (1337299225,), (1337299229,), (1337299428,), (1337299513,), (1337299516,), (1337299566,), (1337299568,), (1337299571,), (1337299633,), (1337299647,), (1337299780,), (1337299783,), (1337299787,), (1337299970,), (1337300001,), (1337300004,), (1337300007,), (1337300048,), (1337300054,), (1337300075,), (1337300083,)) 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 20502896 , 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=20502819 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 (20502896) result : ((1337299276,), (1337299473,), (1337299711,), (1337299712,), (1337299954,), (1337299955,), (1337299956,), (1337300033,), (1337300034,), (1337300035,), (1337300046,), (1337300047,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20502819) result : ((1337298064,), (1337298088,), (1337298090,), (1337298093,), (1337298298,), (1337298305,), (1337298308,), (1337298311,), (1337298316,), (1337298324,), (1337298556,), (1337298558,), (1337298561,), (1337298564,), (1337298566,), (1337298628,), (1337298631,), (1337298662,), (1337298744,), (1337298775,), (1337298778,), (1337299138,), (1337299153,), (1337299190,), (1337299223,), (1337299225,), (1337299229,), (1337299428,), (1337299513,), (1337299516,), (1337299566,), (1337299568,), (1337299571,), (1337299633,), (1337299647,), (1337299780,), (1337299783,), (1337299787,), (1337299970,), (1337300001,), (1337300004,), (1337300007,), (1337300048,), (1337300054,), (1337300075,), (1337300083,)) 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 20502897 , 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=20502819 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 (20502897) result : ((1337299704,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20502819) result : ((1337298064,), (1337298088,), (1337298090,), (1337298093,), (1337298298,), (1337298305,), (1337298308,), (1337298311,), (1337298316,), (1337298324,), (1337298556,), (1337298558,), (1337298561,), (1337298564,), (1337298566,), (1337298628,), (1337298631,), (1337298662,), (1337298744,), (1337298775,), (1337298778,), (1337299138,), (1337299153,), (1337299190,), (1337299223,), (1337299225,), (1337299229,), (1337299428,), (1337299513,), (1337299516,), (1337299566,), (1337299568,), (1337299571,), (1337299633,), (1337299647,), (1337299780,), (1337299783,), (1337299787,), (1337299970,), (1337300001,), (1337300004,), (1337300007,), (1337300048,), (1337300054,), (1337300075,), (1337300083,)) 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 20502898 , 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=20502819 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 (20502898) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20502819) result : ((1337298064,), (1337298088,), (1337298090,), (1337298093,), (1337298298,), (1337298305,), (1337298308,), (1337298311,), (1337298316,), (1337298324,), (1337298556,), (1337298558,), (1337298561,), (1337298564,), (1337298566,), (1337298628,), (1337298631,), (1337298662,), (1337298744,), (1337298775,), (1337298778,), (1337299138,), (1337299153,), (1337299190,), (1337299223,), (1337299225,), (1337299229,), (1337299428,), (1337299513,), (1337299516,), (1337299566,), (1337299568,), (1337299571,), (1337299633,), (1337299647,), (1337299780,), (1337299783,), (1337299787,), (1337299970,), (1337300001,), (1337300004,), (1337300007,), (1337300048,), (1337300054,), (1337300075,), (1337300083,)) 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 20502899 , 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=20502819 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 (20502899) result : ((1337299208,), (1337299278,), (1337299614,), (1337299961,), (1337299962,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20502819) result : ((1337298064,), (1337298088,), (1337298090,), (1337298093,), (1337298298,), (1337298305,), (1337298308,), (1337298311,), (1337298316,), (1337298324,), (1337298556,), (1337298558,), (1337298561,), (1337298564,), (1337298566,), (1337298628,), (1337298631,), (1337298662,), (1337298744,), (1337298775,), (1337298778,), (1337299138,), (1337299153,), (1337299190,), (1337299223,), (1337299225,), (1337299229,), (1337299428,), (1337299513,), (1337299516,), (1337299566,), (1337299568,), (1337299571,), (1337299633,), (1337299647,), (1337299780,), (1337299783,), (1337299787,), (1337299970,), (1337300001,), (1337300004,), (1337300007,), (1337300048,), (1337300054,), (1337300075,), (1337300083,)) 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 20502900 , 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=20502819 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 (20502900) result : ((1337299207,), (1337299277,), (1337299715,), (1337300037,), (1337300038,), (1337300051,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20502819) result : ((1337298064,), (1337298088,), (1337298090,), (1337298093,), (1337298298,), (1337298305,), (1337298308,), (1337298311,), (1337298316,), (1337298324,), (1337298556,), (1337298558,), (1337298561,), (1337298564,), (1337298566,), (1337298628,), (1337298631,), (1337298662,), (1337298744,), (1337298775,), (1337298778,), (1337299138,), (1337299153,), (1337299190,), (1337299223,), (1337299225,), (1337299229,), (1337299428,), (1337299513,), (1337299516,), (1337299566,), (1337299568,), (1337299571,), (1337299633,), (1337299647,), (1337299780,), (1337299783,), (1337299787,), (1337299970,), (1337300001,), (1337300004,), (1337300007,), (1337300048,), (1337300054,), (1337300075,), (1337300083,)) 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 20502901 , 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=20502819 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 (20502901) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20502819) result : ((1337298064,), (1337298088,), (1337298090,), (1337298093,), (1337298298,), (1337298305,), (1337298308,), (1337298311,), (1337298316,), (1337298324,), (1337298556,), (1337298558,), (1337298561,), (1337298564,), (1337298566,), (1337298628,), (1337298631,), (1337298662,), (1337298744,), (1337298775,), (1337298778,), (1337299138,), (1337299153,), (1337299190,), (1337299223,), (1337299225,), (1337299229,), (1337299428,), (1337299513,), (1337299516,), (1337299566,), (1337299568,), (1337299571,), (1337299633,), (1337299647,), (1337299780,), (1337299783,), (1337299787,), (1337299970,), (1337300001,), (1337300004,), (1337300007,), (1337300048,), (1337300054,), (1337300075,), (1337300083,)) 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 20502902 , 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=20502819 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 (20502902) result : ((1337299167,), (1337299206,), (1337299504,), (1337299505,), (1337299713,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20502819) result : ((1337298064,), (1337298088,), (1337298090,), (1337298093,), (1337298298,), (1337298305,), (1337298308,), (1337298311,), (1337298316,), (1337298324,), (1337298556,), (1337298558,), (1337298561,), (1337298564,), (1337298566,), (1337298628,), (1337298631,), (1337298662,), (1337298744,), (1337298775,), (1337298778,), (1337299138,), (1337299153,), (1337299190,), (1337299223,), (1337299225,), (1337299229,), (1337299428,), (1337299513,), (1337299516,), (1337299566,), (1337299568,), (1337299571,), (1337299633,), (1337299647,), (1337299780,), (1337299783,), (1337299787,), (1337299970,), (1337300001,), (1337300004,), (1337300007,), (1337300048,), (1337300054,), (1337300075,), (1337300083,)) 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 20502903 , 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=20502819 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 (20502903) result : ((1337299515,), (1337299523,), (1337299703,), (1337299958,), (1337299959,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20502819) result : ((1337298064,), (1337298088,), (1337298090,), (1337298093,), (1337298298,), (1337298305,), (1337298308,), (1337298311,), (1337298316,), (1337298324,), (1337298556,), (1337298558,), (1337298561,), (1337298564,), (1337298566,), (1337298628,), (1337298631,), (1337298662,), (1337298744,), (1337298775,), (1337298778,), (1337299138,), (1337299153,), (1337299190,), (1337299223,), (1337299225,), (1337299229,), (1337299428,), (1337299513,), (1337299516,), (1337299566,), (1337299568,), (1337299571,), (1337299633,), (1337299647,), (1337299780,), (1337299783,), (1337299787,), (1337299970,), (1337300001,), (1337300004,), (1337300007,), (1337300048,), (1337300054,), (1337300075,), (1337300083,)) 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 20502904 , 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=20502819 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 (20502904) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20502819) result : ((1337298064,), (1337298088,), (1337298090,), (1337298093,), (1337298298,), (1337298305,), (1337298308,), (1337298311,), (1337298316,), (1337298324,), (1337298556,), (1337298558,), (1337298561,), (1337298564,), (1337298566,), (1337298628,), (1337298631,), (1337298662,), (1337298744,), (1337298775,), (1337298778,), (1337299138,), (1337299153,), (1337299190,), (1337299223,), (1337299225,), (1337299229,), (1337299428,), (1337299513,), (1337299516,), (1337299566,), (1337299568,), (1337299571,), (1337299633,), (1337299647,), (1337299780,), (1337299783,), (1337299787,), (1337299970,), (1337300001,), (1337300004,), (1337300007,), (1337300048,), (1337300054,), (1337300075,), (1337300083,)) 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`=20502819 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','cartonnette','metal','Carton_brun','autre_refus','Carton_gris','papier','mal_croppe','plastique','flou','Teint_Dans_La_Masse','environnement')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=20502819 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','cartonnette','metal','Carton_brun','autre_refus','Carton_gris','papier','mal_croppe','plastique','flou','Teint_Dans_La_Masse','environnement')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_gris': {'main_port_id': 20502819, 'sub_port_id': 20502905, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13171823, 'last_updated_at': datetime.datetime(2025, 2, 13, 8, 19, 28), 'last_updated_at_desc': datetime.datetime(2025, 2, 13, 8, 19, 28), 'last_updated_at_asc': datetime.datetime(2025, 2, 13, 8, 19, 28)}, 'papier': {'main_port_id': 20502819, 'sub_port_id': 20502906, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13171824, 'last_updated_at': datetime.datetime(2025, 2, 13, 8, 19, 28), 'last_updated_at_desc': datetime.datetime(2025, 2, 13, 8, 19, 28), 'last_updated_at_asc': datetime.datetime(2025, 2, 13, 8, 19, 28)}, 'mal_croppe': {'main_port_id': 20502819, 'sub_port_id': 20502907, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13171825, 'last_updated_at': datetime.datetime(2025, 2, 13, 8, 19, 28), 'last_updated_at_desc': datetime.datetime(2025, 2, 13, 8, 19, 28), 'last_updated_at_asc': datetime.datetime(2025, 2, 13, 8, 19, 28)}, 'Teint_Dans_La_Masse': {'main_port_id': 20502819, 'sub_port_id': 20502908, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13171826, 'last_updated_at': datetime.datetime(2025, 2, 13, 8, 19, 28), 'last_updated_at_desc': datetime.datetime(2025, 2, 13, 8, 19, 28), 'last_updated_at_asc': datetime.datetime(2025, 2, 13, 8, 19, 28)}, 'kraft': {'main_port_id': 20502819, 'sub_port_id': 20502909, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13171827, 'last_updated_at': datetime.datetime(2025, 2, 13, 8, 19, 28), 'last_updated_at_desc': datetime.datetime(2025, 2, 13, 8, 19, 28), 'last_updated_at_asc': datetime.datetime(2025, 2, 13, 8, 19, 28)}, 'environnement': {'main_port_id': 20502819, 'sub_port_id': 20502910, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13171828, 'last_updated_at': datetime.datetime(2025, 2, 13, 8, 19, 28), 'last_updated_at_desc': datetime.datetime(2025, 2, 13, 8, 19, 28), 'last_updated_at_asc': datetime.datetime(2025, 2, 13, 8, 19, 28)}, 'plastique': {'main_port_id': 20502819, 'sub_port_id': 20502911, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13171829, 'last_updated_at': datetime.datetime(2025, 2, 13, 8, 19, 28), 'last_updated_at_desc': datetime.datetime(2025, 2, 13, 8, 19, 28), 'last_updated_at_asc': datetime.datetime(2025, 2, 13, 8, 19, 28)}, 'cartonnette': {'main_port_id': 20502819, 'sub_port_id': 20502912, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13171830, 'last_updated_at': datetime.datetime(2025, 2, 13, 8, 19, 28), 'last_updated_at_desc': datetime.datetime(2025, 2, 13, 8, 19, 28), 'last_updated_at_asc': datetime.datetime(2025, 2, 13, 8, 19, 28)}, 'flou': {'main_port_id': 20502819, 'sub_port_id': 20502913, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13171831, 'last_updated_at': datetime.datetime(2025, 2, 13, 8, 19, 28), 'last_updated_at_desc': datetime.datetime(2025, 2, 13, 8, 19, 28), 'last_updated_at_asc': datetime.datetime(2025, 2, 13, 8, 19, 28)}, 'autre_refus': {'main_port_id': 20502819, 'sub_port_id': 20502914, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13171832, 'last_updated_at': datetime.datetime(2025, 2, 13, 8, 19, 28), 'last_updated_at_desc': datetime.datetime(2025, 2, 13, 8, 19, 28), 'last_updated_at_asc': datetime.datetime(2025, 2, 13, 8, 19, 28)}, 'Carton_brun': {'main_port_id': 20502819, 'sub_port_id': 20502915, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13171833, 'last_updated_at': datetime.datetime(2025, 2, 13, 8, 19, 28), 'last_updated_at_desc': datetime.datetime(2025, 2, 13, 8, 19, 28), 'last_updated_at_asc': datetime.datetime(2025, 2, 13, 8, 19, 28)}, 'metal': {'main_port_id': 20502819, 'sub_port_id': 20502916, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13171834, 'last_updated_at': datetime.datetime(2025, 2, 13, 8, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 13, 8, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 13, 8, 19, 28)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20502905,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20502893 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20502906,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20502894 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20502907,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20502895 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20502908,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20502896 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20502909,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20502897 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20502910,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20502898 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20502911,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20502899 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20502912,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20502900 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20502913,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20502901 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20502914,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20502902 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20502915,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20502903 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20502916,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20502904 lien utilise dans velours : https://www.fotonower.com/velours/20502905,20502906,20502907,20502908,20502909,20502910,20502911,20502912,20502913,20502914,20502915,20502916?tags=Carton_gris,papier,mal_croppe,Teint_Dans_La_Masse,kraft,environnement,plastique,cartonnette,flou,autre_refus,Carton_brun,metal After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20502819]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1337300083, 1337300075, 1337300054, 1337300048, 1337300007, 1337300004, 1337300001] map_info['map_portfolio_photo'] : {20502819: [1337300083, 1337300075, 1337300054, 1337300048, 1337300007, 1337300004, 1337300001, 1337299970, 1337299787, 1337299783, 1337299780, 1337299647, 1337299633, 1337299571, 1337299568, 1337299566, 1337299516, 1337299513, 1337299428, 1337299229, 1337299225, 1337299223, 1337299190, 1337299153, 1337299138, 1337298778, 1337298775, 1337298744, 1337298662, 1337298631, 1337298628, 1337298566, 1337298564, 1337298561, 1337298558, 1337298556, 1337298324, 1337298316, 1337298311, 1337298308, 1337298305, 1337298298, 1337298093, 1337298090, 1337298088, 1337298064]} final : False mtd_id 4302 list_pids : [1337300083, 1337300075, 1337300054, 1337300048, 1337300007, 1337300004, 1337300001] Looping around the photos to save general results len do output : 1 /20502819. 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, '2581903') ('4302', '20502819', '1337300083', None, None, None, None, None, '2581903') ('4302', None, None, None, None, None, None, None, '2581903') ('4302', '20502819', '1337300075', None, None, None, None, None, '2581903') ('4302', None, None, None, None, None, None, None, '2581903') ('4302', '20502819', '1337300054', None, None, None, None, None, '2581903') ('4302', None, None, None, None, None, None, None, '2581903') ('4302', '20502819', '1337300048', None, None, None, None, None, '2581903') ('4302', None, None, None, None, None, None, None, '2581903') ('4302', '20502819', '1337300007', None, None, None, None, None, '2581903') ('4302', None, None, None, None, None, None, None, '2581903') ('4302', '20502819', '1337300004', None, None, None, None, None, '2581903') ('4302', None, None, None, None, None, None, None, '2581903') ('4302', '20502819', '1337300001', None, None, None, None, None, '2581903') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 8 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, '20502819', "{'Carton_gris': 20502893, 'papier': 20502894, 'mal_croppe': 20502895, 'Teint_Dans_La_Masse': 20502896, 'kraft': 20502897, 'environnement': 20502898, 'plastique': 20502899, 'cartonnette': 20502900, 'flou': 20502901, 'autre_refus': 20502902, 'Carton_brun': 20502903, 'metal': 20502904}", None, None, None, None, '2581903'), ('4302', '20502819', '1337300083', None, None, None, None, None, '2581903'), ('4302', '20502819', '1337300075', None, None, None, None, None, '2581903'), ('4302', '20502819', '1337300054', None, None, None, None, None, '2581903'), ('4302', '20502819', '1337300048', None, None, None, None, None, '2581903'), ('4302', '20502819', '1337300007', None, None, None, None, None, '2581903'), ('4302', '20502819', '1337300004', None, None, None, None, None, '2581903'), ('4302', '20502819', '1337300001', None, None, None, None, None, '2581903')] time used for this insertion : 0.01305389404296875 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.3641715049743652 time spend to save output : 0.013255596160888672 total time spend for step 1 : 1.377427101135254 step2:final Thu Feb 13 08:31:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20502819) 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 20502819 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1337298093,1337298090,1337298088,1337298064,1337298324,1337298316,1337298311,1337298308,1337298305,1337298298,1337298566,1337298564,1337298561,1337298558,1337298556,1337298631,1337298628,1337298744,1337298662,1337298778,1337298775,1337299190,1337299153,1337299138,1337299229,1337299225,1337299223,1337299516,1337299513,1337299428,1337299571,1337299568,1337299566,1337299647,1337299633,1337299787,1337299783,1337299780,1337299970,1337300007,1337300004,1337300001,1337300083,1337300075,1337300054,1337300048); 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([20502819]) Inside saveOutput : final : False verbose : True original output for save of step final : {1337300083: ('0.037797198356358266',), 1337300075: ('0.037797198356358266',), 1337300054: ('0.037797198356358266',), 1337300048: ('0.037797198356358266',), 1337300007: ('0.037797198356358266',), 1337300004: ('0.037797198356358266',), 1337300001: ('0.037797198356358266',)} new output for save of step final : {1337300083: ('0.037797198356358266',), 1337300075: ('0.037797198356358266',), 1337300054: ('0.037797198356358266',), 1337300048: ('0.037797198356358266',), 1337300007: ('0.037797198356358266',), 1337300004: ('0.037797198356358266',), 1337300001: ('0.037797198356358266',)} [1337300083, 1337300075, 1337300054, 1337300048, 1337300007, 1337300004, 1337300001] map_info['map_portfolio_photo'] : {20502819: [1337300083, 1337300075, 1337300054, 1337300048, 1337300007, 1337300004, 1337300001, 1337299970, 1337299787, 1337299783, 1337299780, 1337299647, 1337299633, 1337299571, 1337299568, 1337299566, 1337299516, 1337299513, 1337299428, 1337299229, 1337299225, 1337299223, 1337299190, 1337299153, 1337299138, 1337298778, 1337298775, 1337298744, 1337298662, 1337298631, 1337298628, 1337298566, 1337298564, 1337298561, 1337298558, 1337298556, 1337298324, 1337298316, 1337298311, 1337298308, 1337298305, 1337298298, 1337298093, 1337298090, 1337298088, 1337298064]} final : False mtd_id 4302 list_pids : [1337300083, 1337300075, 1337300054, 1337300048, 1337300007, 1337300004, 1337300001] Looping around the photos to save general results len do output : 7 /1337300083.Didn't retrieve data . /1337300075.Didn't retrieve data . /1337300054.Didn't retrieve data . /1337300048.Didn't retrieve data . /1337300007.Didn't retrieve data . /1337300004.Didn't retrieve data . /1337300001.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, '2581903') ('4302', '20502819', '1337300083', None, None, None, None, None, '2581903') ('4302', None, None, None, None, None, None, None, '2581903') ('4302', '20502819', '1337300075', None, None, None, None, None, '2581903') ('4302', None, None, None, None, None, None, None, '2581903') ('4302', '20502819', '1337300054', None, None, None, None, None, '2581903') ('4302', None, None, None, None, None, None, None, '2581903') ('4302', '20502819', '1337300048', None, None, None, None, None, '2581903') ('4302', None, None, None, None, None, None, None, '2581903') ('4302', '20502819', '1337300007', None, None, None, None, None, '2581903') ('4302', None, None, None, None, None, None, None, '2581903') ('4302', '20502819', '1337300004', None, None, None, None, None, '2581903') ('4302', None, None, None, None, None, None, None, '2581903') ('4302', '20502819', '1337300001', None, None, None, None, None, '2581903') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 21 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', '20502819', '1337300083', '0.037797198356358266', None, None, None, None, '2581903'), ('4302', '20502819', '1337300075', '0.037797198356358266', None, None, None, None, '2581903'), ('4302', '20502819', '1337300054', '0.037797198356358266', None, None, None, None, '2581903'), ('4302', '20502819', '1337300048', '0.037797198356358266', None, None, None, None, '2581903'), ('4302', '20502819', '1337300007', '0.037797198356358266', None, None, None, None, '2581903'), ('4302', '20502819', '1337300004', '0.037797198356358266', None, None, None, None, '2581903'), ('4302', '20502819', '1337300001', '0.037797198356358266', None, None, None, None, '2581903')] time used for this insertion : 0.012337207794189453 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06612944602966309 time spend to save output : 0.012744903564453125 total time spend for step 2 : 0.07887434959411621 step3:velours_tree Thu Feb 13 08:31:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {20502819: [{'Carton_gris': 20502893, 'papier': 20502894, 'mal_croppe': 20502895, 'Teint_Dans_La_Masse': 20502896, 'kraft': 20502897, 'environnement': 20502898, 'plastique': 20502899, 'cartonnette': 20502900, 'flou': 20502901, 'autre_refus': 20502902, 'Carton_brun': 20502903, 'metal': 20502904}]} input_args_next_step : {20502819: ()} output_args : {20502819: [{'Carton_gris': 20502893, 'papier': 20502894, 'mal_croppe': 20502895, 'Teint_Dans_La_Masse': 20502896, 'kraft': 20502897, 'environnement': 20502898, 'plastique': 20502899, 'cartonnette': 20502900, 'flou': 20502901, 'autre_refus': 20502902, 'Carton_brun': 20502903, 'metal': 20502904}]} args : 20502819 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'Carton_gris': 20502893, 'papier': 20502894, 'mal_croppe': 20502895, 'Teint_Dans_La_Masse': 20502896, 'kraft': 20502897, 'environnement': 20502898, 'plastique': 20502899, 'cartonnette': 20502900, 'flou': 20502901, 'autre_refus': 20502902, 'Carton_brun': 20502903, 'metal': 20502904},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20502819) 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([20502819]) 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.3094949722290039 time spend to save output : 5.412101745605469e-05 total time spend for step 3 : 0.30954909324645996 step4:send_mail_cod Thu Feb 13 08:31:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1337300083: ('0.037797198356358266',), 1337300075: ('0.037797198356358266',), 1337300054: ('0.037797198356358266',), 1337300048: ('0.037797198356358266',), 1337300007: ('0.037797198356358266',), 1337300004: ('0.037797198356358266',), 1337300001: ('0.037797198356358266',)} input_args_next_step : {1337300083: ()} output_args : {1337300083: ('0.037797198356358266',), 1337300075: ('0.037797198356358266',), 1337300054: ('0.037797198356358266',), 1337300048: ('0.037797198356358266',), 1337300007: ('0.037797198356358266',), 1337300004: ('0.037797198356358266',), 1337300001: ('0.037797198356358266',)} args : 1337300083 depend.output_id : 0 input_args_next_step : {1337300083: ('0.037797198356358266',), 1337300075: ()} output_args : {1337300083: ('0.037797198356358266',), 1337300075: ('0.037797198356358266',), 1337300054: ('0.037797198356358266',), 1337300048: ('0.037797198356358266',), 1337300007: ('0.037797198356358266',), 1337300004: ('0.037797198356358266',), 1337300001: ('0.037797198356358266',)} args : 1337300075 depend.output_id : 0 input_args_next_step : {1337300083: ('0.037797198356358266',), 1337300075: ('0.037797198356358266',), 1337300054: ()} output_args : {1337300083: ('0.037797198356358266',), 1337300075: ('0.037797198356358266',), 1337300054: ('0.037797198356358266',), 1337300048: ('0.037797198356358266',), 1337300007: ('0.037797198356358266',), 1337300004: ('0.037797198356358266',), 1337300001: ('0.037797198356358266',)} args : 1337300054 depend.output_id : 0 input_args_next_step : {1337300083: ('0.037797198356358266',), 1337300075: ('0.037797198356358266',), 1337300054: ('0.037797198356358266',), 1337300048: ()} output_args : {1337300083: ('0.037797198356358266',), 1337300075: ('0.037797198356358266',), 1337300054: ('0.037797198356358266',), 1337300048: ('0.037797198356358266',), 1337300007: ('0.037797198356358266',), 1337300004: ('0.037797198356358266',), 1337300001: ('0.037797198356358266',)} args : 1337300048 depend.output_id : 0 input_args_next_step : {1337300083: ('0.037797198356358266',), 1337300075: ('0.037797198356358266',), 1337300054: ('0.037797198356358266',), 1337300048: ('0.037797198356358266',), 1337300007: ()} output_args : {1337300083: ('0.037797198356358266',), 1337300075: ('0.037797198356358266',), 1337300054: ('0.037797198356358266',), 1337300048: ('0.037797198356358266',), 1337300007: ('0.037797198356358266',), 1337300004: ('0.037797198356358266',), 1337300001: ('0.037797198356358266',)} args : 1337300007 depend.output_id : 0 input_args_next_step : {1337300083: ('0.037797198356358266',), 1337300075: ('0.037797198356358266',), 1337300054: ('0.037797198356358266',), 1337300048: ('0.037797198356358266',), 1337300007: ('0.037797198356358266',), 1337300004: ()} output_args : {1337300083: ('0.037797198356358266',), 1337300075: ('0.037797198356358266',), 1337300054: ('0.037797198356358266',), 1337300048: ('0.037797198356358266',), 1337300007: ('0.037797198356358266',), 1337300004: ('0.037797198356358266',), 1337300001: ('0.037797198356358266',)} args : 1337300004 depend.output_id : 0 input_args_next_step : {1337300083: ('0.037797198356358266',), 1337300075: ('0.037797198356358266',), 1337300054: ('0.037797198356358266',), 1337300048: ('0.037797198356358266',), 1337300007: ('0.037797198356358266',), 1337300004: ('0.037797198356358266',), 1337300001: ()} output_args : {1337300083: ('0.037797198356358266',), 1337300075: ('0.037797198356358266',), 1337300054: ('0.037797198356358266',), 1337300048: ('0.037797198356358266',), 1337300007: ('0.037797198356358266',), 1337300004: ('0.037797198356358266',), 1337300001: ('0.037797198356358266',)} args : 1337300001 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 : {20502819: [{'Carton_gris': 20502893, 'papier': 20502894, 'mal_croppe': 20502895, 'Teint_Dans_La_Masse': 20502896, 'kraft': 20502897, 'environnement': 20502898, 'plastique': 20502899, 'cartonnette': 20502900, 'flou': 20502901, 'autre_refus': 20502902, 'Carton_brun': 20502903, 'metal': 20502904}]} input_args_next_step : {1337300083: ('0.037797198356358266',), 1337300075: ('0.037797198356358266',), 1337300054: ('0.037797198356358266',), 1337300048: ('0.037797198356358266',), 1337300007: ('0.037797198356358266',), 1337300004: ('0.037797198356358266',), 1337300001: ('0.037797198356358266',), 20502819: ()} output_args : {20502819: [{'Carton_gris': 20502893, 'papier': 20502894, 'mal_croppe': 20502895, 'Teint_Dans_La_Masse': 20502896, 'kraft': 20502897, 'environnement': 20502898, 'plastique': 20502899, 'cartonnette': 20502900, 'flou': 20502901, 'autre_refus': 20502902, 'Carton_brun': 20502903, 'metal': 20502904}]} args : 20502819 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 :8, first value : ('0.037797198356358266',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20502819) 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 (1337300083,1337300075,1337300054,1337300048,1337300007,1337300004,1337300001) Found this number of photos: 7 ##### Call download_photos : nb_thread : 5 begin to download photo : 1337300001 begin to download photo : 1337300007 begin to download photo : 1337300054 begin to download photo : 1337300083 download finish for photo 1337300001 begin to download photo : 1337300004 download finish for photo 1337300007 begin to download photo : 1337300048 download finish for photo 1337300083 download finish for photo 1337300054 begin to download photo : 1337300075 download finish for photo 1337300004 download finish for photo 1337300075 download finish for photo 1337300048 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette205028951739431861/ length of list_filenames : 7 ; length of list_pids : 7 ; length of list_args : 7 results_Auto_P20502819_13-02-2025_08_31_01.pdf 20502895 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=20502895 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette205028951739431861 20502897 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=20502897 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1337299704: '1739431533_691548_1337299223_e786c2252e7c61e3097d05adc79091d9_rle_crop_3672973990_0.png'} change filename to text .imagette205028971739431861/ imagette205028971739431861/1739431533_691548_1337299223_e786c2252e7c61e3097d05adc79091d9_rle_crop_3672973990_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/0458c2587a2528b909169e011d971a89_68464458.png imagette205028971739431861 20502899 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=20502899 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1337299208: '1739431313_689409_1337298324_b980f0cf9096537066c8d6caa72bac93_rle_crop_3672972896_0.png', 1337299278: '1739431393_690019_1337299153_f044776ce4592f4953b076437a5e2d73_rle_crop_3672973226_0.png', 1337299614: '1739431514_691402_1337299229_b2945f2cf16620ca48c388cdc8e3c3ba_rle_crop_3672973759_0.png', 1337299961: '1739431633_692343_1337299647_8db66c1282080aae5d68800f80ddcd9f_rle_crop_3672974413_0.png', 1337299962: '1739431633_692343_1337299568_fc2bb6d05fa9b85842f07a6d4e0711b3_rle_crop_3672974434_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/6efa952271f4bad6db3327980b74b95b_35591441.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/56ad90f54e57379da1000ecc2dfa1a3d_6185681.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/11a512fdf9727d679fd159ba824e6aa7_86581311.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/29e7ba67209d46f45a3d2dc9e7a5070e_34378090.png change filename to text .imagette205028991739431861/ imagette205028991739431861/1739431514_691402_1337299229_b2945f2cf16620ca48c388cdc8e3c3ba_rle_crop_3672973759_0.png.png imagette205028991739431861/1739431393_690019_1337299153_f044776ce4592f4953b076437a5e2d73_rle_crop_3672973226_0.png.png imagette205028991739431861/1739431633_692343_1337299568_fc2bb6d05fa9b85842f07a6d4e0711b3_rle_crop_3672974434_0.png.png imagette205028991739431861/1739431313_689409_1337298324_b980f0cf9096537066c8d6caa72bac93_rle_crop_3672972896_0.png.png imagette205028991739431861/1739431633_692343_1337299647_8db66c1282080aae5d68800f80ddcd9f_rle_crop_3672974413_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/d1d6ea4ac05bb43a9a0945d664090b53_52733352.png imagette205028991739431861 20502900 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=20502900 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1337299207: '1739431313_689409_1337298324_b980f0cf9096537066c8d6caa72bac93_rle_crop_3672972883_0.png', 1337299277: '1739431393_690019_1337299153_f044776ce4592f4953b076437a5e2d73_rle_crop_3672973237_0.png', 1337299715: '1739431551_691730_1337299513_eaf296f9af528c40ab1ea5b9f623501a_rle_crop_3672974008_0.png', 1337300037: '1739431752_692993_1337299633_543b0277bdafe515ba108510e00072da_rle_crop_3672974694_0.png', 1337300038: '1739431752_692993_1337299633_543b0277bdafe515ba108510e00072da_rle_crop_3672974696_0.png', 1337300051: '1739431771_693126_1337299783_058d390c43168df94c083a6976710392_rle_crop_3672974781_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/26ca5995d756fc130af712cef8dbdd70_11724389.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/094bd0bbdac39069cec5599a47b8cbcd_64873312.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/619b8e0bf5de9bc8cd90963e16b7ca8d_8825554.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/05b197efe2f97a646a6c550a8a99ed3c_81886666.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/fa8ebcc106ab80f6e99cf233a58f4b36_53076503.png change filename to text .imagette205029001739431861/ imagette205029001739431861/1739431752_692993_1337299633_543b0277bdafe515ba108510e00072da_rle_crop_3672974696_0.png.png imagette205029001739431861/1739431771_693126_1337299783_058d390c43168df94c083a6976710392_rle_crop_3672974781_0.png.png imagette205029001739431861/1739431313_689409_1337298324_b980f0cf9096537066c8d6caa72bac93_rle_crop_3672972883_0.png.png imagette205029001739431861/1739431551_691730_1337299513_eaf296f9af528c40ab1ea5b9f623501a_rle_crop_3672974008_0.png.png imagette205029001739431861/1739431393_690019_1337299153_f044776ce4592f4953b076437a5e2d73_rle_crop_3672973237_0.png.png imagette205029001739431861/1739431752_692993_1337299633_543b0277bdafe515ba108510e00072da_rle_crop_3672974694_0.png.png imagette205029011739431862/ wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/7875035c4a83248c77b2ae0f7d37e52b_26354084.png imagette205029001739431861 20502901 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=20502901 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette205029011739431862 20502902 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=20502902 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1337299167: '1739431291_689186_1337298564_0e6f0e1dbfba90e08d55023a32b9e13b_rle_crop_3672972737_0.png', 1337299206: '1739431313_689409_1337298324_b980f0cf9096537066c8d6caa72bac93_rle_crop_3672972887_0.png', 1337299504: '1739431413_690177_1337299190_b6ffa271099d0791c634780324da5f51_rle_crop_3672973349_0.png', 1337299505: '1739431413_690177_1337298775_48b8646810bddb283714fd303be82007_rle_crop_3672973362_0.png', 1337299713: '1739431551_691730_1337299428_2fe0b14ac715ed0e891f95dfc68866eb_rle_crop_3672974030_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/cfd96c848a2717c67ed57d75d8fd9829_8285204.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/20e29974b30b864b2b76a607bc27fa14_56920232.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/63254486f4cb9d0d6964dc27aa369bc6_93093467.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/2c472879a8216f1f51e41fbea53cc434_69917173.png change filename to text .imagette205029021739431862/ imagette205029021739431862/1739431551_691730_1337299428_2fe0b14ac715ed0e891f95dfc68866eb_rle_crop_3672974030_0.png.png imagette205029021739431862/1739431313_689409_1337298324_b980f0cf9096537066c8d6caa72bac93_rle_crop_3672972887_0.png.png imagette205029021739431862/1739431413_690177_1337298775_48b8646810bddb283714fd303be82007_rle_crop_3672973362_0.png.png imagette205029021739431862/1739431291_689186_1337298564_0e6f0e1dbfba90e08d55023a32b9e13b_rle_crop_3672972737_0.png.png imagette205029021739431862/1739431413_690177_1337299190_b6ffa271099d0791c634780324da5f51_rle_crop_3672973349_0.png.png imagette205029041739431862/ wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/d3aea381483115e66f2cac1bc7364813_63545734.png imagette205029021739431862 20502904 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=20502904 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette205029041739431862 20502893 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=20502893 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1337299514: '1739431413_690177_1337299190_b6ffa271099d0791c634780324da5f51_rle_crop_3672973345_0.png', 1337299613: '1739431514_691402_1337299229_b2945f2cf16620ca48c388cdc8e3c3ba_rle_crop_3672973758_0.png', 1337299690: '1739431533_691548_1337299225_ef4cc94bd89553b8e81d45d8000b4d3d_rle_crop_3672973975_0.png', 1337299957: '1739431633_692343_1337299568_fc2bb6d05fa9b85842f07a6d4e0711b3_rle_crop_3672974430_0.png', 1337300036: '1739431752_692993_1337299633_543b0277bdafe515ba108510e00072da_rle_crop_3672974697_0.png', 1337300049: '1739431771_693126_1337299783_058d390c43168df94c083a6976710392_rle_crop_3672974785_0.png', 1337300050: '1739431771_693126_1337299780_1781172ac4ae12a0a3c1bb7221c3862c_rle_crop_3672974794_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/24a84d8e514516d6c9fc855941880d0e_58234117.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/855218a7ecd98778a19d27b58b42a512_66507553.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/ae9c8c8adb7b602d3886159e611a4637_44547583.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/0557db25eefdcc07d9500b6cd1f05876_61513966.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/4cad6dad866307af922ad683a195ebdb_14955340.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/ed2b4ddb9e83a33dbe22dc1def62733f_78161085.png change filename to text .imagette205028931739431862/ imagette205028931739431862/1739431633_692343_1337299568_fc2bb6d05fa9b85842f07a6d4e0711b3_rle_crop_3672974430_0.png.png imagette205028931739431862/1739431533_691548_1337299225_ef4cc94bd89553b8e81d45d8000b4d3d_rle_crop_3672973975_0.png.png imagette205028931739431862/1739431413_690177_1337299190_b6ffa271099d0791c634780324da5f51_rle_crop_3672973345_0.png.png imagette205028931739431862/1739431752_692993_1337299633_543b0277bdafe515ba108510e00072da_rle_crop_3672974697_0.png.png imagette205028931739431862/1739431771_693126_1337299780_1781172ac4ae12a0a3c1bb7221c3862c_rle_crop_3672974794_0.png.png imagette205028931739431862/1739431771_693126_1337299783_058d390c43168df94c083a6976710392_rle_crop_3672974785_0.png.png imagette205028931739431862/1739431514_691402_1337299229_b2945f2cf16620ca48c388cdc8e3c3ba_rle_crop_3672973758_0.png.png wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/7ade8663d7e412f60138b39576b99de6_22555109.png imagette205028931739431862 20502896 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=20502896 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1337299276: '1739431393_690019_1337299138_975ff8571430cbc4ac2125683879cc8c_rle_crop_3672973257_0.png', 1337299473: '1739431413_690177_1337298775_48b8646810bddb283714fd303be82007_rle_crop_3672973357_0.png', 1337299711: '1739431551_691730_1337299428_2fe0b14ac715ed0e891f95dfc68866eb_rle_crop_3672974032_0.png', 1337299712: '1739431551_691730_1337299428_2fe0b14ac715ed0e891f95dfc68866eb_rle_crop_3672974036_0.png', 1337299954: '1739431633_692343_1337299647_8db66c1282080aae5d68800f80ddcd9f_rle_crop_3672974420_0.png', 1337299955: '1739431633_692343_1337299568_fc2bb6d05fa9b85842f07a6d4e0711b3_rle_crop_3672974438_0.png', 1337299956: '1739431633_692343_1337299566_3c10bdb83e9ceaa422f57743441059fb_rle_crop_3672974449_0.png', 1337300033: '1739431752_692993_1337299787_a5b27dcc180a5fd937b5ff3641ac505c_rle_crop_3672974690_0.png', 1337300034: '1739431752_692993_1337299633_543b0277bdafe515ba108510e00072da_rle_crop_3672974703_0.png', 1337300035: '1739431752_692993_1337299633_543b0277bdafe515ba108510e00072da_rle_crop_3672974701_0.png', 1337300046: '1739431771_693126_1337299783_058d390c43168df94c083a6976710392_rle_crop_3672974788_0.png', 1337300047: '1739431771_693126_1337299780_1781172ac4ae12a0a3c1bb7221c3862c_rle_crop_3672974802_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/bb8ac236d971b22e831a2525b59aa2d5_19039084.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/2c667b966202f2e6aab7a20881167994_1367733.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/a66643b666dd4960c28c63b716d3f724_80093368.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/e5d773317f5cbb25f433d59f71abdb95_69060748.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/432b7bad3a14d81c7971e5b4788b6a3c_33199443.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/29318d3603e3b1f01148072354cbc6b1_1933651.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/20129fe3f02a43b427969afd75817a1e_32191311.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/b70f28e1b6a53a1f35ad78dc7fe5ea17_41165605.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/63e7575e84e98dd2d8bdc0881c135fe0_45731349.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/97c73a7ee227972d470db5b7e99553ba_8611238.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/f536912549c86212ea2c268352aab528_88287168.png change filename to text .imagette205028961739431862/ imagette205028961739431862/1739431771_693126_1337299780_1781172ac4ae12a0a3c1bb7221c3862c_rle_crop_3672974802_0.png.png imagette205028961739431862/1739431633_692343_1337299647_8db66c1282080aae5d68800f80ddcd9f_rle_crop_3672974420_0.png.png imagette205028961739431862/1739431752_692993_1337299633_543b0277bdafe515ba108510e00072da_rle_crop_3672974701_0.png.png imagette205028961739431862/1739431633_692343_1337299568_fc2bb6d05fa9b85842f07a6d4e0711b3_rle_crop_3672974438_0.png.png imagette205028961739431862/1739431413_690177_1337298775_48b8646810bddb283714fd303be82007_rle_crop_3672973357_0.png.png imagette205028961739431862/1739431771_693126_1337299783_058d390c43168df94c083a6976710392_rle_crop_3672974788_0.png.png imagette205028961739431862/1739431551_691730_1337299428_2fe0b14ac715ed0e891f95dfc68866eb_rle_crop_3672974036_0.png.png imagette205028961739431862/1739431551_691730_1337299428_2fe0b14ac715ed0e891f95dfc68866eb_rle_crop_3672974032_0.png.png imagette205028961739431862/1739431633_692343_1337299566_3c10bdb83e9ceaa422f57743441059fb_rle_crop_3672974449_0.png.png imagette205028961739431862/1739431393_690019_1337299138_975ff8571430cbc4ac2125683879cc8c_rle_crop_3672973257_0.png.png imagette205028961739431862/1739431752_692993_1337299633_543b0277bdafe515ba108510e00072da_rle_crop_3672974703_0.png.png imagette205028961739431862/1739431752_692993_1337299787_a5b27dcc180a5fd937b5ff3641ac505c_rle_crop_3672974690_0.png.png wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/6ec32eeba53175ed6f1b971ba87aad7b_64476325.png imagette205028961739431862 20502903 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=20502903 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1337299515: '1739431413_690177_1337298775_48b8646810bddb283714fd303be82007_rle_crop_3672973358_0.png', 1337299523: '1739431432_690335_1337298778_839bf959c62d7ac4458d07db22e702fb_rle_crop_3672973420_0.png', 1337299703: '1739431533_691548_1337299225_ef4cc94bd89553b8e81d45d8000b4d3d_rle_crop_3672973983_0.png', 1337299958: '1739431633_692343_1337299647_8db66c1282080aae5d68800f80ddcd9f_rle_crop_3672974416_0.png', 1337299959: '1739431633_692343_1337299566_3c10bdb83e9ceaa422f57743441059fb_rle_crop_3672974453_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/fcbbe3e48655e83ef1dd88faceefc71b_70600272.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/59688b6dbc1133cf58823608c623b375_27068797.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/d21b1e3b119e1d57cb01604aea0c67f6_34857851.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/e6b8fbc32a5a86e8661f036edc19353b_2189526.png change filename to text .imagette205029031739431863/ imagette205029031739431863/1739431413_690177_1337298775_48b8646810bddb283714fd303be82007_rle_crop_3672973358_0.png.png imagette205029031739431863/1739431432_690335_1337298778_839bf959c62d7ac4458d07db22e702fb_rle_crop_3672973420_0.png.png imagette205029031739431863/1739431633_692343_1337299647_8db66c1282080aae5d68800f80ddcd9f_rle_crop_3672974416_0.png.png imagette205029031739431863/1739431633_692343_1337299566_3c10bdb83e9ceaa422f57743441059fb_rle_crop_3672974453_0.png.png imagette205029031739431863/1739431533_691548_1337299225_ef4cc94bd89553b8e81d45d8000b4d3d_rle_crop_3672973983_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/1a491777a7aa204c188ac0fcc9f7a145_68719204.png imagette205029031739431863 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=20502819 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/20502905,20502906,20502907,20502908,20502909,20502910,20502911,20502912,20502913,20502914,20502915,20502916?tags=Carton_gris,papier,mal_croppe,Teint_Dans_La_Masse,kraft,environnement,plastique,cartonnette,flou,autre_refus,Carton_brun,metal your option no_mail is active, we will not send the real mail to your client args[1337300083] : ('0.037797198356358266',) no score found for photo 1337300083 apple ('0.037797198356358266',) We are sending mail with results at report@fotonower.com args[1337300075] : ('0.037797198356358266',) no score found for photo 1337300075 apple ('0.037797198356358266',) We are sending mail with results at report@fotonower.com args[1337300054] : ('0.037797198356358266',) no score found for photo 1337300054 apple ('0.037797198356358266',) We are sending mail with results at report@fotonower.com args[1337300048] : ('0.037797198356358266',) no score found for photo 1337300048 apple ('0.037797198356358266',) We are sending mail with results at report@fotonower.com args[1337300007] : ('0.037797198356358266',) no score found for photo 1337300007 apple ('0.037797198356358266',) We are sending mail with results at report@fotonower.com args[1337300004] : ('0.037797198356358266',) no score found for photo 1337300004 apple ('0.037797198356358266',) We are sending mail with results at report@fotonower.com args[1337300001] : ('0.037797198356358266',) no score found for photo 1337300001 apple ('0.037797198356358266',) We are sending mail with results at report@fotonower.com refus_total : 0.037797198356358266 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=20502819 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_P20502819_13-02-2025_08_31_01.pdf results_Auto_P20502819_13-02-2025_08_31_01.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20502819_13-02-2025_08_31_01.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','20502819','results_Auto_P20502819_13-02-2025_08_31_01.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20502819_13-02-2025_08_31_01.pdf','pdf','','0.2','0.037797198356358266') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20502819]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1337300083, 1337300075, 1337300054, 1337300048, 1337300007, 1337300004, 1337300001] map_info['map_portfolio_photo'] : {20502819: [1337300083, 1337300075, 1337300054, 1337300048, 1337300007, 1337300004, 1337300001, 1337299970, 1337299787, 1337299783, 1337299780, 1337299647, 1337299633, 1337299571, 1337299568, 1337299566, 1337299516, 1337299513, 1337299428, 1337299229, 1337299225, 1337299223, 1337299190, 1337299153, 1337299138, 1337298778, 1337298775, 1337298744, 1337298662, 1337298631, 1337298628, 1337298566, 1337298564, 1337298561, 1337298558, 1337298556, 1337298324, 1337298316, 1337298311, 1337298308, 1337298305, 1337298298, 1337298093, 1337298090, 1337298088, 1337298064]} final : False mtd_id 4302 list_pids : [1337300083, 1337300075, 1337300054, 1337300048, 1337300007, 1337300004, 1337300001] 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, '2581903') ('4302', '20502819', '1337300083', None, None, None, None, None, '2581903') ('4302', None, None, None, None, None, None, None, '2581903') ('4302', '20502819', '1337300075', None, None, None, None, None, '2581903') ('4302', None, None, None, None, None, None, None, '2581903') ('4302', '20502819', '1337300054', None, None, None, None, None, '2581903') ('4302', None, None, None, None, None, None, None, '2581903') ('4302', '20502819', '1337300048', None, None, None, None, None, '2581903') ('4302', None, None, None, None, None, None, None, '2581903') ('4302', '20502819', '1337300007', None, None, None, None, None, '2581903') ('4302', None, None, None, None, None, None, None, '2581903') ('4302', '20502819', '1337300004', None, None, None, None, None, '2581903') ('4302', None, None, None, None, None, None, None, '2581903') ('4302', '20502819', '1337300001', None, None, None, None, None, '2581903') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 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', '20502819', '1337300083', None, None, None, None, None, '2581903'), ('4302', '20502819', '1337300075', None, None, None, None, None, '2581903'), ('4302', '20502819', '1337300054', None, None, None, None, None, '2581903'), ('4302', '20502819', '1337300048', None, None, None, None, None, '2581903'), ('4302', '20502819', '1337300007', None, None, None, None, None, '2581903'), ('4302', '20502819', '1337300004', None, None, None, None, None, '2581903'), ('4302', '20502819', '1337300001', None, None, None, None, None, '2581903')] time used for this insertion : 0.013349294662475586 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.6931934356689453 time spend to save output : 0.01362919807434082 total time spend for step 4 : 3.706822633743286 step5:split_time_score Thu Feb 13 08:31:04 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 : ['20502819'] 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 : [('20502819',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20502819) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1337300083: {'path': 'temp/1739431861_2877353_1337300083_7e2fc57d267da499f7d8c1fc48f2c042.jpg', 'extension': 'jpg'}, 1337300001: {'path': 'temp/1739431861_2877353_1337300001_1f35d658e139c86af94891455bd1e6ee.jpg', 'extension': 'jpg'}, 1337300004: {'path': 'temp/1739431861_2877353_1337300004_330eec081d04afd404eece82f2cd7c5a.jpg', 'extension': 'jpg'}, 1337300054: {'path': 'temp/1739431861_2877353_1337300054_acbc60899136cbf42a07ed5a7c8699e8.jpg', 'extension': 'jpg'}, 1337300075: {'path': 'temp/1739431861_2877353_1337300075_9c63f32debc24a87a754b2440d9242da.jpg', 'extension': 'jpg'}, 1337300007: {'path': 'temp/1739431861_2877353_1337300007_4f86b11462b7606e254949a168bab445.jpg', 'extension': 'jpg'}, 1337300048: {'path': 'temp/1739431861_2877353_1337300048_963a927cc9e6cdfd966fb1be03d848a7.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 = 20502819; (('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 = 20502819 group by h (('08', 46),) 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=20502819 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 (20502819) 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 (20502819) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 13022025 20502819 Nombre de photos uploadées : 46 / 23040 (0%) 13022025 20502819 Nombre de photos taguées (types de déchets): 0 / 46 (0%) 13022025 20502819 Nombre de photos taguées (volume) : 0 / 46 (0%) [{'photo_id': 1337298093, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/ff12d43f137e041e51b465a1a8fe431f.jpg', 'username': None, 'uploaded_at': 1739430967, 'text': 'image_13022025_08_15_05_010161m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1337298090, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/33a33694cc5e63de135e4b57e610f4d1.jpg', 'username': None, 'uploaded_at': 1739430967, 'text': 'image_13022025_08_15_15_010136m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1337298088, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/347bb9172788dc4df11793dfeed9673d.jpg', 'username': None, 'uploaded_at': 1739430967, 'text': 'image_13022025_08_15_35_010140m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1337298064, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/13/d2dcb35c3fd199d4cbabd49ef5f2eb12.jpg', 'username': None, 'uploaded_at': 1739430967, 'text': 'image_13022025_08_15_45_010139m0.jpg 4e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 3.337860107421875e-06 elapsed_time : order_list_meta_photo_and_scores 7.152557373046875e-06 ?????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0022530555725097656 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 20502819, '2025-02-13' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1599443,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.022602081298828125 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= 1599443 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1599443, 'dashboard_run_id': 1607798, 'mtr_portfolio_id': 20501204, 'dashboard_result_id': 8858156, '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_P20501204_13-02-2025_07_46_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 20501206, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20501207, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20501208, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20501209, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20501210, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20501211, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20501212, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20501213, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20501214, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20501215, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20501216, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20501217, 'pht': 3726}}"}, {'dashboat_entry_day': 1599443, 'dashboard_run_id': 1607798, 'mtr_portfolio_id': 20501611, 'dashboard_result_id': 8858157, '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_P20501611_13-02-2025_08_02_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 20501640, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20501641, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20501642, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20501643, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20501644, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20501645, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20501646, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20501647, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20501648, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20501649, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20501650, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20501651, 'pht': 3726}}"}, {'dashboat_entry_day': 1599443, 'dashboard_run_id': 1607798, 'mtr_portfolio_id': 20502251, 'dashboard_result_id': 8858158, '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_P20502251_13-02-2025_08_18_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 20502278, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20502279, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20502280, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20502281, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20502282, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20502283, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20502284, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20502285, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20502286, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20502287, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20502288, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20502289, 'pht': 3726}}"}, {'dashboat_entry_day': 1599443, 'dashboard_run_id': 1607798, 'mtr_portfolio_id': 20502819, 'dashboard_result_id': 8858159, '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_P20502819_13-02-2025_08_29_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20502893, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20502894, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20502895, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20502896, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20502897, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20502898, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20502899, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20502900, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20502901, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20502902, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20502903, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20502904, '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 = 20501204 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': 2581779, 'mtr_portfolio_id': 20501204, 'created_at': datetime.datetime(2025, 2, 13, 7, 46, 59), 'result': '0.05152618807365777', 'result_long': None, 'result_double': None}] Qualite : 0.05152618807365777 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20501204 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20501204_13-02-2025_07_46_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20501204 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_P20501204_13-02-2025_07_46_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 20501206, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20501207, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20501208, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20501209, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20501210, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20501211, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20501212, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20501213, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20501214, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20501215, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20501216, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20501217, 'pht': 3726}}" where mtr_portfolio_id = 20501204 and dashboard_run_id = 1607798 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`=20501204 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (8858156, 0.05152618807365777, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20501204_13-02-2025_07_46_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 20501206, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20501207, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20501208, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20501209, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20501210, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20501211, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20501212, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20501213, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20501214, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20501215, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20501216, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20501217, '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 = 20501611 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': 2581816, 'mtr_portfolio_id': 20501611, 'created_at': datetime.datetime(2025, 2, 13, 8, 2, 57), 'result': '0.04163380400124989', 'result_long': None, 'result_double': None}] Qualite : 0.04163380400124989 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20501611 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20501611_13-02-2025_08_02_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20501611 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_P20501611_13-02-2025_08_02_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 20501640, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20501641, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20501642, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20501643, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20501644, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20501645, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20501646, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20501647, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20501648, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20501649, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20501650, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20501651, 'pht': 3726}}" where mtr_portfolio_id = 20501611 and dashboard_run_id = 1607798 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`=20501611 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (8858157, 0.04163380400124989, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20501611_13-02-2025_08_02_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 20501640, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20501641, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20501642, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20501643, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20501644, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20501645, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20501646, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20501647, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20501648, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20501649, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20501650, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20501651, '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 = 20502251 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': 2581865, 'mtr_portfolio_id': 20502251, 'created_at': datetime.datetime(2025, 2, 13, 8, 18, 57), 'result': '0.031458951974752826', 'result_long': None, 'result_double': None}] Qualite : 0.031458951974752826 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20502251 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20502251_13-02-2025_08_18_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20502251 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_P20502251_13-02-2025_08_18_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 20502278, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20502279, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20502280, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20502281, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20502282, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20502283, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20502284, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20502285, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20502286, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20502287, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20502288, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20502289, 'pht': 3726}}" where mtr_portfolio_id = 20502251 and dashboard_run_id = 1607798 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`=20502251 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (8858158, 0.031458951974752826, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20502251_13-02-2025_08_18_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 20502278, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20502279, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20502280, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20502281, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20502282, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20502283, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20502284, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20502285, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20502286, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20502287, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20502288, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20502289, '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 = 20502819 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': 2581903, 'mtr_portfolio_id': 20502819, 'created_at': datetime.datetime(2025, 2, 13, 8, 31), 'result': '0.037797198356358266', 'result_long': None, 'result_double': None}] Qualite : 0.037797198356358266 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20502819 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20502819_13-02-2025_08_31_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20502819 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_P20502819_13-02-2025_08_31_01.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20502893, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20502894, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20502895, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20502896, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20502897, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20502898, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20502899, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20502900, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20502901, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20502902, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20502903, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20502904, 'pht': 3726}}" where mtr_portfolio_id = 20502819 and dashboard_run_id = 1607798 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`=20502819 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (8858159, 0.037797198356358266, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20502819_13-02-2025_08_31_01.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20502893, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20502894, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20502895, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20502896, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20502897, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20502898, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20502899, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20502900, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20502901, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20502902, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20502903, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20502904, '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 (20501204,20501611,20502251,20502819) result : ((1337293597,), (1337293779,), (1337294079,), (1337294083,), (1337294087,), (1337294090,), (1337294094,), (1337294095,), (1337294119,), (1337294121,), (1337294168,), (1337294173,), (1337294208,), (1337294210,), (1337294214,), (1337294218,), (1337294373,), (1337294375,), (1337294378,), (1337294382,), (1337294385,), (1337294389,), (1337294414,), (1337294419,), (1337294424,), (1337294429,), (1337294460,), (1337294462,), (1337294465,), (1337294468,), (1337294471,), (1337294508,), (1337294510,), (1337294512,), (1337294515,), (1337294519,), (1337294676,), (1337294679,), (1337294682,), (1337294732,), (1337294734,), (1337294737,), (1337294740,), (1337294761,), (1337294763,), (1337294768,), (1337294771,), (1337294814,), (1337294817,), (1337294820,), (1337294826,), (1337294867,), (1337294872,), (1337294875,), (1337294957,), (1337294901,), (1337294903,), (1337294906,), (1337295049,), (1337295052,), (1337295061,), (1337295066,), (1337295068,), (1337295072,), (1337295476,), (1337295538,), (1337295553,), (1337295565,), (1337295609,), (1337295612,), (1337295614,), (1337295617,), (1337295679,), (1337295682,), (1337295685,), (1337295686,), (1337295690,), (1337295793,), (1337295796,), (1337295800,), (1337295802,), (1337295833,), (1337295835,), (1337295837,), (1337295840,), (1337295844,), (1337295847,), (1337296010,), (1337296061,), (1337296064,), (1337296067,), (1337296086,), (1337296089,), (1337296093,), (1337296097,), (1337296120,), (1337296123,), (1337296126,), (1337296129,), (1337296132,), (1337296141,), (1337296162,), (1337296164,), (1337296168,), (1337296196,), (1337296199,), (1337296203,), (1337296207,), (1337296237,), (1337296241,), (1337296247,), (1337296255,), (1337296263,), (1337296268,), (1337296452,), (1337296441,), (1337296444,), (1337296448,), (1337296490,), (1337296493,), (1337296497,), (1337296501,), (1337296505,), (1337296521,), (1337296524,), (1337296528,), (1337296532,), (1337296560,), (1337296563,), (1337296565,), (1337296566,), (1337296568,), (1337296572,), (1337297332,), (1337297334,), (1337297335,), (1337297337,), (1337297341,), (1337297361,), (1337297635,), (1337297637,), (1337297640,), (1337297680,), (1337297682,), (1337297685,), (1337297712,), (1337297715,), (1337297718,), (1337297721,), (1337297725,), (1337297765,), (1337297767,), (1337297801,), (1337297803,), (1337297812,), (1337297813,), (1337297817,), (1337297821,), (1337297864,), (1337297869,), (1337297871,), (1337297874,), (1337297904,), (1337297905,), (1337297907,), (1337298187,), (1337298064,), (1337298088,), (1337298090,), (1337298093,), (1337298298,), (1337298305,), (1337298308,), (1337298311,), (1337298316,), (1337298324,), (1337298556,), (1337298558,), (1337298561,), (1337298564,), (1337298566,), (1337298628,), (1337298631,), (1337298662,), (1337298744,), (1337298775,), (1337298778,), (1337299138,), (1337299153,), (1337299190,), (1337299223,), (1337299225,), (1337299229,), (1337299428,), (1337299513,), (1337299516,), (1337299566,), (1337299568,), (1337299571,), (1337299633,), (1337299647,), (1337299780,), (1337299783,), (1337299787,), (1337299970,), (1337300001,), (1337300004,), (1337300007,), (1337300048,), (1337300054,), (1337300075,), (1337300083,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'13022025': {'nb_upload': 46, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20502819]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1337300083, 1337300075, 1337300054, 1337300048, 1337300007, 1337300004, 1337300001] map_info['map_portfolio_photo'] : {20502819: [1337300083, 1337300075, 1337300054, 1337300048, 1337300007, 1337300004, 1337300001, 1337299970, 1337299787, 1337299783, 1337299780, 1337299647, 1337299633, 1337299571, 1337299568, 1337299566, 1337299516, 1337299513, 1337299428, 1337299229, 1337299225, 1337299223, 1337299190, 1337299153, 1337299138, 1337298778, 1337298775, 1337298744, 1337298662, 1337298631, 1337298628, 1337298566, 1337298564, 1337298561, 1337298558, 1337298556, 1337298324, 1337298316, 1337298311, 1337298308, 1337298305, 1337298298, 1337298093, 1337298090, 1337298088, 1337298064]} final : True mtd_id 4302 list_pids : [1337300083, 1337300075, 1337300054, 1337300048, 1337300007, 1337300004, 1337300001] Looping around the photos to save general results len do output : 1 /20502819Didn'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, '2581903') ('4302', '20502819', '1337300083', None, None, None, None, None, '2581903') ('4302', None, None, None, None, None, None, None, '2581903') ('4302', '20502819', '1337300075', None, None, None, None, None, '2581903') ('4302', None, None, None, None, None, None, None, '2581903') ('4302', '20502819', '1337300054', None, None, None, None, None, '2581903') ('4302', None, None, None, None, None, None, None, '2581903') ('4302', '20502819', '1337300048', None, None, None, None, None, '2581903') ('4302', None, None, None, None, None, None, None, '2581903') ('4302', '20502819', '1337300007', None, None, None, None, None, '2581903') ('4302', None, None, None, None, None, None, None, '2581903') ('4302', '20502819', '1337300004', None, None, None, None, None, '2581903') ('4302', None, None, None, None, None, None, None, '2581903') ('4302', '20502819', '1337300001', None, None, None, None, None, '2581903') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 8 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, '20502819', 'None', None, None, None, None, '2581903'), ('4302', '20502819', '1337300083', None, None, None, None, None, '2581903'), ('4302', '20502819', '1337300075', None, None, None, None, None, '2581903'), ('4302', '20502819', '1337300054', None, None, None, None, None, '2581903'), ('4302', '20502819', '1337300048', None, None, None, None, None, '2581903'), ('4302', '20502819', '1337300007', None, None, None, None, None, '2581903'), ('4302', '20502819', '1337300004', None, None, None, None, None, '2581903'), ('4302', '20502819', '1337300001', None, None, None, None, None, '2581903')] time used for this insertion : 0.012874603271484375 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.34024691581726074 time spend to save output : 0.013105630874633789 total time spend for step 5 : 0.35335254669189453 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 (2581903) 2.31user 2.56system 0:09.38elapsed 51%CPU (0avgtext+0avgdata 160524maxresident)k 304inputs+9616outputs (16major+72084minor)pagefaults 0swaps