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 : 2189484 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 (2719611) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2719611) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22012336 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2719611'] with mtr_portfolio_ids : ['22012336'] and first list_photo_ids : [] new path : /proc/2189484/ Name: python3 Umask: 0002 State: R (running) Tgid: 2189484 Ngid: 0 Pid: 2189484 PPid: 2189483 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 2189484 NSpid: 2189484 NSpgid: 2185520 NSsid: 2185520 VmPeak: 1106928 kB VmSize: 1106928 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 97532 kB VmRSS: 97532 kB RssAnon: 59756 kB RssFile: 37776 kB RssShmem: 0 kB VmData: 865676 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 604 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: 49 nonvoluntary_ctxt_switches: 92 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '2189484', 'Ngid': '0', 'Pid': '2189484', 'PPid': '2189483', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '2189484', 'NSpid': '2189484', 'NSpgid': '2185520', 'NSsid': '2185520', 'VmPeak': '1106928 kB', 'VmSize': '1106928 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '97532 kB', 'VmRSS': '97532 kB', 'RssAnon': '59756 kB', 'RssFile': '37776 kB', 'RssShmem': '0 kB', 'VmData': '865676 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '604 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': '49', 'nonvoluntary_ctxt_switches': '92'} ('datou_batch_current', '2189484', '1106928', '0', '1106928', '865676', '97532', b'', 'marlene', '2719611') 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 (22012336) 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 (2719611 ) ) 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 (22012336) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1349747473, 'portfolio_id': 22012336}, {'photo_id': 1349747467, 'portfolio_id': 22012336}, {'photo_id': 1349747452, 'portfolio_id': 22012336}, {'photo_id': 1349747299, 'portfolio_id': 22012336}, {'photo_id': 1349747228, 'portfolio_id': 22012336}, {'photo_id': 1349747207, 'portfolio_id': 22012336}, {'photo_id': 1349747179, 'portfolio_id': 22012336}, {'photo_id': 1349747116, 'portfolio_id': 22012336}, {'photo_id': 1349746933, 'portfolio_id': 22012336}, {'photo_id': 1349746708, 'portfolio_id': 22012336}, {'photo_id': 1349746669, 'portfolio_id': 22012336}, {'photo_id': 1349746665, 'portfolio_id': 22012336}, {'photo_id': 1349746608, 'portfolio_id': 22012336}, {'photo_id': 1349746365, 'portfolio_id': 22012336}, {'photo_id': 1349745755, 'portfolio_id': 22012336}, {'photo_id': 1349745733, 'portfolio_id': 22012336}, {'photo_id': 1349745705, 'portfolio_id': 22012336}, {'photo_id': 1349745679, 'portfolio_id': 22012336}, {'photo_id': 1349745649, 'portfolio_id': 22012336}, {'photo_id': 1349745557, 'portfolio_id': 22012336}, {'photo_id': 1349745502, 'portfolio_id': 22012336}, {'photo_id': 1349745498, 'portfolio_id': 22012336}, {'photo_id': 1349745492, 'portfolio_id': 22012336}, {'photo_id': 1349745479, 'portfolio_id': 22012336}, {'photo_id': 1349745473, 'portfolio_id': 22012336}, {'photo_id': 1349745245, 'portfolio_id': 22012336}, {'photo_id': 1349745217, 'portfolio_id': 22012336}, {'photo_id': 1349745190, 'portfolio_id': 22012336}, {'photo_id': 1349745162, 'portfolio_id': 22012336}] map_portfolio_id_photo_id: {22012336: [1349747473, 1349747467, 1349747452, 1349747299, 1349747228, 1349747207, 1349747179, 1349747116, 1349746933, 1349746708, 1349746669, 1349746665, 1349746608, 1349746365, 1349745755, 1349745733, 1349745705, 1349745679, 1349745649, 1349745557, 1349745502, 1349745498, 1349745492, 1349745479, 1349745473, 1349745245, 1349745217, 1349745190, 1349745162]} ##### 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.01589679718017578 #### 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 Apr 3 08:06:55 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 (22012336) 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 : 22012336 get user id for portfolio 22012336 get sub ptf for main ptf 22012336, type 3726 and hashtags ['kraft', 'Carton_brun', 'Carton_gris', 'cartonnette', 'mal_croppe', 'metal', 'papier', 'flou', 'autre_refus', 'environnement', 'plastique', 'Teint_Dans_La_Masse'] 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`=22012336 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','Carton_brun','Carton_gris','cartonnette','mal_croppe','metal','papier','flou','autre_refus','environnement','plastique','Teint_Dans_La_Masse')) 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`=22012336 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','Carton_brun','Carton_gris','cartonnette','mal_croppe','metal','papier','flou','autre_refus','environnement','plastique','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'metal': {'main_port_id': 22012336, 'sub_port_id': 22012339, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14507449, 'last_updated_at': datetime.datetime(2025, 4, 3, 8, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 8, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 8, 4, 57)}, 'flou': {'main_port_id': 22012336, 'sub_port_id': 22012340, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14507450, 'last_updated_at': datetime.datetime(2025, 4, 3, 8, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 8, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 8, 4, 57)}, 'autre_refus': {'main_port_id': 22012336, 'sub_port_id': 22012341, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14507451, 'last_updated_at': datetime.datetime(2025, 4, 3, 8, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 8, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 8, 4, 57)}, 'papier': {'main_port_id': 22012336, 'sub_port_id': 22012342, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14507452, 'last_updated_at': datetime.datetime(2025, 4, 3, 8, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 8, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 8, 4, 57)}, 'Carton_brun': {'main_port_id': 22012336, 'sub_port_id': 22012343, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14507453, 'last_updated_at': datetime.datetime(2025, 4, 3, 8, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 8, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 8, 4, 57)}, 'plastique': {'main_port_id': 22012336, 'sub_port_id': 22012344, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14507454, 'last_updated_at': datetime.datetime(2025, 4, 3, 8, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 8, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 8, 4, 57)}, 'kraft': {'main_port_id': 22012336, 'sub_port_id': 22012345, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14507455, 'last_updated_at': datetime.datetime(2025, 4, 3, 8, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 8, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 8, 4, 57)}, 'mal_croppe': {'main_port_id': 22012336, 'sub_port_id': 22012346, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14507456, 'last_updated_at': datetime.datetime(2025, 4, 3, 8, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 8, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 8, 4, 57)}, 'environnement': {'main_port_id': 22012336, 'sub_port_id': 22012347, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14507457, 'last_updated_at': datetime.datetime(2025, 4, 3, 8, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 8, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 8, 4, 57)}, 'Carton_gris': {'main_port_id': 22012336, 'sub_port_id': 22012348, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14507458, 'last_updated_at': datetime.datetime(2025, 4, 3, 8, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 8, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 8, 4, 57)}, 'cartonnette': {'main_port_id': 22012336, 'sub_port_id': 22012349, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14507459, 'last_updated_at': datetime.datetime(2025, 4, 3, 8, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 8, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 8, 4, 57)}, 'Teint_Dans_La_Masse': {'main_port_id': 22012336, 'sub_port_id': 22012350, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14507460, 'last_updated_at': datetime.datetime(2025, 4, 3, 8, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 8, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 8, 4, 57)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22012339 , 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=22012336 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 (22012339) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22012336) result : ((1349745162,), (1349745190,), (1349745217,), (1349745245,), (1349745473,), (1349745479,), (1349745492,), (1349745498,), (1349745502,), (1349745557,), (1349745649,), (1349745679,), (1349745705,), (1349745733,), (1349745755,), (1349746365,), (1349746608,), (1349746665,), (1349746669,), (1349746708,), (1349746933,), (1349747116,), (1349747179,), (1349747207,), (1349747228,), (1349747299,), (1349747452,), (1349747467,), (1349747473,)) 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 22012340 , 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=22012336 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 (22012340) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22012336) result : ((1349745162,), (1349745190,), (1349745217,), (1349745245,), (1349745473,), (1349745479,), (1349745492,), (1349745498,), (1349745502,), (1349745557,), (1349745649,), (1349745679,), (1349745705,), (1349745733,), (1349745755,), (1349746365,), (1349746608,), (1349746665,), (1349746669,), (1349746708,), (1349746933,), (1349747116,), (1349747179,), (1349747207,), (1349747228,), (1349747299,), (1349747452,), (1349747467,), (1349747473,)) 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 22012341 , 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=22012336 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 (22012341) result : ((1349747444,), (1349747445,), (1349747446,), (1349747447,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22012336) result : ((1349745162,), (1349745190,), (1349745217,), (1349745245,), (1349745473,), (1349745479,), (1349745492,), (1349745498,), (1349745502,), (1349745557,), (1349745649,), (1349745679,), (1349745705,), (1349745733,), (1349745755,), (1349746365,), (1349746608,), (1349746665,), (1349746669,), (1349746708,), (1349746933,), (1349747116,), (1349747179,), (1349747207,), (1349747228,), (1349747299,), (1349747452,), (1349747467,), (1349747473,)) 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 22012342 , 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=22012336 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 (22012342) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22012336) result : ((1349745162,), (1349745190,), (1349745217,), (1349745245,), (1349745473,), (1349745479,), (1349745492,), (1349745498,), (1349745502,), (1349745557,), (1349745649,), (1349745679,), (1349745705,), (1349745733,), (1349745755,), (1349746365,), (1349746608,), (1349746665,), (1349746669,), (1349746708,), (1349746933,), (1349747116,), (1349747179,), (1349747207,), (1349747228,), (1349747299,), (1349747452,), (1349747467,), (1349747473,)) 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 22012343 , 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=22012336 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 (22012343) result : ((1349746986,), (1349746987,), (1349747463,), (1349747464,), (1349747465,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22012336) result : ((1349745162,), (1349745190,), (1349745217,), (1349745245,), (1349745473,), (1349745479,), (1349745492,), (1349745498,), (1349745502,), (1349745557,), (1349745649,), (1349745679,), (1349745705,), (1349745733,), (1349745755,), (1349746365,), (1349746608,), (1349746665,), (1349746669,), (1349746708,), (1349746933,), (1349747116,), (1349747179,), (1349747207,), (1349747228,), (1349747299,), (1349747452,), (1349747467,), (1349747473,)) 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 22012344 , 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=22012336 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 (22012344) result : ((1349747030,), (1349747032,), (1349747448,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22012336) result : ((1349745162,), (1349745190,), (1349745217,), (1349745245,), (1349745473,), (1349745479,), (1349745492,), (1349745498,), (1349745502,), (1349745557,), (1349745649,), (1349745679,), (1349745705,), (1349745733,), (1349745755,), (1349746365,), (1349746608,), (1349746665,), (1349746669,), (1349746708,), (1349746933,), (1349747116,), (1349747179,), (1349747207,), (1349747228,), (1349747299,), (1349747452,), (1349747467,), (1349747473,)) 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 22012345 , 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=22012336 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 (22012345) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22012336) result : ((1349745162,), (1349745190,), (1349745217,), (1349745245,), (1349745473,), (1349745479,), (1349745492,), (1349745498,), (1349745502,), (1349745557,), (1349745649,), (1349745679,), (1349745705,), (1349745733,), (1349745755,), (1349746365,), (1349746608,), (1349746665,), (1349746669,), (1349746708,), (1349746933,), (1349747116,), (1349747179,), (1349747207,), (1349747228,), (1349747299,), (1349747452,), (1349747467,), (1349747473,)) 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 22012346 , 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=22012336 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 (22012346) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22012336) result : ((1349745162,), (1349745190,), (1349745217,), (1349745245,), (1349745473,), (1349745479,), (1349745492,), (1349745498,), (1349745502,), (1349745557,), (1349745649,), (1349745679,), (1349745705,), (1349745733,), (1349745755,), (1349746365,), (1349746608,), (1349746665,), (1349746669,), (1349746708,), (1349746933,), (1349747116,), (1349747179,), (1349747207,), (1349747228,), (1349747299,), (1349747452,), (1349747467,), (1349747473,)) 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 22012347 , 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=22012336 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 (22012347) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22012336) result : ((1349745162,), (1349745190,), (1349745217,), (1349745245,), (1349745473,), (1349745479,), (1349745492,), (1349745498,), (1349745502,), (1349745557,), (1349745649,), (1349745679,), (1349745705,), (1349745733,), (1349745755,), (1349746365,), (1349746608,), (1349746665,), (1349746669,), (1349746708,), (1349746933,), (1349747116,), (1349747179,), (1349747207,), (1349747228,), (1349747299,), (1349747452,), (1349747467,), (1349747473,)) 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 22012348 , 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=22012336 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 (22012348) result : ((1349746901,), (1349746903,), (1349747460,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22012336) result : ((1349745162,), (1349745190,), (1349745217,), (1349745245,), (1349745473,), (1349745479,), (1349745492,), (1349745498,), (1349745502,), (1349745557,), (1349745649,), (1349745679,), (1349745705,), (1349745733,), (1349745755,), (1349746365,), (1349746608,), (1349746665,), (1349746669,), (1349746708,), (1349746933,), (1349747116,), (1349747179,), (1349747207,), (1349747228,), (1349747299,), (1349747452,), (1349747467,), (1349747473,)) 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 22012349 , 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=22012336 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 (22012349) result : ((1349746909,), (1349747462,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22012336) result : ((1349745162,), (1349745190,), (1349745217,), (1349745245,), (1349745473,), (1349745479,), (1349745492,), (1349745498,), (1349745502,), (1349745557,), (1349745649,), (1349745679,), (1349745705,), (1349745733,), (1349745755,), (1349746365,), (1349746608,), (1349746665,), (1349746669,), (1349746708,), (1349746933,), (1349747116,), (1349747179,), (1349747207,), (1349747228,), (1349747299,), (1349747452,), (1349747467,), (1349747473,)) 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 22012350 , 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=22012336 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 (22012350) result : ((1349747440,), (1349747441,), (1349747449,), (1349747454,), (1349747455,), (1349747459,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22012336) result : ((1349745162,), (1349745190,), (1349745217,), (1349745245,), (1349745473,), (1349745479,), (1349745492,), (1349745498,), (1349745502,), (1349745557,), (1349745649,), (1349745679,), (1349745705,), (1349745733,), (1349745755,), (1349746365,), (1349746608,), (1349746665,), (1349746669,), (1349746708,), (1349746933,), (1349747116,), (1349747179,), (1349747207,), (1349747228,), (1349747299,), (1349747452,), (1349747467,), (1349747473,)) 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`=22012336 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','Carton_brun','Carton_gris','cartonnette','mal_croppe','metal','papier','flou','autre_refus','environnement','plastique','Teint_Dans_La_Masse')) 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`=22012336 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','Carton_brun','Carton_gris','cartonnette','mal_croppe','metal','papier','flou','autre_refus','environnement','plastique','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'metal': {'main_port_id': 22012336, 'sub_port_id': 22012351, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14507461, 'last_updated_at': datetime.datetime(2025, 4, 3, 8, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 8, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 8, 4, 59)}, 'flou': {'main_port_id': 22012336, 'sub_port_id': 22012352, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14507462, 'last_updated_at': datetime.datetime(2025, 4, 3, 8, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 8, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 8, 4, 59)}, 'autre_refus': {'main_port_id': 22012336, 'sub_port_id': 22012353, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14507463, 'last_updated_at': datetime.datetime(2025, 4, 3, 8, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 8, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 8, 4, 59)}, 'papier': {'main_port_id': 22012336, 'sub_port_id': 22012354, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14507464, 'last_updated_at': datetime.datetime(2025, 4, 3, 8, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 8, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 8, 4, 59)}, 'Carton_brun': {'main_port_id': 22012336, 'sub_port_id': 22012355, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14507465, 'last_updated_at': datetime.datetime(2025, 4, 3, 8, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 8, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 8, 4, 59)}, 'plastique': {'main_port_id': 22012336, 'sub_port_id': 22012356, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14507466, 'last_updated_at': datetime.datetime(2025, 4, 3, 8, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 8, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 8, 4, 59)}, 'kraft': {'main_port_id': 22012336, 'sub_port_id': 22012357, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14507467, 'last_updated_at': datetime.datetime(2025, 4, 3, 8, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 8, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 8, 4, 59)}, 'mal_croppe': {'main_port_id': 22012336, 'sub_port_id': 22012358, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14507468, 'last_updated_at': datetime.datetime(2025, 4, 3, 8, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 8, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 8, 4, 59)}, 'environnement': {'main_port_id': 22012336, 'sub_port_id': 22012359, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14507469, 'last_updated_at': datetime.datetime(2025, 4, 3, 8, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 8, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 8, 4, 59)}, 'Carton_gris': {'main_port_id': 22012336, 'sub_port_id': 22012360, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14507470, 'last_updated_at': datetime.datetime(2025, 4, 3, 8, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 8, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 8, 4, 59)}, 'cartonnette': {'main_port_id': 22012336, 'sub_port_id': 22012361, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14507471, 'last_updated_at': datetime.datetime(2025, 4, 3, 8, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 8, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 8, 4, 59)}, 'Teint_Dans_La_Masse': {'main_port_id': 22012336, 'sub_port_id': 22012362, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14507472, 'last_updated_at': datetime.datetime(2025, 4, 3, 8, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 8, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 8, 4, 59)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22012351,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22012339 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22012352,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22012340 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22012353,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22012341 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22012354,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22012342 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22012355,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22012343 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22012356,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22012344 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22012357,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22012345 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22012358,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22012346 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22012359,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22012347 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22012360,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22012348 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22012361,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22012349 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22012362,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22012350 lien utilise dans velours : https://www.fotonower.com/velours/22012351,22012352,22012353,22012354,22012355,22012356,22012357,22012358,22012359,22012360,22012361,22012362?tags=metal,flou,autre_refus,papier,Carton_brun,plastique,kraft,mal_croppe,environnement,Carton_gris,cartonnette,Teint_Dans_La_Masse After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22012336]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1349747473, 1349747467, 1349747452, 1349747299, 1349747228, 1349747207, 1349747179, 1349747116, 1349746933, 1349746708, 1349746669, 1349746665, 1349746608, 1349746365] map_info['map_portfolio_photo'] : {22012336: [1349747473, 1349747467, 1349747452, 1349747299, 1349747228, 1349747207, 1349747179, 1349747116, 1349746933, 1349746708, 1349746669, 1349746665, 1349746608, 1349746365, 1349745755, 1349745733, 1349745705, 1349745679, 1349745649, 1349745557, 1349745502, 1349745498, 1349745492, 1349745479, 1349745473, 1349745245, 1349745217, 1349745190, 1349745162]} final : False mtd_id 4302 list_pids : [1349747473, 1349747467, 1349747452, 1349747299, 1349747228, 1349747207, 1349747179, 1349747116, 1349746933, 1349746708, 1349746669, 1349746665, 1349746608, 1349746365] Looping around the photos to save general results len do output : 1 /22012336. 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, '2719611') ('4302', '22012336', '1349747473', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349747467', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349747452', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349747299', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349747228', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349747207', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349747179', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349747116', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349746933', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349746708', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349746669', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349746665', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349746608', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349746365', None, None, None, None, None, '2719611') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 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, '22012336', "{'metal': 22012339, 'flou': 22012340, 'autre_refus': 22012341, 'papier': 22012342, 'Carton_brun': 22012343, 'plastique': 22012344, 'kraft': 22012345, 'mal_croppe': 22012346, 'environnement': 22012347, 'Carton_gris': 22012348, 'cartonnette': 22012349, 'Teint_Dans_La_Masse': 22012350}", None, None, None, None, '2719611'), ('4302', '22012336', '1349747473', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349747467', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349747452', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349747299', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349747228', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349747207', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349747179', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349747116', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349746933', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349746708', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349746669', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349746665', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349746608', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349746365', None, None, None, None, None, '2719611')] time used for this insertion : 0.013377904891967773 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.582155466079712 time spend to save output : 0.0137481689453125 total time spend for step 1 : 1.5959036350250244 step2:final Thu Apr 3 08:06:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 (22012336) 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 22012336 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1349745245,1349745217,1349745190,1349745162,1349745502,1349745498,1349745492,1349745479,1349745473,1349745755,1349745733,1349745705,1349745679,1349745557,1349745649,1349746708,1349746669,1349746665,1349746608,1349746365,1349747299,1349747228,1349747207,1349747179,1349747116,1349746933,1349747473,1349747467,1349747452); 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([22012336]) Inside saveOutput : final : False verbose : True original output for save of step final : {1349747473: ('0.048355260691216824',), 1349747467: ('0.048355260691216824',), 1349747452: ('0.048355260691216824',), 1349747299: ('0.048355260691216824',), 1349747228: ('0.048355260691216824',), 1349747207: ('0.048355260691216824',), 1349747179: ('0.048355260691216824',), 1349747116: ('0.048355260691216824',), 1349746933: ('0.048355260691216824',), 1349746708: ('0.048355260691216824',), 1349746669: ('0.048355260691216824',), 1349746665: ('0.048355260691216824',), 1349746608: ('0.048355260691216824',), 1349746365: ('0.048355260691216824',)} new output for save of step final : {1349747473: ('0.048355260691216824',), 1349747467: ('0.048355260691216824',), 1349747452: ('0.048355260691216824',), 1349747299: ('0.048355260691216824',), 1349747228: ('0.048355260691216824',), 1349747207: ('0.048355260691216824',), 1349747179: ('0.048355260691216824',), 1349747116: ('0.048355260691216824',), 1349746933: ('0.048355260691216824',), 1349746708: ('0.048355260691216824',), 1349746669: ('0.048355260691216824',), 1349746665: ('0.048355260691216824',), 1349746608: ('0.048355260691216824',), 1349746365: ('0.048355260691216824',)} [1349747473, 1349747467, 1349747452, 1349747299, 1349747228, 1349747207, 1349747179, 1349747116, 1349746933, 1349746708, 1349746669, 1349746665, 1349746608, 1349746365] map_info['map_portfolio_photo'] : {22012336: [1349747473, 1349747467, 1349747452, 1349747299, 1349747228, 1349747207, 1349747179, 1349747116, 1349746933, 1349746708, 1349746669, 1349746665, 1349746608, 1349746365, 1349745755, 1349745733, 1349745705, 1349745679, 1349745649, 1349745557, 1349745502, 1349745498, 1349745492, 1349745479, 1349745473, 1349745245, 1349745217, 1349745190, 1349745162]} final : False mtd_id 4302 list_pids : [1349747473, 1349747467, 1349747452, 1349747299, 1349747228, 1349747207, 1349747179, 1349747116, 1349746933, 1349746708, 1349746669, 1349746665, 1349746608, 1349746365] Looping around the photos to save general results len do output : 14 /1349747473.Didn't retrieve data . /1349747467.Didn't retrieve data . /1349747452.Didn't retrieve data . /1349747299.Didn't retrieve data . /1349747228.Didn't retrieve data . /1349747207.Didn't retrieve data . /1349747179.Didn't retrieve data . /1349747116.Didn't retrieve data . /1349746933.Didn't retrieve data . /1349746708.Didn't retrieve data . /1349746669.Didn't retrieve data . /1349746665.Didn't retrieve data . /1349746608.Didn't retrieve data . /1349746365.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, '2719611') ('4302', '22012336', '1349747473', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349747467', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349747452', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349747299', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349747228', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349747207', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349747179', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349747116', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349746933', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349746708', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349746669', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349746665', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349746608', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349746365', None, None, None, None, None, '2719611') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 42 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', '22012336', '1349747473', '0.048355260691216824', None, None, None, None, '2719611'), ('4302', '22012336', '1349747467', '0.048355260691216824', None, None, None, None, '2719611'), ('4302', '22012336', '1349747452', '0.048355260691216824', None, None, None, None, '2719611'), ('4302', '22012336', '1349747299', '0.048355260691216824', None, None, None, None, '2719611'), ('4302', '22012336', '1349747228', '0.048355260691216824', None, None, None, None, '2719611'), ('4302', '22012336', '1349747207', '0.048355260691216824', None, None, None, None, '2719611'), ('4302', '22012336', '1349747179', '0.048355260691216824', None, None, None, None, '2719611'), ('4302', '22012336', '1349747116', '0.048355260691216824', None, None, None, None, '2719611'), ('4302', '22012336', '1349746933', '0.048355260691216824', None, None, None, None, '2719611'), ('4302', '22012336', '1349746708', '0.048355260691216824', None, None, None, None, '2719611'), ('4302', '22012336', '1349746669', '0.048355260691216824', None, None, None, None, '2719611'), ('4302', '22012336', '1349746665', '0.048355260691216824', None, None, None, None, '2719611'), ('4302', '22012336', '1349746608', '0.048355260691216824', None, None, None, None, '2719611'), ('4302', '22012336', '1349746365', '0.048355260691216824', None, None, None, None, '2719611')] time used for this insertion : 0.013673067092895508 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.062293052673339844 time spend to save output : 0.014516830444335938 total time spend for step 2 : 0.07680988311767578 step3:velours_tree Thu Apr 3 08:06:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 : {22012336: [{'metal': 22012339, 'flou': 22012340, 'autre_refus': 22012341, 'papier': 22012342, 'Carton_brun': 22012343, 'plastique': 22012344, 'kraft': 22012345, 'mal_croppe': 22012346, 'environnement': 22012347, 'Carton_gris': 22012348, 'cartonnette': 22012349, 'Teint_Dans_La_Masse': 22012350}]} input_args_next_step : {22012336: ()} output_args : {22012336: [{'metal': 22012339, 'flou': 22012340, 'autre_refus': 22012341, 'papier': 22012342, 'Carton_brun': 22012343, 'plastique': 22012344, 'kraft': 22012345, 'mal_croppe': 22012346, 'environnement': 22012347, 'Carton_gris': 22012348, 'cartonnette': 22012349, 'Teint_Dans_La_Masse': 22012350}]} args : 22012336 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 : ({'metal': 22012339, 'flou': 22012340, 'autre_refus': 22012341, 'papier': 22012342, 'Carton_brun': 22012343, 'plastique': 22012344, 'kraft': 22012345, 'mal_croppe': 22012346, 'environnement': 22012347, 'Carton_gris': 22012348, 'cartonnette': 22012349, 'Teint_Dans_La_Masse': 22012350},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22012336) 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([22012336]) 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.3264029026031494 time spend to save output : 4.506111145019531e-05 total time spend for step 3 : 0.3264479637145996 step4:send_mail_cod Thu Apr 3 08:06:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 : {1349747473: ('0.048355260691216824',), 1349747467: ('0.048355260691216824',), 1349747452: ('0.048355260691216824',), 1349747299: ('0.048355260691216824',), 1349747228: ('0.048355260691216824',), 1349747207: ('0.048355260691216824',), 1349747179: ('0.048355260691216824',), 1349747116: ('0.048355260691216824',), 1349746933: ('0.048355260691216824',), 1349746708: ('0.048355260691216824',), 1349746669: ('0.048355260691216824',), 1349746665: ('0.048355260691216824',), 1349746608: ('0.048355260691216824',), 1349746365: ('0.048355260691216824',)} input_args_next_step : {1349747473: ()} output_args : {1349747473: ('0.048355260691216824',), 1349747467: ('0.048355260691216824',), 1349747452: ('0.048355260691216824',), 1349747299: ('0.048355260691216824',), 1349747228: ('0.048355260691216824',), 1349747207: ('0.048355260691216824',), 1349747179: ('0.048355260691216824',), 1349747116: ('0.048355260691216824',), 1349746933: ('0.048355260691216824',), 1349746708: ('0.048355260691216824',), 1349746669: ('0.048355260691216824',), 1349746665: ('0.048355260691216824',), 1349746608: ('0.048355260691216824',), 1349746365: ('0.048355260691216824',)} args : 1349747473 depend.output_id : 0 input_args_next_step : {1349747473: ('0.048355260691216824',), 1349747467: ()} output_args : {1349747473: ('0.048355260691216824',), 1349747467: ('0.048355260691216824',), 1349747452: ('0.048355260691216824',), 1349747299: ('0.048355260691216824',), 1349747228: ('0.048355260691216824',), 1349747207: ('0.048355260691216824',), 1349747179: ('0.048355260691216824',), 1349747116: ('0.048355260691216824',), 1349746933: ('0.048355260691216824',), 1349746708: ('0.048355260691216824',), 1349746669: ('0.048355260691216824',), 1349746665: ('0.048355260691216824',), 1349746608: ('0.048355260691216824',), 1349746365: ('0.048355260691216824',)} args : 1349747467 depend.output_id : 0 input_args_next_step : {1349747473: ('0.048355260691216824',), 1349747467: ('0.048355260691216824',), 1349747452: ()} output_args : {1349747473: ('0.048355260691216824',), 1349747467: ('0.048355260691216824',), 1349747452: ('0.048355260691216824',), 1349747299: ('0.048355260691216824',), 1349747228: ('0.048355260691216824',), 1349747207: ('0.048355260691216824',), 1349747179: ('0.048355260691216824',), 1349747116: ('0.048355260691216824',), 1349746933: ('0.048355260691216824',), 1349746708: ('0.048355260691216824',), 1349746669: ('0.048355260691216824',), 1349746665: ('0.048355260691216824',), 1349746608: ('0.048355260691216824',), 1349746365: ('0.048355260691216824',)} args : 1349747452 depend.output_id : 0 input_args_next_step : {1349747473: ('0.048355260691216824',), 1349747467: ('0.048355260691216824',), 1349747452: ('0.048355260691216824',), 1349747299: ()} output_args : {1349747473: ('0.048355260691216824',), 1349747467: ('0.048355260691216824',), 1349747452: ('0.048355260691216824',), 1349747299: ('0.048355260691216824',), 1349747228: ('0.048355260691216824',), 1349747207: ('0.048355260691216824',), 1349747179: ('0.048355260691216824',), 1349747116: ('0.048355260691216824',), 1349746933: ('0.048355260691216824',), 1349746708: ('0.048355260691216824',), 1349746669: ('0.048355260691216824',), 1349746665: ('0.048355260691216824',), 1349746608: ('0.048355260691216824',), 1349746365: ('0.048355260691216824',)} args : 1349747299 depend.output_id : 0 input_args_next_step : {1349747473: ('0.048355260691216824',), 1349747467: ('0.048355260691216824',), 1349747452: ('0.048355260691216824',), 1349747299: ('0.048355260691216824',), 1349747228: ()} output_args : {1349747473: ('0.048355260691216824',), 1349747467: ('0.048355260691216824',), 1349747452: ('0.048355260691216824',), 1349747299: ('0.048355260691216824',), 1349747228: ('0.048355260691216824',), 1349747207: ('0.048355260691216824',), 1349747179: ('0.048355260691216824',), 1349747116: ('0.048355260691216824',), 1349746933: ('0.048355260691216824',), 1349746708: ('0.048355260691216824',), 1349746669: ('0.048355260691216824',), 1349746665: ('0.048355260691216824',), 1349746608: ('0.048355260691216824',), 1349746365: ('0.048355260691216824',)} args : 1349747228 depend.output_id : 0 input_args_next_step : {1349747473: ('0.048355260691216824',), 1349747467: ('0.048355260691216824',), 1349747452: ('0.048355260691216824',), 1349747299: ('0.048355260691216824',), 1349747228: ('0.048355260691216824',), 1349747207: ()} output_args : {1349747473: ('0.048355260691216824',), 1349747467: ('0.048355260691216824',), 1349747452: ('0.048355260691216824',), 1349747299: ('0.048355260691216824',), 1349747228: ('0.048355260691216824',), 1349747207: ('0.048355260691216824',), 1349747179: ('0.048355260691216824',), 1349747116: ('0.048355260691216824',), 1349746933: ('0.048355260691216824',), 1349746708: ('0.048355260691216824',), 1349746669: ('0.048355260691216824',), 1349746665: ('0.048355260691216824',), 1349746608: ('0.048355260691216824',), 1349746365: ('0.048355260691216824',)} args : 1349747207 depend.output_id : 0 input_args_next_step : {1349747473: ('0.048355260691216824',), 1349747467: ('0.048355260691216824',), 1349747452: ('0.048355260691216824',), 1349747299: ('0.048355260691216824',), 1349747228: ('0.048355260691216824',), 1349747207: ('0.048355260691216824',), 1349747179: ()} output_args : {1349747473: ('0.048355260691216824',), 1349747467: ('0.048355260691216824',), 1349747452: ('0.048355260691216824',), 1349747299: ('0.048355260691216824',), 1349747228: ('0.048355260691216824',), 1349747207: ('0.048355260691216824',), 1349747179: ('0.048355260691216824',), 1349747116: ('0.048355260691216824',), 1349746933: ('0.048355260691216824',), 1349746708: ('0.048355260691216824',), 1349746669: ('0.048355260691216824',), 1349746665: ('0.048355260691216824',), 1349746608: ('0.048355260691216824',), 1349746365: ('0.048355260691216824',)} args : 1349747179 depend.output_id : 0 input_args_next_step : {1349747473: ('0.048355260691216824',), 1349747467: ('0.048355260691216824',), 1349747452: ('0.048355260691216824',), 1349747299: ('0.048355260691216824',), 1349747228: ('0.048355260691216824',), 1349747207: ('0.048355260691216824',), 1349747179: ('0.048355260691216824',), 1349747116: ()} output_args : {1349747473: ('0.048355260691216824',), 1349747467: ('0.048355260691216824',), 1349747452: ('0.048355260691216824',), 1349747299: ('0.048355260691216824',), 1349747228: ('0.048355260691216824',), 1349747207: ('0.048355260691216824',), 1349747179: ('0.048355260691216824',), 1349747116: ('0.048355260691216824',), 1349746933: ('0.048355260691216824',), 1349746708: ('0.048355260691216824',), 1349746669: ('0.048355260691216824',), 1349746665: ('0.048355260691216824',), 1349746608: ('0.048355260691216824',), 1349746365: ('0.048355260691216824',)} args : 1349747116 depend.output_id : 0 input_args_next_step : {1349747473: ('0.048355260691216824',), 1349747467: ('0.048355260691216824',), 1349747452: ('0.048355260691216824',), 1349747299: ('0.048355260691216824',), 1349747228: ('0.048355260691216824',), 1349747207: ('0.048355260691216824',), 1349747179: ('0.048355260691216824',), 1349747116: ('0.048355260691216824',), 1349746933: ()} output_args : {1349747473: ('0.048355260691216824',), 1349747467: ('0.048355260691216824',), 1349747452: ('0.048355260691216824',), 1349747299: ('0.048355260691216824',), 1349747228: ('0.048355260691216824',), 1349747207: ('0.048355260691216824',), 1349747179: ('0.048355260691216824',), 1349747116: ('0.048355260691216824',), 1349746933: ('0.048355260691216824',), 1349746708: ('0.048355260691216824',), 1349746669: ('0.048355260691216824',), 1349746665: ('0.048355260691216824',), 1349746608: ('0.048355260691216824',), 1349746365: ('0.048355260691216824',)} args : 1349746933 depend.output_id : 0 input_args_next_step : {1349747473: ('0.048355260691216824',), 1349747467: ('0.048355260691216824',), 1349747452: ('0.048355260691216824',), 1349747299: ('0.048355260691216824',), 1349747228: ('0.048355260691216824',), 1349747207: ('0.048355260691216824',), 1349747179: ('0.048355260691216824',), 1349747116: ('0.048355260691216824',), 1349746933: ('0.048355260691216824',), 1349746708: ()} output_args : {1349747473: ('0.048355260691216824',), 1349747467: ('0.048355260691216824',), 1349747452: ('0.048355260691216824',), 1349747299: ('0.048355260691216824',), 1349747228: ('0.048355260691216824',), 1349747207: ('0.048355260691216824',), 1349747179: ('0.048355260691216824',), 1349747116: ('0.048355260691216824',), 1349746933: ('0.048355260691216824',), 1349746708: ('0.048355260691216824',), 1349746669: ('0.048355260691216824',), 1349746665: ('0.048355260691216824',), 1349746608: ('0.048355260691216824',), 1349746365: ('0.048355260691216824',)} args : 1349746708 depend.output_id : 0 input_args_next_step : {1349747473: ('0.048355260691216824',), 1349747467: ('0.048355260691216824',), 1349747452: ('0.048355260691216824',), 1349747299: ('0.048355260691216824',), 1349747228: ('0.048355260691216824',), 1349747207: ('0.048355260691216824',), 1349747179: ('0.048355260691216824',), 1349747116: ('0.048355260691216824',), 1349746933: ('0.048355260691216824',), 1349746708: ('0.048355260691216824',), 1349746669: ()} output_args : {1349747473: ('0.048355260691216824',), 1349747467: ('0.048355260691216824',), 1349747452: ('0.048355260691216824',), 1349747299: ('0.048355260691216824',), 1349747228: ('0.048355260691216824',), 1349747207: ('0.048355260691216824',), 1349747179: ('0.048355260691216824',), 1349747116: ('0.048355260691216824',), 1349746933: ('0.048355260691216824',), 1349746708: ('0.048355260691216824',), 1349746669: ('0.048355260691216824',), 1349746665: ('0.048355260691216824',), 1349746608: ('0.048355260691216824',), 1349746365: ('0.048355260691216824',)} args : 1349746669 depend.output_id : 0 input_args_next_step : {1349747473: ('0.048355260691216824',), 1349747467: ('0.048355260691216824',), 1349747452: ('0.048355260691216824',), 1349747299: ('0.048355260691216824',), 1349747228: ('0.048355260691216824',), 1349747207: ('0.048355260691216824',), 1349747179: ('0.048355260691216824',), 1349747116: ('0.048355260691216824',), 1349746933: ('0.048355260691216824',), 1349746708: ('0.048355260691216824',), 1349746669: ('0.048355260691216824',), 1349746665: ()} output_args : {1349747473: ('0.048355260691216824',), 1349747467: ('0.048355260691216824',), 1349747452: ('0.048355260691216824',), 1349747299: ('0.048355260691216824',), 1349747228: ('0.048355260691216824',), 1349747207: ('0.048355260691216824',), 1349747179: ('0.048355260691216824',), 1349747116: ('0.048355260691216824',), 1349746933: ('0.048355260691216824',), 1349746708: ('0.048355260691216824',), 1349746669: ('0.048355260691216824',), 1349746665: ('0.048355260691216824',), 1349746608: ('0.048355260691216824',), 1349746365: ('0.048355260691216824',)} args : 1349746665 depend.output_id : 0 input_args_next_step : {1349747473: ('0.048355260691216824',), 1349747467: ('0.048355260691216824',), 1349747452: ('0.048355260691216824',), 1349747299: ('0.048355260691216824',), 1349747228: ('0.048355260691216824',), 1349747207: ('0.048355260691216824',), 1349747179: ('0.048355260691216824',), 1349747116: ('0.048355260691216824',), 1349746933: ('0.048355260691216824',), 1349746708: ('0.048355260691216824',), 1349746669: ('0.048355260691216824',), 1349746665: ('0.048355260691216824',), 1349746608: ()} output_args : {1349747473: ('0.048355260691216824',), 1349747467: ('0.048355260691216824',), 1349747452: ('0.048355260691216824',), 1349747299: ('0.048355260691216824',), 1349747228: ('0.048355260691216824',), 1349747207: ('0.048355260691216824',), 1349747179: ('0.048355260691216824',), 1349747116: ('0.048355260691216824',), 1349746933: ('0.048355260691216824',), 1349746708: ('0.048355260691216824',), 1349746669: ('0.048355260691216824',), 1349746665: ('0.048355260691216824',), 1349746608: ('0.048355260691216824',), 1349746365: ('0.048355260691216824',)} args : 1349746608 depend.output_id : 0 input_args_next_step : {1349747473: ('0.048355260691216824',), 1349747467: ('0.048355260691216824',), 1349747452: ('0.048355260691216824',), 1349747299: ('0.048355260691216824',), 1349747228: ('0.048355260691216824',), 1349747207: ('0.048355260691216824',), 1349747179: ('0.048355260691216824',), 1349747116: ('0.048355260691216824',), 1349746933: ('0.048355260691216824',), 1349746708: ('0.048355260691216824',), 1349746669: ('0.048355260691216824',), 1349746665: ('0.048355260691216824',), 1349746608: ('0.048355260691216824',), 1349746365: ()} output_args : {1349747473: ('0.048355260691216824',), 1349747467: ('0.048355260691216824',), 1349747452: ('0.048355260691216824',), 1349747299: ('0.048355260691216824',), 1349747228: ('0.048355260691216824',), 1349747207: ('0.048355260691216824',), 1349747179: ('0.048355260691216824',), 1349747116: ('0.048355260691216824',), 1349746933: ('0.048355260691216824',), 1349746708: ('0.048355260691216824',), 1349746669: ('0.048355260691216824',), 1349746665: ('0.048355260691216824',), 1349746608: ('0.048355260691216824',), 1349746365: ('0.048355260691216824',)} args : 1349746365 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 : {22012336: [{'metal': 22012339, 'flou': 22012340, 'autre_refus': 22012341, 'papier': 22012342, 'Carton_brun': 22012343, 'plastique': 22012344, 'kraft': 22012345, 'mal_croppe': 22012346, 'environnement': 22012347, 'Carton_gris': 22012348, 'cartonnette': 22012349, 'Teint_Dans_La_Masse': 22012350}]} input_args_next_step : {1349747473: ('0.048355260691216824',), 1349747467: ('0.048355260691216824',), 1349747452: ('0.048355260691216824',), 1349747299: ('0.048355260691216824',), 1349747228: ('0.048355260691216824',), 1349747207: ('0.048355260691216824',), 1349747179: ('0.048355260691216824',), 1349747116: ('0.048355260691216824',), 1349746933: ('0.048355260691216824',), 1349746708: ('0.048355260691216824',), 1349746669: ('0.048355260691216824',), 1349746665: ('0.048355260691216824',), 1349746608: ('0.048355260691216824',), 1349746365: ('0.048355260691216824',), 22012336: ()} output_args : {22012336: [{'metal': 22012339, 'flou': 22012340, 'autre_refus': 22012341, 'papier': 22012342, 'Carton_brun': 22012343, 'plastique': 22012344, 'kraft': 22012345, 'mal_croppe': 22012346, 'environnement': 22012347, 'Carton_gris': 22012348, 'cartonnette': 22012349, 'Teint_Dans_La_Masse': 22012350}]} args : 22012336 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 :15, first value : ('0.048355260691216824',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22012336) 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 (1349747473,1349747467,1349747452,1349747299,1349747228,1349747207,1349747179,1349747116,1349746933,1349746708,1349746669,1349746665,1349746608,1349746365) Found this number of photos: 14 ##### Call download_photos : nb_thread : 5 begin to download photo : 1349746365 begin to download photo : 1349746669 begin to download photo : 1349747116 begin to download photo : 1349747228 begin to download photo : 1349747467 download finish for photo 1349747467 begin to download photo : 1349747473 download finish for photo 1349747116 begin to download photo : 1349747179 download finish for photo 1349747228 begin to download photo : 1349747299 download finish for photo 1349746669 begin to download photo : 1349746708 download finish for photo 1349746365 begin to download photo : 1349746608 download finish for photo 1349747179 begin to download photo : 1349747207 download finish for photo 1349747473 download finish for photo 1349746608 begin to download photo : 1349746665 download finish for photo 1349746708 begin to download photo : 1349746933 download finish for photo 1349747299 begin to download photo : 1349747452 download finish for photo 1349747207 download finish for photo 1349746933 download finish for photo 1349746665 download finish for photo 1349747452 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette220123391743660418/ imagette220123401743660418/ length of list_filenames : 14 ; length of list_pids : 14 ; length of list_args : 14 results_Auto_P22012336_03-04-2025_08_06_58.pdf 22012339 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=22012339 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220123391743660418 22012340 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=22012340 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220123401743660418 22012341 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=22012341 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349747444: '1743660314_2022889_1349745498_6f3c4a1c378bbc18312f619b3c2f4745_rle_crop_3745837956_0.png', 1349747445: '1743660314_2022889_1349745498_6f3c4a1c378bbc18312f619b3c2f4745_rle_crop_3745837953_0.png', 1349747446: '1743660314_2022889_1349745473_8da4c580bf7e2f64959a51c862f10254_rle_crop_3745838074_0.png', 1349747447: '1743660314_2022889_1349745473_8da4c580bf7e2f64959a51c862f10254_rle_crop_3745838079_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/0570cc0e69d1d7bdd43ebbbdc5a08e0c_33560482.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/4c246f5b50520486af4a458e0ca1264f_5021512.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/406bc852182f1259e5c5bf8168837236_51974109.png change filename to text .imagette220123411743660418/ imagette220123411743660418/1743660314_2022889_1349745498_6f3c4a1c378bbc18312f619b3c2f4745_rle_crop_3745837953_0.png.png imagette220123411743660418/1743660314_2022889_1349745473_8da4c580bf7e2f64959a51c862f10254_rle_crop_3745838079_0.png.png imagette220123411743660418/1743660314_2022889_1349745498_6f3c4a1c378bbc18312f619b3c2f4745_rle_crop_3745837956_0.png.png imagette220123411743660418/1743660314_2022889_1349745473_8da4c580bf7e2f64959a51c862f10254_rle_crop_3745838074_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/d2be02e6a754793b07abd0cb8855f378_55515799.png imagette220123411743660418 22012344 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=22012344 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349747030: '1743660251_2022179_1349745217_f07b10103be881f7980b62ed2923b886_rle_crop_3745837590_0.png', 1349747032: '1743660251_2022179_1349745217_f07b10103be881f7980b62ed2923b886_rle_crop_3745837587_0.png', 1349747448: '1743660314_2022889_1349745492_4a59236500935991be9f087662f00e94_rle_crop_3745837983_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/bfdcdf4cb83eabcdb83266d5048f7781_17962452.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/6c109514f87a71b83530afefeebfdda3_16276420.png change filename to text .imagette220123441743660418/ imagette220123441743660418/1743660251_2022179_1349745217_f07b10103be881f7980b62ed2923b886_rle_crop_3745837587_0.png.png imagette220123441743660418/1743660314_2022889_1349745492_4a59236500935991be9f087662f00e94_rle_crop_3745837983_0.png.png imagette220123441743660418/1743660251_2022179_1349745217_f07b10103be881f7980b62ed2923b886_rle_crop_3745837590_0.png.png imagette220123451743660418/ imagette220123461743660418/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/2804d7bd2a10bcd9742bd9eb55d6fc35_41625794.png imagette220123441743660418 22012345 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=22012345 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220123451743660418 22012346 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=22012346 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220123461743660418 22012349 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=22012349 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349746909: '1743660251_2022179_1349745162_0a90b61e135c0b9d8341cde84143618e_rle_crop_3745837607_0.png', 1349747462: '1743660327_399534_1349745557_b7d6f6c76c3fbec9feec17dc3bdd638d_rle_crop_3745838089_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/8b2a06b550234f7b64764c3b32fc4741_38206283.png change filename to text .imagette220123491743660418/ imagette220123491743660418/1743660327_399534_1349745557_b7d6f6c76c3fbec9feec17dc3bdd638d_rle_crop_3745838089_0.png.png imagette220123491743660418/1743660251_2022179_1349745162_0a90b61e135c0b9d8341cde84143618e_rle_crop_3745837607_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/9a1183e57f34a8154222f7d67d1c5cec_19324280.png imagette220123491743660418 22012343 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=22012343 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349746986: '1743660251_2022179_1349745217_f07b10103be881f7980b62ed2923b886_rle_crop_3745837594_0.png', 1349746987: '1743660251_2022179_1349745217_f07b10103be881f7980b62ed2923b886_rle_crop_3745837592_0.png', 1349747463: '1743660327_399534_1349745649_79f4519096c61ca4ba2d048b7402e1fd_rle_crop_3745838060_0.png', 1349747464: '1743660327_399534_1349745557_b7d6f6c76c3fbec9feec17dc3bdd638d_rle_crop_3745838090_0.png', 1349747465: '1743660327_399534_1349745557_b7d6f6c76c3fbec9feec17dc3bdd638d_rle_crop_3745838094_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/35442e0d61313fe3f0ecf7fcae38385d_42279933.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/5383b7c7acd15ef63062589ac440677f_9679227.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/8695354aa0ff93c924d2d8c1ede5b84f_14527917.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/f7060b36d83a2eb936caa26bc2286c92_80114620.png change filename to text .imagette220123431743660418/ imagette220123431743660418/1743660251_2022179_1349745217_f07b10103be881f7980b62ed2923b886_rle_crop_3745837592_0.png.png imagette220123431743660418/1743660327_399534_1349745557_b7d6f6c76c3fbec9feec17dc3bdd638d_rle_crop_3745838094_0.png.png imagette220123431743660418/1743660251_2022179_1349745217_f07b10103be881f7980b62ed2923b886_rle_crop_3745837594_0.png.png imagette220123431743660418/1743660327_399534_1349745557_b7d6f6c76c3fbec9feec17dc3bdd638d_rle_crop_3745838090_0.png.png imagette220123431743660418/1743660327_399534_1349745649_79f4519096c61ca4ba2d048b7402e1fd_rle_crop_3745838060_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/963db793b85a4969b05819793aee85a4_48708323.png imagette220123431743660418 22012348 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=22012348 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349746901: '1743660251_2022179_1349745162_0a90b61e135c0b9d8341cde84143618e_rle_crop_3745837608_0.png', 1349746903: '1743660251_2022179_1349745162_0a90b61e135c0b9d8341cde84143618e_rle_crop_3745837611_0.png', 1349747460: '1743660327_399534_1349745705_23c7557e078322c0780d742facde2d44_rle_crop_3745837963_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/3f62bee9b79bae2eb97eee389e822af9_78055361.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/c2bad2b6ae1f60c1785900c838c23541_20181186.png change filename to text .imagette220123481743660419/ imagette220123481743660419/1743660251_2022179_1349745162_0a90b61e135c0b9d8341cde84143618e_rle_crop_3745837608_0.png.png imagette220123481743660419/1743660251_2022179_1349745162_0a90b61e135c0b9d8341cde84143618e_rle_crop_3745837611_0.png.png imagette220123481743660419/1743660327_399534_1349745705_23c7557e078322c0780d742facde2d44_rle_crop_3745837963_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/356d2803cee9240687d75fab8c33dc06_54860399.png imagette220123481743660419 22012350 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=22012350 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349747440: '1743660314_2022889_1349745492_4a59236500935991be9f087662f00e94_rle_crop_3745837981_0.png', 1349747441: '1743660314_2022889_1349745473_8da4c580bf7e2f64959a51c862f10254_rle_crop_3745838076_0.png', 1349747449: '1743660327_399534_1349745705_23c7557e078322c0780d742facde2d44_rle_crop_3745837967_0.png', 1349747454: '1743660327_399534_1349745649_79f4519096c61ca4ba2d048b7402e1fd_rle_crop_3745838054_0.png', 1349747455: '1743660327_399534_1349745649_79f4519096c61ca4ba2d048b7402e1fd_rle_crop_3745838061_0.png', 1349747459: '1743660327_399534_1349745649_79f4519096c61ca4ba2d048b7402e1fd_rle_crop_3745838056_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/9607803bfdf7bf64baa7060aa4520d95_878074.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/b28ddaf097e3c7bb1dbfd36d87212389_42134703.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/d4f2a5af255ffb8a2a6b069ed4ea7ef3_7613166.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/286c9776a068525b0207755c8325ed1d_65099567.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/5430562e549b98fd215fc8a6f99474c1_19439344.png change filename to text .imagette220123501743660419/ imagette220123501743660419/1743660314_2022889_1349745492_4a59236500935991be9f087662f00e94_rle_crop_3745837981_0.png.png imagette220123501743660419/1743660327_399534_1349745649_79f4519096c61ca4ba2d048b7402e1fd_rle_crop_3745838056_0.png.png imagette220123501743660419/1743660327_399534_1349745705_23c7557e078322c0780d742facde2d44_rle_crop_3745837967_0.png.png imagette220123501743660419/1743660327_399534_1349745649_79f4519096c61ca4ba2d048b7402e1fd_rle_crop_3745838054_0.png.png imagette220123501743660419/1743660327_399534_1349745649_79f4519096c61ca4ba2d048b7402e1fd_rle_crop_3745838061_0.png.png imagette220123501743660419/1743660314_2022889_1349745473_8da4c580bf7e2f64959a51c862f10254_rle_crop_3745838076_0.png.png wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/7d087d9fb3776803e33ec00893f51d22_17878662.png imagette220123501743660419 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22012336 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22012351,22012352,22012353,22012354,22012355,22012356,22012357,22012358,22012359,22012360,22012361,22012362?tags=metal,flou,autre_refus,papier,Carton_brun,plastique,kraft,mal_croppe,environnement,Carton_gris,cartonnette,Teint_Dans_La_Masse your option no_mail is active, we will not send the real mail to your client args[1349747473] : ('0.048355260691216824',) no score found for photo 1349747473 We are sending mail with results at report@fotonower.com args[1349747467] : ('0.048355260691216824',) no score found for photo 1349747467 We are sending mail with results at report@fotonower.com args[1349747452] : ('0.048355260691216824',) no score found for photo 1349747452 We are sending mail with results at report@fotonower.com args[1349747299] : ('0.048355260691216824',) no score found for photo 1349747299 We are sending mail with results at report@fotonower.com args[1349747228] : ('0.048355260691216824',) no score found for photo 1349747228 We are sending mail with results at report@fotonower.com args[1349747207] : ('0.048355260691216824',) no score found for photo 1349747207 We are sending mail with results at report@fotonower.com args[1349747179] : ('0.048355260691216824',) no score found for photo 1349747179 We are sending mail with results at report@fotonower.com args[1349747116] : ('0.048355260691216824',) no score found for photo 1349747116 We are sending mail with results at report@fotonower.com args[1349746933] : ('0.048355260691216824',) no score found for photo 1349746933 We are sending mail with results at report@fotonower.com args[1349746708] : ('0.048355260691216824',) no score found for photo 1349746708 We are sending mail with results at report@fotonower.com args[1349746669] : ('0.048355260691216824',) no score found for photo 1349746669 We are sending mail with results at report@fotonower.com args[1349746665] : ('0.048355260691216824',) no score found for photo 1349746665 We are sending mail with results at report@fotonower.com args[1349746608] : ('0.048355260691216824',) no score found for photo 1349746608 We are sending mail with results at report@fotonower.com args[1349746365] : ('0.048355260691216824',) no score found for photo 1349746365 We are sending mail with results at report@fotonower.com refus_total : 0.048355260691216824 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=22012336 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_P22012336_03-04-2025_08_06_58.pdf results_Auto_P22012336_03-04-2025_08_06_58.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22012336_03-04-2025_08_06_58.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','22012336','results_Auto_P22012336_03-04-2025_08_06_58.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22012336_03-04-2025_08_06_58.pdf','pdf','','0.19','0.048355260691216824') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22012336]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1349747473, 1349747467, 1349747452, 1349747299, 1349747228, 1349747207, 1349747179, 1349747116, 1349746933, 1349746708, 1349746669, 1349746665, 1349746608, 1349746365] map_info['map_portfolio_photo'] : {22012336: [1349747473, 1349747467, 1349747452, 1349747299, 1349747228, 1349747207, 1349747179, 1349747116, 1349746933, 1349746708, 1349746669, 1349746665, 1349746608, 1349746365, 1349745755, 1349745733, 1349745705, 1349745679, 1349745649, 1349745557, 1349745502, 1349745498, 1349745492, 1349745479, 1349745473, 1349745245, 1349745217, 1349745190, 1349745162]} final : False mtd_id 4302 list_pids : [1349747473, 1349747467, 1349747452, 1349747299, 1349747228, 1349747207, 1349747179, 1349747116, 1349746933, 1349746708, 1349746669, 1349746665, 1349746608, 1349746365] 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, '2719611') ('4302', '22012336', '1349747473', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349747467', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349747452', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349747299', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349747228', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349747207', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349747179', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349747116', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349746933', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349746708', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349746669', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349746665', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349746608', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349746365', None, None, None, None, None, '2719611') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 14 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', '22012336', '1349747473', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349747467', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349747452', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349747299', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349747228', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349747207', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349747179', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349747116', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349746933', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349746708', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349746669', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349746665', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349746608', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349746365', None, None, None, None, None, '2719611')] time used for this insertion : 0.013343095779418945 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.0149459838867188 time spend to save output : 0.013592004776000977 total time spend for step 4 : 3.0285379886627197 step5:split_time_score Thu Apr 3 08:07: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 : ['22012336'] 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 : [('22012336',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22012336) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1349747467: {'path': 'temp/1743660417_2189484_1349747467_c4131f643cebce5a18ede837735365e5.jpg', 'extension': 'jpg'}, 1349747473: {'path': 'temp/1743660417_2189484_1349747473_ac8f3b77fc6358757465397b3f8ee4ea.jpg', 'extension': 'jpg'}, 1349747116: {'path': 'temp/1743660417_2189484_1349747116_30d3a8dbb7f23e04fdc040be617ea14a.jpg', 'extension': 'jpg'}, 1349747179: {'path': 'temp/1743660417_2189484_1349747179_8b3baf4c9b8b37d09f47a51cce624dd7.jpg', 'extension': 'jpg'}, 1349747207: {'path': 'temp/1743660417_2189484_1349747207_f7537b9e45b767270138523e28d0756f.jpg', 'extension': 'jpg'}, 1349746669: {'path': 'temp/1743660417_2189484_1349746669_762f60933abceb3df8b3aa740a011dd1.jpg', 'extension': 'jpg'}, 1349746708: {'path': 'temp/1743660417_2189484_1349746708_bbf37734d0573ce52e9ff91af446567f.jpg', 'extension': 'jpg'}, 1349746933: {'path': 'temp/1743660417_2189484_1349746933_b34ca12c8c057c8b491a122a128ff5ae.jpg', 'extension': 'jpg'}, 1349746365: {'path': 'temp/1743660417_2189484_1349746365_2255d151822c5881e20721ac024bf9c6.jpg', 'extension': 'jpg'}, 1349746608: {'path': 'temp/1743660417_2189484_1349746608_4ec361541f0f4f3c22667e8092b8c167.jpg', 'extension': 'jpg'}, 1349746665: {'path': 'temp/1743660417_2189484_1349746665_691fb03b56f985bec9a4bba0040fb55c.jpg', 'extension': 'jpg'}, 1349747228: {'path': 'temp/1743660417_2189484_1349747228_7cabb36b37de68f7f0bf3a662c0c6184.jpg', 'extension': 'jpg'}, 1349747299: {'path': 'temp/1743660417_2189484_1349747299_89f06771d74ccb8fd491801d5b7d3300.jpg', 'extension': 'jpg'}, 1349747452: {'path': 'temp/1743660417_2189484_1349747452_da8e01c1f0b4be4666661045096a531d.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 = 22012336; (('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 = 22012336 group by h (('08', 29),) 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=22012336 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 (22012336) 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 (22012336) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 03042025 22012336 Nombre de photos uploadées : 29 / 23040 (0%) 03042025 22012336 Nombre de photos taguées (types de déchets): 0 / 29 (0%) 03042025 22012336 Nombre de photos taguées (volume) : 0 / 29 (0%) [{'photo_id': 1349745245, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/6db23b1dd513c9c03305ea6dd0c910da.jpg', 'username': None, 'uploaded_at': 1743660067, 'text': 'image_03042025_08_00_14_10208.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1349745217, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/f07b10103be881f7980b62ed2923b886.jpg', 'username': None, 'uploaded_at': 1743660067, 'text': 'image_03042025_08_00_24_10137.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1349745190, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/c0cf21176661bf7f6b362ee621e6b8aa.jpg', 'username': None, 'uploaded_at': 1743660067, 'text': 'image_03042025_08_00_34_10134.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1349745162, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/0a90b61e135c0b9d8341cde84143618e.jpg', 'username': None, 'uploaded_at': 1743660067, 'text': 'image_03042025_08_00_44_10137.jpg 4e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 1.430511474609375e-06 elapsed_time : order_list_meta_photo_and_scores 3.814697265625e-06 ????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0018029212951660156 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 22012336, '2025-04-03' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1712161,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.03597879409790039 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= 1712161 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1712161, 'dashboard_run_id': 1720812, 'mtr_portfolio_id': 22010196, 'dashboard_result_id': 9839448, '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_P22010196_03-04-2025_07_33_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22010258, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22010259, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22010260, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22010261, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22010262, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22010263, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22010264, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22010265, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22010266, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22010267, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22010268, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22010269, 'pht': 3726}}"}, {'dashboat_entry_day': 1712161, 'dashboard_run_id': 1720812, 'mtr_portfolio_id': 22010987, 'dashboard_result_id': 9839449, '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_P22010987_03-04-2025_07_47_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22011012, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22011013, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22011014, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22011015, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22011016, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22011017, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22011018, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22011019, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22011020, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22011021, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22011022, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22011023, 'pht': 3726}}"}, {'dashboat_entry_day': 1712161, 'dashboard_run_id': 1720812, 'mtr_portfolio_id': 22011757, 'dashboard_result_id': 9839450, '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_P22011757_03-04-2025_08_03_04.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22011759, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22011760, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22011761, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22011762, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22011763, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22011764, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22011765, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22011766, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22011767, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22011768, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22011769, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22011770, 'pht': 3726}}"}, {'dashboat_entry_day': 1712161, 'dashboard_run_id': 1720812, 'mtr_portfolio_id': 22012336, 'dashboard_result_id': 9839451, '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_P22012336_03-04-2025_08_05_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 22012339, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22012340, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22012341, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22012342, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22012343, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22012344, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22012345, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22012346, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22012347, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22012348, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22012349, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22012350, '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 = 22010196 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': 2719431, 'mtr_portfolio_id': 22010196, 'created_at': datetime.datetime(2025, 4, 3, 7, 32, 59), 'result': '0.047099162704770416', 'result_long': None, 'result_double': None}] Qualite : 0.047099162704770416 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22010196 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22010196_03-04-2025_07_33_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22010196 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_P22010196_03-04-2025_07_33_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22010258, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22010259, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22010260, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22010261, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22010262, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22010263, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22010264, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22010265, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22010266, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22010267, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22010268, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22010269, 'pht': 3726}}" where mtr_portfolio_id = 22010196 and dashboard_run_id = 1720812 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`=22010196 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9839448, 0.047099162704770416, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22010196_03-04-2025_07_33_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22010258, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22010259, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22010260, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22010261, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22010262, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22010263, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22010264, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22010265, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22010266, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22010267, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22010268, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22010269, '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 = 22010987 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': 2719497, 'mtr_portfolio_id': 22010987, 'created_at': datetime.datetime(2025, 4, 3, 7, 46, 59), 'result': '0.04079066086446344', 'result_long': None, 'result_double': None}] Qualite : 0.04079066086446344 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22010987 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22010987_03-04-2025_07_47_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22010987 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_P22010987_03-04-2025_07_47_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22011012, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22011013, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22011014, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22011015, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22011016, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22011017, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22011018, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22011019, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22011020, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22011021, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22011022, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22011023, 'pht': 3726}}" where mtr_portfolio_id = 22010987 and dashboard_run_id = 1720812 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`=22010987 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9839449, 0.04079066086446344, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22010987_03-04-2025_07_47_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22011012, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22011013, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22011014, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22011015, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22011016, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22011017, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22011018, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22011019, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22011020, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22011021, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22011022, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22011023, '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 = 22011757 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': 2719549, 'mtr_portfolio_id': 22011757, 'created_at': datetime.datetime(2025, 4, 3, 8, 3, 3), 'result': '0.05864467544110678', 'result_long': None, 'result_double': None}] Qualite : 0.05864467544110678 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22011757 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22011757_03-04-2025_08_03_04.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22011757 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_P22011757_03-04-2025_08_03_04.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22011759, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22011760, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22011761, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22011762, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22011763, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22011764, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22011765, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22011766, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22011767, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22011768, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22011769, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22011770, 'pht': 3726}}" where mtr_portfolio_id = 22011757 and dashboard_run_id = 1720812 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`=22011757 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9839450, 0.05864467544110678, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22011757_03-04-2025_08_03_04.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22011759, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22011760, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22011761, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22011762, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22011763, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22011764, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22011765, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22011766, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22011767, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22011768, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22011769, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22011770, '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 = 22012336 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': 2719611, 'mtr_portfolio_id': 22012336, 'created_at': datetime.datetime(2025, 4, 3, 8, 6, 57), 'result': '0.048355260691216824', 'result_long': None, 'result_double': None}] Qualite : 0.048355260691216824 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22012336 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22012336_03-04-2025_08_06_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22012336 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_P22012336_03-04-2025_08_06_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 22012339, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22012340, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22012341, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22012342, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22012343, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22012344, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22012345, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22012346, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22012347, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22012348, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22012349, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22012350, 'pht': 3726}}" where mtr_portfolio_id = 22012336 and dashboard_run_id = 1720812 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`=22012336 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9839451, 0.048355260691216824, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22012336_03-04-2025_08_06_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 22012339, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22012340, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22012341, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22012342, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22012343, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22012344, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22012345, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22012346, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22012347, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22012348, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22012349, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22012350, '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 (22010196,22010987,22011757,22012336) result : ((1349737535,), (1349737542,), (1349737546,), (1349737556,), (1349737561,), (1349737582,), (1349737587,), (1349737593,), (1349737687,), (1349737690,), (1349737695,), (1349737722,), (1349737725,), (1349737734,), (1349737743,), (1349737853,), (1349737858,), (1349737863,), (1349737908,), (1349738012,), (1349738031,), (1349738151,), (1349738274,), (1349738350,), (1349738355,), (1349738360,), (1349738375,), (1349738389,), (1349738463,), (1349738553,), (1349738572,), (1349738581,), (1349738608,), (1349738614,), (1349738619,), (1349738623,), (1349738629,), (1349738670,), (1349738676,), (1349738682,), (1349738686,), (1349738691,), (1349738734,), (1349738745,), (1349738770,), (1349738801,), (1349738824,), (1349738927,), (1349738939,), (1349739062,), (1349739056,), (1349739229,), (1349739233,), (1349739239,), (1349739243,), (1349739248,), (1349739295,), (1349739302,), (1349739313,), (1349739321,), (1349739375,), (1349739558,), (1349739599,), (1349739672,), (1349739687,), (1349739699,), (1349739705,), (1349739710,), (1349739770,), (1349739784,), (1349739789,), (1349739796,), (1349739813,), (1349739846,), (1349739850,), (1349739857,), (1349739873,), (1349739890,), (1349739919,), (1349739981,), (1349739987,), (1349739992,), (1349740057,), (1349740218,), (1349740242,), (1349740251,), (1349740255,), (1349740266,), (1349740408,), (1349740431,), (1349740436,), (1349740442,), (1349740448,), (1349740611,), (1349740617,), (1349740622,), (1349740626,), (1349740675,), (1349740683,), (1349740694,), (1349740703,), (1349740709,), (1349740715,), (1349740797,), (1349740808,), (1349740819,), (1349740822,), (1349740891,), (1349740904,), (1349740908,), (1349740912,), (1349740918,), (1349741033,), (1349741015,), (1349741029,), (1349741121,), (1349741128,), (1349741135,), (1349741139,), (1349741155,), (1349741163,), (1349741354,), (1349741403,), (1349741473,), (1349741545,), (1349741719,), (1349741740,), (1349741764,), (1349741768,), (1349741793,), (1349741811,), (1349741884,), (1349741891,), (1349741947,), (1349741971,), (1349741989,), (1349742303,), (1349742365,), (1349742369,), (1349742372,), (1349742377,), (1349742381,), (1349742410,), (1349742413,), (1349742416,), (1349742420,), (1349742441,), (1349742542,), (1349742565,), (1349742591,), (1349742637,), (1349742659,), (1349742686,), (1349743204,), (1349743238,), (1349743267,), (1349743318,), (1349743335,), (1349743518,), (1349743520,), (1349743535,), (1349743541,), (1349743547,), (1349743681,), (1349743701,), (1349743705,), (1349743709,), (1349743713,), (1349743718,), (1349743739,), (1349743742,), (1349743745,), (1349743748,), (1349744152,), (1349744201,), (1349744252,), (1349744295,), (1349744345,), (1349744392,), (1349744831,), (1349744856,), (1349744882,), (1349744914,), (1349745273,), (1349745162,), (1349745190,), (1349745217,), (1349745245,), (1349745473,), (1349745479,), (1349745492,), (1349745498,), (1349745502,), (1349745557,), (1349745649,), (1349745679,), (1349745705,), (1349745733,), (1349745755,), (1349746365,), (1349746608,), (1349746665,), (1349746669,), (1349746708,), (1349746933,), (1349747116,), (1349747179,), (1349747207,), (1349747228,), (1349747299,), (1349747452,), (1349747467,), (1349747473,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'03042025': {'nb_upload': 29, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22012336]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1349747473, 1349747467, 1349747452, 1349747299, 1349747228, 1349747207, 1349747179, 1349747116, 1349746933, 1349746708, 1349746669, 1349746665, 1349746608, 1349746365] map_info['map_portfolio_photo'] : {22012336: [1349747473, 1349747467, 1349747452, 1349747299, 1349747228, 1349747207, 1349747179, 1349747116, 1349746933, 1349746708, 1349746669, 1349746665, 1349746608, 1349746365, 1349745755, 1349745733, 1349745705, 1349745679, 1349745649, 1349745557, 1349745502, 1349745498, 1349745492, 1349745479, 1349745473, 1349745245, 1349745217, 1349745190, 1349745162]} final : True mtd_id 4302 list_pids : [1349747473, 1349747467, 1349747452, 1349747299, 1349747228, 1349747207, 1349747179, 1349747116, 1349746933, 1349746708, 1349746669, 1349746665, 1349746608, 1349746365] Looping around the photos to save general results len do output : 1 /22012336Didn'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, '2719611') ('4302', '22012336', '1349747473', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349747467', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349747452', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349747299', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349747228', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349747207', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349747179', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349747116', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349746933', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349746708', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349746669', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349746665', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349746608', None, None, None, None, None, '2719611') ('4302', None, None, None, None, None, None, None, '2719611') ('4302', '22012336', '1349746365', None, None, None, None, None, '2719611') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 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, '22012336', 'None', None, None, None, None, '2719611'), ('4302', '22012336', '1349747473', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349747467', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349747452', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349747299', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349747228', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349747207', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349747179', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349747116', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349746933', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349746708', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349746669', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349746665', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349746608', None, None, None, None, None, '2719611'), ('4302', '22012336', '1349746365', None, None, None, None, None, '2719611')] time used for this insertion : 0.01431131362915039 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.8092865943908691 time spend to save output : 0.01462864875793457 total time spend for step 5 : 0.8239152431488037 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 (2719611) 2.26user 2.59system 0:07.57elapsed 64%CPU (0avgtext+0avgdata 159752maxresident)k 264inputs+10136outputs (17major+64234minor)pagefaults 0swaps