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 : 1243977 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 (2722340) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2722340) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22042424 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2722340'] with mtr_portfolio_ids : ['22042424'] and first list_photo_ids : [] new path : /proc/1243977/ Name: python3 Umask: 0002 State: R (running) Tgid: 1243977 Ngid: 0 Pid: 1243977 PPid: 1243976 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1243977 NSpid: 1243977 NSpgid: 1241723 NSsid: 1241723 VmPeak: 1106928 kB VmSize: 1106928 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 97796 kB VmRSS: 97796 kB RssAnon: 59800 kB RssFile: 37996 kB RssShmem: 0 kB VmData: 865676 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 544 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: 59 nonvoluntary_ctxt_switches: 131 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1243977', 'Ngid': '0', 'Pid': '1243977', 'PPid': '1243976', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1243977', 'NSpid': '1243977', 'NSpgid': '1241723', 'NSsid': '1241723', 'VmPeak': '1106928 kB', 'VmSize': '1106928 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '97796 kB', 'VmRSS': '97796 kB', 'RssAnon': '59800 kB', 'RssFile': '37996 kB', 'RssShmem': '0 kB', 'VmData': '865676 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '544 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': '59', 'nonvoluntary_ctxt_switches': '131'} ('datou_batch_current', '1243977', '1106928', '0', '1106928', '865676', '97796', b'', 'marlene', '2722340') 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 (22042424) 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 (2722340 ) ) 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 (22042424) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1349915178, 'portfolio_id': 22042424}, {'photo_id': 1349915159, 'portfolio_id': 22042424}, {'photo_id': 1349915136, 'portfolio_id': 22042424}, {'photo_id': 1349915112, 'portfolio_id': 22042424}, {'photo_id': 1349915089, 'portfolio_id': 22042424}, {'photo_id': 1349914911, 'portfolio_id': 22042424}, {'photo_id': 1349914907, 'portfolio_id': 22042424}, {'photo_id': 1349914887, 'portfolio_id': 22042424}, {'photo_id': 1349914880, 'portfolio_id': 22042424}, {'photo_id': 1349914877, 'portfolio_id': 22042424}, {'photo_id': 1349914874, 'portfolio_id': 22042424}, {'photo_id': 1349914871, 'portfolio_id': 22042424}, {'photo_id': 1349914864, 'portfolio_id': 22042424}, {'photo_id': 1349914833, 'portfolio_id': 22042424}, {'photo_id': 1349914801, 'portfolio_id': 22042424}, {'photo_id': 1349914796, 'portfolio_id': 22042424}, {'photo_id': 1349914792, 'portfolio_id': 22042424}, {'photo_id': 1349914148, 'portfolio_id': 22042424}, {'photo_id': 1349914144, 'portfolio_id': 22042424}, {'photo_id': 1349914125, 'portfolio_id': 22042424}, {'photo_id': 1349914077, 'portfolio_id': 22042424}, {'photo_id': 1349914035, 'portfolio_id': 22042424}, {'photo_id': 1349913985, 'portfolio_id': 22042424}, {'photo_id': 1349913975, 'portfolio_id': 22042424}, {'photo_id': 1349913951, 'portfolio_id': 22042424}, {'photo_id': 1349913915, 'portfolio_id': 22042424}, {'photo_id': 1349913856, 'portfolio_id': 22042424}, {'photo_id': 1349913852, 'portfolio_id': 22042424}, {'photo_id': 1349913848, 'portfolio_id': 22042424}, {'photo_id': 1349913843, 'portfolio_id': 22042424}, {'photo_id': 1349913837, 'portfolio_id': 22042424}, {'photo_id': 1349913628, 'portfolio_id': 22042424}] map_portfolio_id_photo_id: {22042424: [1349915178, 1349915159, 1349915136, 1349915112, 1349915089, 1349914911, 1349914907, 1349914887, 1349914880, 1349914877, 1349914874, 1349914871, 1349914864, 1349914833, 1349914801, 1349914796, 1349914792, 1349914148, 1349914144, 1349914125, 1349914077, 1349914035, 1349913985, 1349913975, 1349913951, 1349913915, 1349913856, 1349913852, 1349913848, 1349913843, 1349913837, 1349913628]} ##### 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.06264829635620117 #### 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 23:59:30 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 (22042424) 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 : 22042424 get user id for portfolio 22042424 get sub ptf for main ptf 22042424, type 3726 and hashtags ['papier', 'plastique', 'kraft', 'cartonnette', 'flou', 'Carton_gris', 'mal_croppe', 'environnement', 'autre_refus', 'Teint_Dans_La_Masse', 'metal', 'Carton_brun'] 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`=22042424 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','plastique','kraft','cartonnette','flou','Carton_gris','mal_croppe','environnement','autre_refus','Teint_Dans_La_Masse','metal','Carton_brun')) 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`=22042424 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','plastique','kraft','cartonnette','flou','Carton_gris','mal_croppe','environnement','autre_refus','Teint_Dans_La_Masse','metal','Carton_brun')) AND mptpi.`min_score`=0.5 To do returned map {'Teint_Dans_La_Masse': {'main_port_id': 22042424, 'sub_port_id': 22042475, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534323, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 57, 3), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 57, 3), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 51)}, 'kraft': {'main_port_id': 22042424, 'sub_port_id': 22042476, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534324, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 57, 3), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 57, 3), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 51)}, 'plastique': {'main_port_id': 22042424, 'sub_port_id': 22042477, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534325, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 57, 3), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 57, 3), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 51)}, 'metal': {'main_port_id': 22042424, 'sub_port_id': 22042478, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534326, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 57, 3), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 57, 3), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 51)}, 'autre_refus': {'main_port_id': 22042424, 'sub_port_id': 22042479, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534327, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 57, 3), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 57, 3), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 51)}, 'papier': {'main_port_id': 22042424, 'sub_port_id': 22042480, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534328, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 57, 3), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 57, 3), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 51)}, 'Carton_gris': {'main_port_id': 22042424, 'sub_port_id': 22042481, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534329, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 57, 3), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 57, 3), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 51)}, 'cartonnette': {'main_port_id': 22042424, 'sub_port_id': 22042482, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534330, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 57, 3), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 57, 3), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 51)}, 'environnement': {'main_port_id': 22042424, 'sub_port_id': 22042483, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534331, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 57, 3), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 57, 3), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 51)}, 'mal_croppe': {'main_port_id': 22042424, 'sub_port_id': 22042484, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534332, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 57, 3), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 57, 3), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 51)}, 'Carton_brun': {'main_port_id': 22042424, 'sub_port_id': 22042485, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534333, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 57, 3), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 57, 3), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 51)}, 'flou': {'main_port_id': 22042424, 'sub_port_id': 22042486, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534334, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 57, 3), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 57, 3), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 51)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22042475 , 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=22042424 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 (22042475) result : ((1349914615,), (1349914627,), (1349915289,), (1349915327,), (1349915328,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22042424) result : ((1349913628,), (1349913837,), (1349913843,), (1349913848,), (1349913852,), (1349913856,), (1349913915,), (1349913951,), (1349913975,), (1349913985,), (1349914035,), (1349914077,), (1349914125,), (1349914144,), (1349914148,), (1349914792,), (1349914796,), (1349914801,), (1349914833,), (1349914864,), (1349914871,), (1349914874,), (1349914877,), (1349914880,), (1349914887,), (1349914907,), (1349914911,), (1349915089,), (1349915112,), (1349915136,), (1349915159,), (1349915178,)) 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 22042476 , 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=22042424 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 (22042476) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22042424) result : ((1349913628,), (1349913837,), (1349913843,), (1349913848,), (1349913852,), (1349913856,), (1349913915,), (1349913951,), (1349913975,), (1349913985,), (1349914035,), (1349914077,), (1349914125,), (1349914144,), (1349914148,), (1349914792,), (1349914796,), (1349914801,), (1349914833,), (1349914864,), (1349914871,), (1349914874,), (1349914877,), (1349914880,), (1349914887,), (1349914907,), (1349914911,), (1349915089,), (1349915112,), (1349915136,), (1349915159,), (1349915178,)) 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 22042477 , 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=22042424 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 (22042477) result : ((1349914502,), (1349914620,), (1349915315,), (1349915316,), (1349915341,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22042424) result : ((1349913628,), (1349913837,), (1349913843,), (1349913848,), (1349913852,), (1349913856,), (1349913915,), (1349913951,), (1349913975,), (1349913985,), (1349914035,), (1349914077,), (1349914125,), (1349914144,), (1349914148,), (1349914792,), (1349914796,), (1349914801,), (1349914833,), (1349914864,), (1349914871,), (1349914874,), (1349914877,), (1349914880,), (1349914887,), (1349914907,), (1349914911,), (1349915089,), (1349915112,), (1349915136,), (1349915159,), (1349915178,)) 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 22042478 , 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=22042424 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 (22042478) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22042424) result : ((1349913628,), (1349913837,), (1349913843,), (1349913848,), (1349913852,), (1349913856,), (1349913915,), (1349913951,), (1349913975,), (1349913985,), (1349914035,), (1349914077,), (1349914125,), (1349914144,), (1349914148,), (1349914792,), (1349914796,), (1349914801,), (1349914833,), (1349914864,), (1349914871,), (1349914874,), (1349914877,), (1349914880,), (1349914887,), (1349914907,), (1349914911,), (1349915089,), (1349915112,), (1349915136,), (1349915159,), (1349915178,)) 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 22042479 , 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=22042424 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 (22042479) result : ((1349914484,), (1349914628,), (1349915293,), (1349915333,), (1349915334,), (1349915335,), (1349915343,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22042424) result : ((1349913628,), (1349913837,), (1349913843,), (1349913848,), (1349913852,), (1349913856,), (1349913915,), (1349913951,), (1349913975,), (1349913985,), (1349914035,), (1349914077,), (1349914125,), (1349914144,), (1349914148,), (1349914792,), (1349914796,), (1349914801,), (1349914833,), (1349914864,), (1349914871,), (1349914874,), (1349914877,), (1349914880,), (1349914887,), (1349914907,), (1349914911,), (1349915089,), (1349915112,), (1349915136,), (1349915159,), (1349915178,)) 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 22042480 , 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=22042424 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 (22042480) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22042424) result : ((1349913628,), (1349913837,), (1349913843,), (1349913848,), (1349913852,), (1349913856,), (1349913915,), (1349913951,), (1349913975,), (1349913985,), (1349914035,), (1349914077,), (1349914125,), (1349914144,), (1349914148,), (1349914792,), (1349914796,), (1349914801,), (1349914833,), (1349914864,), (1349914871,), (1349914874,), (1349914877,), (1349914880,), (1349914887,), (1349914907,), (1349914911,), (1349915089,), (1349915112,), (1349915136,), (1349915159,), (1349915178,)) 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 22042481 , 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=22042424 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 (22042481) result : ((1349914487,), (1349915301,), (1349915303,), (1349915338,), (1349915339,), (1349915344,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22042424) result : ((1349913628,), (1349913837,), (1349913843,), (1349913848,), (1349913852,), (1349913856,), (1349913915,), (1349913951,), (1349913975,), (1349913985,), (1349914035,), (1349914077,), (1349914125,), (1349914144,), (1349914148,), (1349914792,), (1349914796,), (1349914801,), (1349914833,), (1349914864,), (1349914871,), (1349914874,), (1349914877,), (1349914880,), (1349914887,), (1349914907,), (1349914911,), (1349915089,), (1349915112,), (1349915136,), (1349915159,), (1349915178,)) 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 22042482 , 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=22042424 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 (22042482) result : ((1349914489,), (1349914491,), (1349914498,), (1349914499,), (1349914617,), (1349914629,), (1349915345,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22042424) result : ((1349913628,), (1349913837,), (1349913843,), (1349913848,), (1349913852,), (1349913856,), (1349913915,), (1349913951,), (1349913975,), (1349913985,), (1349914035,), (1349914077,), (1349914125,), (1349914144,), (1349914148,), (1349914792,), (1349914796,), (1349914801,), (1349914833,), (1349914864,), (1349914871,), (1349914874,), (1349914877,), (1349914880,), (1349914887,), (1349914907,), (1349914911,), (1349915089,), (1349915112,), (1349915136,), (1349915159,), (1349915178,)) 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 22042483 , 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=22042424 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 (22042483) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22042424) result : ((1349913628,), (1349913837,), (1349913843,), (1349913848,), (1349913852,), (1349913856,), (1349913915,), (1349913951,), (1349913975,), (1349913985,), (1349914035,), (1349914077,), (1349914125,), (1349914144,), (1349914148,), (1349914792,), (1349914796,), (1349914801,), (1349914833,), (1349914864,), (1349914871,), (1349914874,), (1349914877,), (1349914880,), (1349914887,), (1349914907,), (1349914911,), (1349915089,), (1349915112,), (1349915136,), (1349915159,), (1349915178,)) 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 22042484 , 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=22042424 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 (22042484) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22042424) result : ((1349913628,), (1349913837,), (1349913843,), (1349913848,), (1349913852,), (1349913856,), (1349913915,), (1349913951,), (1349913975,), (1349913985,), (1349914035,), (1349914077,), (1349914125,), (1349914144,), (1349914148,), (1349914792,), (1349914796,), (1349914801,), (1349914833,), (1349914864,), (1349914871,), (1349914874,), (1349914877,), (1349914880,), (1349914887,), (1349914907,), (1349914911,), (1349915089,), (1349915112,), (1349915136,), (1349915159,), (1349915178,)) 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 22042485 , 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=22042424 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 (22042485) result : ((1349914501,), (1349914619,), (1349915309,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22042424) result : ((1349913628,), (1349913837,), (1349913843,), (1349913848,), (1349913852,), (1349913856,), (1349913915,), (1349913951,), (1349913975,), (1349913985,), (1349914035,), (1349914077,), (1349914125,), (1349914144,), (1349914148,), (1349914792,), (1349914796,), (1349914801,), (1349914833,), (1349914864,), (1349914871,), (1349914874,), (1349914877,), (1349914880,), (1349914887,), (1349914907,), (1349914911,), (1349915089,), (1349915112,), (1349915136,), (1349915159,), (1349915178,)) 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 22042486 , 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=22042424 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 (22042486) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22042424) result : ((1349913628,), (1349913837,), (1349913843,), (1349913848,), (1349913852,), (1349913856,), (1349913915,), (1349913951,), (1349913975,), (1349913985,), (1349914035,), (1349914077,), (1349914125,), (1349914144,), (1349914148,), (1349914792,), (1349914796,), (1349914801,), (1349914833,), (1349914864,), (1349914871,), (1349914874,), (1349914877,), (1349914880,), (1349914887,), (1349914907,), (1349914911,), (1349915089,), (1349915112,), (1349915136,), (1349915159,), (1349915178,)) 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`=22042424 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','plastique','kraft','cartonnette','flou','Carton_gris','mal_croppe','environnement','autre_refus','Teint_Dans_La_Masse','metal','Carton_brun')) 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`=22042424 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','plastique','kraft','cartonnette','flou','Carton_gris','mal_croppe','environnement','autre_refus','Teint_Dans_La_Masse','metal','Carton_brun')) AND mptpi.`min_score`=0.5 To do returned map {'Teint_Dans_La_Masse': {'main_port_id': 22042424, 'sub_port_id': 22042487, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534335, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 51, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 51, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 51, 5)}, 'kraft': {'main_port_id': 22042424, 'sub_port_id': 22042488, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534336, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 51, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 51, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 51, 5)}, 'plastique': {'main_port_id': 22042424, 'sub_port_id': 22042489, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534337, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 51, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 51, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 51, 5)}, 'metal': {'main_port_id': 22042424, 'sub_port_id': 22042490, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534338, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 51, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 51, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 51, 5)}, 'autre_refus': {'main_port_id': 22042424, 'sub_port_id': 22042491, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534339, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 51, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 51, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 51, 5)}, 'papier': {'main_port_id': 22042424, 'sub_port_id': 22042492, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534340, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 51, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 51, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 51, 5)}, 'Carton_gris': {'main_port_id': 22042424, 'sub_port_id': 22042493, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534341, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 51, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 51, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 51, 5)}, 'cartonnette': {'main_port_id': 22042424, 'sub_port_id': 22042494, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534342, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 51, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 51, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 51, 5)}, 'environnement': {'main_port_id': 22042424, 'sub_port_id': 22042495, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534343, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 51, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 51, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 51, 5)}, 'mal_croppe': {'main_port_id': 22042424, 'sub_port_id': 22042496, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534344, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 51, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 51, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 51, 5)}, 'Carton_brun': {'main_port_id': 22042424, 'sub_port_id': 22042497, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534345, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 51, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 51, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 51, 5)}, 'flou': {'main_port_id': 22042424, 'sub_port_id': 22042498, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534346, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 57, 3), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 57, 3), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 51, 5)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22042487,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22042475 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22042488,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22042476 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22042489,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22042477 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22042490,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22042478 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22042491,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22042479 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22042492,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22042480 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22042493,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22042481 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22042494,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22042482 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22042495,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22042483 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22042496,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22042484 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22042497,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22042485 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22042498,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22042486 lien utilise dans velours : https://www.fotonower.com/velours/22042487,22042488,22042489,22042490,22042491,22042492,22042493,22042494,22042495,22042496,22042497,22042498?tags=Teint_Dans_La_Masse,kraft,plastique,metal,autre_refus,papier,Carton_gris,cartonnette,environnement,mal_croppe,Carton_brun,flou After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22042424]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1349915178, 1349915159, 1349915136, 1349915112, 1349915089] map_info['map_portfolio_photo'] : {22042424: [1349915178, 1349915159, 1349915136, 1349915112, 1349915089, 1349914911, 1349914907, 1349914887, 1349914880, 1349914877, 1349914874, 1349914871, 1349914864, 1349914833, 1349914801, 1349914796, 1349914792, 1349914148, 1349914144, 1349914125, 1349914077, 1349914035, 1349913985, 1349913975, 1349913951, 1349913915, 1349913856, 1349913852, 1349913848, 1349913843, 1349913837, 1349913628]} final : False mtd_id 4302 list_pids : [1349915178, 1349915159, 1349915136, 1349915112, 1349915089] Looping around the photos to save general results len do output : 1 /22042424. 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, '2722340') ('4302', '22042424', '1349915178', None, None, None, None, None, '2722340') ('4302', None, None, None, None, None, None, None, '2722340') ('4302', '22042424', '1349915159', None, None, None, None, None, '2722340') ('4302', None, None, None, None, None, None, None, '2722340') ('4302', '22042424', '1349915136', None, None, None, None, None, '2722340') ('4302', None, None, None, None, None, None, None, '2722340') ('4302', '22042424', '1349915112', None, None, None, None, None, '2722340') ('4302', None, None, None, None, None, None, None, '2722340') ('4302', '22042424', '1349915089', None, None, None, None, None, '2722340') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '22042424', "{'Teint_Dans_La_Masse': 22042475, 'kraft': 22042476, 'plastique': 22042477, 'metal': 22042478, 'autre_refus': 22042479, 'papier': 22042480, 'Carton_gris': 22042481, 'cartonnette': 22042482, 'environnement': 22042483, 'mal_croppe': 22042484, 'Carton_brun': 22042485, 'flou': 22042486}", None, None, None, None, '2722340'), ('4302', '22042424', '1349915178', None, None, None, None, None, '2722340'), ('4302', '22042424', '1349915159', None, None, None, None, None, '2722340'), ('4302', '22042424', '1349915136', None, None, None, None, None, '2722340'), ('4302', '22042424', '1349915112', None, None, None, None, None, '2722340'), ('4302', '22042424', '1349915089', None, None, None, None, None, '2722340')] time used for this insertion : 0.035520076751708984 save_final save missing photos in datou_result : time spend for datou_step_exec : 4.17164421081543 time spend to save output : 0.035799264907836914 total time spend for step 1 : 4.207443475723267 step2:final Thu Apr 3 23:59:34 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 (22042424) 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 22042424 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1349913628,1349913856,1349913852,1349913848,1349913843,1349913837,1349913985,1349913975,1349913951,1349913915,1349914148,1349914144,1349914125,1349914077,1349914035,1349914833,1349914801,1349914796,1349914792,1349914887,1349914880,1349914864,1349914877,1349914874,1349914871,1349914911,1349914907,1349915178,1349915159,1349915136,1349915112,1349915089); 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([22042424]) Inside saveOutput : final : False verbose : True original output for save of step final : {1349915178: ('0.0349414234475793',), 1349915159: ('0.0349414234475793',), 1349915136: ('0.0349414234475793',), 1349915112: ('0.0349414234475793',), 1349915089: ('0.0349414234475793',)} new output for save of step final : {1349915178: ('0.0349414234475793',), 1349915159: ('0.0349414234475793',), 1349915136: ('0.0349414234475793',), 1349915112: ('0.0349414234475793',), 1349915089: ('0.0349414234475793',)} [1349915178, 1349915159, 1349915136, 1349915112, 1349915089] map_info['map_portfolio_photo'] : {22042424: [1349915178, 1349915159, 1349915136, 1349915112, 1349915089, 1349914911, 1349914907, 1349914887, 1349914880, 1349914877, 1349914874, 1349914871, 1349914864, 1349914833, 1349914801, 1349914796, 1349914792, 1349914148, 1349914144, 1349914125, 1349914077, 1349914035, 1349913985, 1349913975, 1349913951, 1349913915, 1349913856, 1349913852, 1349913848, 1349913843, 1349913837, 1349913628]} final : False mtd_id 4302 list_pids : [1349915178, 1349915159, 1349915136, 1349915112, 1349915089] Looping around the photos to save general results len do output : 5 /1349915178.Didn't retrieve data . /1349915159.Didn't retrieve data . /1349915136.Didn't retrieve data . /1349915112.Didn't retrieve data . /1349915089.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, '2722340') ('4302', '22042424', '1349915178', None, None, None, None, None, '2722340') ('4302', None, None, None, None, None, None, None, '2722340') ('4302', '22042424', '1349915159', None, None, None, None, None, '2722340') ('4302', None, None, None, None, None, None, None, '2722340') ('4302', '22042424', '1349915136', None, None, None, None, None, '2722340') ('4302', None, None, None, None, None, None, None, '2722340') ('4302', '22042424', '1349915112', None, None, None, None, None, '2722340') ('4302', None, None, None, None, None, None, None, '2722340') ('4302', '22042424', '1349915089', None, None, None, None, None, '2722340') 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', '22042424', '1349915178', '0.0349414234475793', None, None, None, None, '2722340'), ('4302', '22042424', '1349915159', '0.0349414234475793', None, None, None, None, '2722340'), ('4302', '22042424', '1349915136', '0.0349414234475793', None, None, None, None, '2722340'), ('4302', '22042424', '1349915112', '0.0349414234475793', None, None, None, None, '2722340'), ('4302', '22042424', '1349915089', '0.0349414234475793', None, None, None, None, '2722340')] time used for this insertion : 0.03728199005126953 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.23636817932128906 time spend to save output : 0.03761935234069824 total time spend for step 2 : 0.2739875316619873 step3:velours_tree Thu Apr 3 23:59:34 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 : {22042424: [{'Teint_Dans_La_Masse': 22042475, 'kraft': 22042476, 'plastique': 22042477, 'metal': 22042478, 'autre_refus': 22042479, 'papier': 22042480, 'Carton_gris': 22042481, 'cartonnette': 22042482, 'environnement': 22042483, 'mal_croppe': 22042484, 'Carton_brun': 22042485, 'flou': 22042486}]} input_args_next_step : {22042424: ()} output_args : {22042424: [{'Teint_Dans_La_Masse': 22042475, 'kraft': 22042476, 'plastique': 22042477, 'metal': 22042478, 'autre_refus': 22042479, 'papier': 22042480, 'Carton_gris': 22042481, 'cartonnette': 22042482, 'environnement': 22042483, 'mal_croppe': 22042484, 'Carton_brun': 22042485, 'flou': 22042486}]} args : 22042424 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 : ({'Teint_Dans_La_Masse': 22042475, 'kraft': 22042476, 'plastique': 22042477, 'metal': 22042478, 'autre_refus': 22042479, 'papier': 22042480, 'Carton_gris': 22042481, 'cartonnette': 22042482, 'environnement': 22042483, 'mal_croppe': 22042484, 'Carton_brun': 22042485, 'flou': 22042486},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22042424) 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([22042424]) 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.4337124824523926 time spend to save output : 5.364418029785156e-05 total time spend for step 3 : 0.43376612663269043 step4:send_mail_cod Thu Apr 3 23:59:35 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 : {1349915178: ('0.0349414234475793',), 1349915159: ('0.0349414234475793',), 1349915136: ('0.0349414234475793',), 1349915112: ('0.0349414234475793',), 1349915089: ('0.0349414234475793',)} input_args_next_step : {1349915178: ()} output_args : {1349915178: ('0.0349414234475793',), 1349915159: ('0.0349414234475793',), 1349915136: ('0.0349414234475793',), 1349915112: ('0.0349414234475793',), 1349915089: ('0.0349414234475793',)} args : 1349915178 depend.output_id : 0 input_args_next_step : {1349915178: ('0.0349414234475793',), 1349915159: ()} output_args : {1349915178: ('0.0349414234475793',), 1349915159: ('0.0349414234475793',), 1349915136: ('0.0349414234475793',), 1349915112: ('0.0349414234475793',), 1349915089: ('0.0349414234475793',)} args : 1349915159 depend.output_id : 0 input_args_next_step : {1349915178: ('0.0349414234475793',), 1349915159: ('0.0349414234475793',), 1349915136: ()} output_args : {1349915178: ('0.0349414234475793',), 1349915159: ('0.0349414234475793',), 1349915136: ('0.0349414234475793',), 1349915112: ('0.0349414234475793',), 1349915089: ('0.0349414234475793',)} args : 1349915136 depend.output_id : 0 input_args_next_step : {1349915178: ('0.0349414234475793',), 1349915159: ('0.0349414234475793',), 1349915136: ('0.0349414234475793',), 1349915112: ()} output_args : {1349915178: ('0.0349414234475793',), 1349915159: ('0.0349414234475793',), 1349915136: ('0.0349414234475793',), 1349915112: ('0.0349414234475793',), 1349915089: ('0.0349414234475793',)} args : 1349915112 depend.output_id : 0 input_args_next_step : {1349915178: ('0.0349414234475793',), 1349915159: ('0.0349414234475793',), 1349915136: ('0.0349414234475793',), 1349915112: ('0.0349414234475793',), 1349915089: ()} output_args : {1349915178: ('0.0349414234475793',), 1349915159: ('0.0349414234475793',), 1349915136: ('0.0349414234475793',), 1349915112: ('0.0349414234475793',), 1349915089: ('0.0349414234475793',)} args : 1349915089 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 : {22042424: [{'Teint_Dans_La_Masse': 22042475, 'kraft': 22042476, 'plastique': 22042477, 'metal': 22042478, 'autre_refus': 22042479, 'papier': 22042480, 'Carton_gris': 22042481, 'cartonnette': 22042482, 'environnement': 22042483, 'mal_croppe': 22042484, 'Carton_brun': 22042485, 'flou': 22042486}]} input_args_next_step : {1349915178: ('0.0349414234475793',), 1349915159: ('0.0349414234475793',), 1349915136: ('0.0349414234475793',), 1349915112: ('0.0349414234475793',), 1349915089: ('0.0349414234475793',), 22042424: ()} output_args : {22042424: [{'Teint_Dans_La_Masse': 22042475, 'kraft': 22042476, 'plastique': 22042477, 'metal': 22042478, 'autre_refus': 22042479, 'papier': 22042480, 'Carton_gris': 22042481, 'cartonnette': 22042482, 'environnement': 22042483, 'mal_croppe': 22042484, 'Carton_brun': 22042485, 'flou': 22042486}]} args : 22042424 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 :6, first value : ('0.0349414234475793',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22042424) 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 (1349915178,1349915159,1349915136,1349915112,1349915089) Found this number of photos: 5 ##### Call download_photos : nb_thread : 5 begin to download photo : 1349915089 begin to download photo : 1349915136 begin to download photo : 1349915178 download finish for photo 1349915178 download finish for photo 1349915089 begin to download photo : 1349915112 download finish for photo 1349915136 begin to download photo : 1349915159 download finish for photo 1349915112 download finish for photo 1349915159 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette220424761743717575/ length of list_filenames : 5 ; length of list_pids : 5 ; length of list_args : 5 results_Auto_P22042424_03-04-2025_23_59_35.pdf 22042476 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=22042476 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220424761743717575 22042477 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=22042477 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349914502: '1743716992_2711750_1349913628_33a443055b0caf39bf96cd4646c18fc4_rle_crop_3746945221_0.png', 1349914620: '1743717086_1181843_1349914125_a644043b18c75b5487a65ea94647e9a9_rle_crop_3746945715_0.png', 1349915315: '1743717446_1187317_1349914877_cf861ea8eb0358f988121bfe63a56db6_rle_crop_3746959621_0.png', 1349915316: '1743717446_1187317_1349914864_5bab104d3edbbfde86d70556504f48ab_rle_crop_3746959656_0.png', 1349915341: '1743717451_2715753_1349914792_139970b99f9e34c7bc1db9ced347df14_rle_crop_3746959748_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/5ae031f0c54a8485d9aaa095e7d1f51d_54592501.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/13b49a014cb9bce794a7391b9068bc62_42033416.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/49a41ccf626f273fd8e33d76c3fcf6a9_67085381.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/1b2e6c201a285a4ce634a0197f4dd99c_7348917.png change filename to text .imagette220424771743717575/ imagette220424771743717575/1743717086_1181843_1349914125_a644043b18c75b5487a65ea94647e9a9_rle_crop_3746945715_0.png.png imagette220424771743717575/1743716992_2711750_1349913628_33a443055b0caf39bf96cd4646c18fc4_rle_crop_3746945221_0.png.png imagette220424771743717575/1743717446_1187317_1349914877_cf861ea8eb0358f988121bfe63a56db6_rle_crop_3746959621_0.png.png imagette220424771743717575/1743717446_1187317_1349914864_5bab104d3edbbfde86d70556504f48ab_rle_crop_3746959656_0.png.png imagette220424771743717575/1743717451_2715753_1349914792_139970b99f9e34c7bc1db9ced347df14_rle_crop_3746959748_0.png.png imagette220424781743717575/ wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/36e6f38f5e503439271581f7e601a4fb_21546596.png imagette220424771743717575 22042478 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=22042478 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220424781743717575 22042479 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=22042479 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349914484: '1743716973_2711424_1349913852_e6db114aa41e1ddb16df6f9412311d7c_rle_crop_3746945122_0.png', 1349914628: '1743717091_2713554_1349913951_8d68725d868b3682d7632ccc8a49d8e9_rle_crop_3746945802_0.png', 1349915293: '1743717446_1187317_1349914874_5ac20449bdc13628815b500cddddce67_rle_crop_3746959639_0.png', 1349915333: '1743717451_2715753_1349914796_6a0105aa40f20df29fc4d412000eafa4_rle_crop_3746959726_0.png', 1349915334: '1743717451_2715753_1349914796_6a0105aa40f20df29fc4d412000eafa4_rle_crop_3746959734_0.png', 1349915335: '1743717451_2715753_1349914792_139970b99f9e34c7bc1db9ced347df14_rle_crop_3746959747_0.png', 1349915343: '1743717471_2715928_1349914833_79ef24cebab5d2c5b7a9f5375ede79df_rle_crop_3746959764_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/445ba016aa755e93b8d1c1878fd0f61f_34023414.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/f202501bebf4b2527824c2095af8e4ae_31272105.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/4581f2545a4485594840d5f8ec45f0c8_43250054.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/b5faba3ccce9c20d837455a0f5db2548_46040459.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/065d536c43037d24b1b2b0cc9434d993_49788004.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/bbf7b8204839e69df772b2a673c3527c_30385059.png change filename to text .imagette220424791743717575/ imagette220424791743717575/1743716973_2711424_1349913852_e6db114aa41e1ddb16df6f9412311d7c_rle_crop_3746945122_0.png.png imagette220424791743717575/1743717446_1187317_1349914874_5ac20449bdc13628815b500cddddce67_rle_crop_3746959639_0.png.png imagette220424791743717575/1743717091_2713554_1349913951_8d68725d868b3682d7632ccc8a49d8e9_rle_crop_3746945802_0.png.png imagette220424791743717575/1743717471_2715928_1349914833_79ef24cebab5d2c5b7a9f5375ede79df_rle_crop_3746959764_0.png.png imagette220424791743717575/1743717451_2715753_1349914792_139970b99f9e34c7bc1db9ced347df14_rle_crop_3746959747_0.png.png imagette220424791743717575/1743717451_2715753_1349914796_6a0105aa40f20df29fc4d412000eafa4_rle_crop_3746959734_0.png.png imagette220424791743717575/1743717451_2715753_1349914796_6a0105aa40f20df29fc4d412000eafa4_rle_crop_3746959726_0.png.png wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/a9ce28d6bbb26253b513a31e1496aa77_82608059.png imagette220424791743717575 22042482 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=22042482 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349914489: '1743716973_2711424_1349913848_3bc9ddccac049d7c9fa3b796e188b4d5_rle_crop_3746945148_0.png', 1349914491: '1743716973_2711424_1349913843_ca059662b41f3e53490fc583d4487f35_rle_crop_3746945167_0.png', 1349914498: '1743716992_2711750_1349913628_33a443055b0caf39bf96cd4646c18fc4_rle_crop_3746945219_0.png', 1349914499: '1743716992_2711750_1349913628_33a443055b0caf39bf96cd4646c18fc4_rle_crop_3746945216_0.png', 1349914617: '1743717086_1181843_1349914035_77a7ffcdcec661c314453ae18a1e2f18_rle_crop_3746945743_0.png', 1349914629: '1743717091_2713554_1349913975_faa9331c955b81a8152d04a08700ee4b_rle_crop_3746945786_0.png', 1349915345: '1743717471_2715928_1349914833_79ef24cebab5d2c5b7a9f5375ede79df_rle_crop_3746959762_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/37c82bf011dc6833f2956814cf282bef_11316523.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/e7351beba21b24fb6a539721a209c04a_57294390.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/0bc794b35b73e3d1f372b843c95afe98_45607316.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/73a18cf853dbf054a7f14353b925276d_57411206.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/f407010c2d2fae1e10b8139f54d18a53_51234617.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/3d64ab5bff77a0be836602dac4b28919_3068925.png change filename to text .imagette220424821743717576/ imagette220424821743717576/1743716973_2711424_1349913843_ca059662b41f3e53490fc583d4487f35_rle_crop_3746945167_0.png.png imagette220424821743717576/1743717086_1181843_1349914035_77a7ffcdcec661c314453ae18a1e2f18_rle_crop_3746945743_0.png.png imagette220424821743717576/1743716992_2711750_1349913628_33a443055b0caf39bf96cd4646c18fc4_rle_crop_3746945219_0.png.png imagette220424821743717576/1743716973_2711424_1349913848_3bc9ddccac049d7c9fa3b796e188b4d5_rle_crop_3746945148_0.png.png imagette220424821743717576/1743717471_2715928_1349914833_79ef24cebab5d2c5b7a9f5375ede79df_rle_crop_3746959762_0.png.png imagette220424821743717576/1743717091_2713554_1349913975_faa9331c955b81a8152d04a08700ee4b_rle_crop_3746945786_0.png.png imagette220424821743717576/1743716992_2711750_1349913628_33a443055b0caf39bf96cd4646c18fc4_rle_crop_3746945216_0.png.png imagette220424841743717576/ imagette220424861743717576/ wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/bf025d7004b0cc790392bf4ff87c84e2_72013800.png imagette220424821743717576 22042484 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=22042484 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220424841743717576 22042486 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=22042486 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220424861743717576 22042475 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=22042475 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349914615: '1743717086_1181843_1349914144_34d78fbf493b0ab3cf67e2ac1bf2c97f_rle_crop_3746945689_0.png', 1349914627: '1743717091_2713554_1349913975_faa9331c955b81a8152d04a08700ee4b_rle_crop_3746945790_0.png', 1349915289: '1743717446_1187317_1349914877_cf861ea8eb0358f988121bfe63a56db6_rle_crop_3746959630_0.png', 1349915327: '1743717451_2715753_1349914796_6a0105aa40f20df29fc4d412000eafa4_rle_crop_3746959730_0.png', 1349915328: '1743717451_2715753_1349914792_139970b99f9e34c7bc1db9ced347df14_rle_crop_3746959753_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/a62de2ac583bda14e296ce74ed3904e7_15397264.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/dd94212590b64ce3708f89e21396459a_47251952.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/75e8717c3739635a2b1c5a22e6a60994_82916305.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/5388450f9e649a4a2822660b9bc675c9_4554486.png change filename to text .imagette220424751743717576/ imagette220424751743717576/1743717446_1187317_1349914877_cf861ea8eb0358f988121bfe63a56db6_rle_crop_3746959630_0.png.png imagette220424751743717576/1743717086_1181843_1349914144_34d78fbf493b0ab3cf67e2ac1bf2c97f_rle_crop_3746945689_0.png.png imagette220424751743717576/1743717451_2715753_1349914792_139970b99f9e34c7bc1db9ced347df14_rle_crop_3746959753_0.png.png imagette220424751743717576/1743717451_2715753_1349914796_6a0105aa40f20df29fc4d412000eafa4_rle_crop_3746959730_0.png.png imagette220424751743717576/1743717091_2713554_1349913975_faa9331c955b81a8152d04a08700ee4b_rle_crop_3746945790_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/52af82cc52473dc8ea3febcad5ed7d8a_11125383.png imagette220424751743717576 22042481 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=22042481 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349914487: '1743716973_2711424_1349913843_ca059662b41f3e53490fc583d4487f35_rle_crop_3746945165_0.png', 1349915301: '1743717446_1187317_1349914880_af62f36113eb2ac723788fd4bd541dd3_rle_crop_3746959616_0.png', 1349915303: '1743717446_1187317_1349914880_af62f36113eb2ac723788fd4bd541dd3_rle_crop_3746959613_0.png', 1349915338: '1743717451_2715753_1349914887_b8c737ae9749ec3924ff12b914c8d324_rle_crop_3746959669_0.png', 1349915339: '1743717451_2715753_1349914792_139970b99f9e34c7bc1db9ced347df14_rle_crop_3746959749_0.png', 1349915344: '1743717471_2715928_1349914833_79ef24cebab5d2c5b7a9f5375ede79df_rle_crop_3746959759_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/118f1e123c6d63a4150f907c4fd4c8f5_56624546.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/bdda6cc1c7c98b668c3eb1664298179a_45175020.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/7004c3c43ee9a2ab45bb8fc3729dfa71_86673010.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/655fcc457693b403780ed3935570cf2d_52275307.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/2aed386f2e9ad82d218bd075a01af1e4_32966804.png change filename to text .imagette220424811743717577/ imagette220424811743717577/1743717446_1187317_1349914880_af62f36113eb2ac723788fd4bd541dd3_rle_crop_3746959613_0.png.png imagette220424811743717577/1743717451_2715753_1349914887_b8c737ae9749ec3924ff12b914c8d324_rle_crop_3746959669_0.png.png imagette220424811743717577/1743717451_2715753_1349914792_139970b99f9e34c7bc1db9ced347df14_rle_crop_3746959749_0.png.png imagette220424811743717577/1743717471_2715928_1349914833_79ef24cebab5d2c5b7a9f5375ede79df_rle_crop_3746959759_0.png.png imagette220424811743717577/1743717446_1187317_1349914880_af62f36113eb2ac723788fd4bd541dd3_rle_crop_3746959616_0.png.png imagette220424811743717577/1743716973_2711424_1349913843_ca059662b41f3e53490fc583d4487f35_rle_crop_3746945165_0.png.png wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/22620c706bf45b67ea55e4534b48c55d_45318074.png imagette220424811743717577 22042485 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=22042485 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349914501: '1743716973_2711424_1349913843_ca059662b41f3e53490fc583d4487f35_rle_crop_3746945163_0.png', 1349914619: '1743717086_1181843_1349914144_34d78fbf493b0ab3cf67e2ac1bf2c97f_rle_crop_3746945688_0.png', 1349915309: '1743717446_1187317_1349914864_5bab104d3edbbfde86d70556504f48ab_rle_crop_3746959660_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/61be22028ae1e580ccc0867080dcd293_43645913.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/4c2e6ca9753999f0f2a6764af85d9bca_44702954.png change filename to text .imagette220424851743717577/ imagette220424851743717577/1743717446_1187317_1349914864_5bab104d3edbbfde86d70556504f48ab_rle_crop_3746959660_0.png.png imagette220424851743717577/1743717086_1181843_1349914144_34d78fbf493b0ab3cf67e2ac1bf2c97f_rle_crop_3746945688_0.png.png imagette220424851743717577/1743716973_2711424_1349913843_ca059662b41f3e53490fc583d4487f35_rle_crop_3746945163_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/f9a86679a8542035b15ee670b4e9453d_67103360.png imagette220424851743717577 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22042424 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22042487,22042488,22042489,22042490,22042491,22042492,22042493,22042494,22042495,22042496,22042497,22042498?tags=Teint_Dans_La_Masse,kraft,plastique,metal,autre_refus,papier,Carton_gris,cartonnette,environnement,mal_croppe,Carton_brun,flou your option no_mail is active, we will not send the real mail to your client args[1349915178] : ('0.0349414234475793',) no score found for photo 1349915178 We are sending mail with results at report@fotonower.com args[1349915159] : ('0.0349414234475793',) no score found for photo 1349915159 We are sending mail with results at report@fotonower.com args[1349915136] : ('0.0349414234475793',) no score found for photo 1349915136 We are sending mail with results at report@fotonower.com args[1349915112] : ('0.0349414234475793',) no score found for photo 1349915112 We are sending mail with results at report@fotonower.com args[1349915089] : ('0.0349414234475793',) no score found for photo 1349915089 We are sending mail with results at report@fotonower.com refus_total : 0.0349414234475793 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=22042424 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_P22042424_03-04-2025_23_59_35.pdf results_Auto_P22042424_03-04-2025_23_59_35.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22042424_03-04-2025_23_59_35.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','22042424','results_Auto_P22042424_03-04-2025_23_59_35.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22042424_03-04-2025_23_59_35.pdf','pdf','','0.15','0.0349414234475793') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22042424]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1349915178, 1349915159, 1349915136, 1349915112, 1349915089] map_info['map_portfolio_photo'] : {22042424: [1349915178, 1349915159, 1349915136, 1349915112, 1349915089, 1349914911, 1349914907, 1349914887, 1349914880, 1349914877, 1349914874, 1349914871, 1349914864, 1349914833, 1349914801, 1349914796, 1349914792, 1349914148, 1349914144, 1349914125, 1349914077, 1349914035, 1349913985, 1349913975, 1349913951, 1349913915, 1349913856, 1349913852, 1349913848, 1349913843, 1349913837, 1349913628]} final : False mtd_id 4302 list_pids : [1349915178, 1349915159, 1349915136, 1349915112, 1349915089] 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, '2722340') ('4302', '22042424', '1349915178', None, None, None, None, None, '2722340') ('4302', None, None, None, None, None, None, None, '2722340') ('4302', '22042424', '1349915159', None, None, None, None, None, '2722340') ('4302', None, None, None, None, None, None, None, '2722340') ('4302', '22042424', '1349915136', None, None, None, None, None, '2722340') ('4302', None, None, None, None, None, None, None, '2722340') ('4302', '22042424', '1349915112', None, None, None, None, None, '2722340') ('4302', None, None, None, None, None, None, None, '2722340') ('4302', '22042424', '1349915089', None, None, None, None, None, '2722340') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 5 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', '22042424', '1349915178', None, None, None, None, None, '2722340'), ('4302', '22042424', '1349915159', None, None, None, None, None, '2722340'), ('4302', '22042424', '1349915136', None, None, None, None, None, '2722340'), ('4302', '22042424', '1349915112', None, None, None, None, None, '2722340'), ('4302', '22042424', '1349915089', None, None, None, None, None, '2722340')] time used for this insertion : 0.024241209030151367 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.5027081966400146 time spend to save output : 0.024451494216918945 total time spend for step 4 : 3.5271596908569336 step5:split_time_score Thu Apr 3 23:59:38 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 : ['22042424'] 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 : [('22042424',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22042424) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1349915178: {'path': 'temp/1743717575_1243977_1349915178_bd1d153d58f489d998902852704d5b12.jpg', 'extension': 'jpg'}, 1349915089: {'path': 'temp/1743717575_1243977_1349915089_e7cf074ad702fb10fb55ab97e6a8064e.jpg', 'extension': 'jpg'}, 1349915112: {'path': 'temp/1743717575_1243977_1349915112_09eb77239deb55ae4357c462506dc4ec.jpg', 'extension': 'jpg'}, 1349915136: {'path': 'temp/1743717575_1243977_1349915136_e944fcd348de48d6c6280f3ca883baa8.jpg', 'extension': 'jpg'}, 1349915159: {'path': 'temp/1743717575_1243977_1349915159_5deb99fd1b703208be443b152826f670.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 = 22042424; (('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 = 22042424 group by h (('23', 32),) 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=22042424 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 (22042424) 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 (22042424) 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 22042424 Nombre de photos uploadées : 32 / 23040 (0%) 03042025 22042424 Nombre de photos taguées (types de déchets): 0 / 32 (0%) 03042025 22042424 Nombre de photos taguées (volume) : 0 / 32 (0%) [{'photo_id': 1349913628, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/33a443055b0caf39bf96cd4646c18fc4.jpg', 'username': None, 'uploaded_at': 1743716768, 'text': 'image_03042025_23_45_04_010160m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1349913856, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/1d2e631b1960637892b633fe51d1ae75.jpg', 'username': None, 'uploaded_at': 1743716827, 'text': 'image_03042025_23_45_14_010137m0.jpg 2e-05 for time 1, id_amount 1 this amount prod time diff : 1e-05'}, {'photo_id': 1349913852, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/e6db114aa41e1ddb16df6f9412311d7c.jpg', 'username': None, 'uploaded_at': 1743716827, 'text': 'image_03042025_23_46_14_10141.jpg'}, {'photo_id': 1349913848, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/3bc9ddccac049d7c9fa3b796e188b4d5.jpg', 'username': None, 'uploaded_at': 1743716827, 'text': 'image_03042025_23_46_24_10137.jpg'}] 0 [] elapsed_time : load_data_split_time_score 3.5762786865234375e-06 elapsed_time : order_list_meta_photo_and_scores 1.049041748046875e-05 ???????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0026247501373291016 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 22042424, '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.05459856986999512 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': 1723130, 'mtr_portfolio_id': 22040415, 'dashboard_result_id': 9863190, '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_P22040415_03-04-2025_23_14_35.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22040488, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22040489, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22040490, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22040491, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22040492, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22040493, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22040494, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22040495, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22040496, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22040497, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22040498, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22040499, 'pht': 3726}}"}, {'dashboat_entry_day': 1712161, 'dashboard_run_id': 1723130, 'mtr_portfolio_id': 22041005, 'dashboard_result_id': 9863191, '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_P22041005_03-04-2025_23_33_05.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22041008, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22041009, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22041010, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22041011, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22041012, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22041013, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22041014, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22041015, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22041016, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22041017, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22041018, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22041019, 'pht': 3726}}"}, {'dashboat_entry_day': 1712161, 'dashboard_run_id': 1723130, 'mtr_portfolio_id': 22041770, 'dashboard_result_id': 9863192, '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_P22041770_03-04-2025_23_46_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22041789, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22041790, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22041792, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22041793, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22041794, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22041795, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22041796, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22041797, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22041798, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22041799, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22041800, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22041801, 'pht': 3726}}"}, {'dashboat_entry_day': 1712161, 'dashboard_run_id': 1723130, 'mtr_portfolio_id': 22042424, 'dashboard_result_id': 9863193, '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_P22042424_03-04-2025_23_57_03.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22042475, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22042476, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22042477, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22042478, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22042479, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22042480, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22042481, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22042482, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22042483, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22042484, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22042485, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22042486, '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 = 22040415 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': 2722205, 'mtr_portfolio_id': 22040415, 'created_at': datetime.datetime(2025, 4, 3, 23, 14, 34), 'result': '0.04144667212071482', 'result_long': None, 'result_double': None}] Qualite : 0.04144667212071482 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22040415 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22040415_03-04-2025_23_14_35.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22040415 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_P22040415_03-04-2025_23_14_35.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22040488, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22040489, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22040490, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22040491, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22040492, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22040493, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22040494, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22040495, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22040496, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22040497, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22040498, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22040499, 'pht': 3726}}" where mtr_portfolio_id = 22040415 and dashboard_run_id = 1723130 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`=22040415 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9863190, 0.04144667212071482, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22040415_03-04-2025_23_14_35.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22040488, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22040489, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22040490, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22040491, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22040492, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22040493, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22040494, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22040495, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22040496, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22040497, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22040498, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22040499, '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 = 22041005 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': 2722253, 'mtr_portfolio_id': 22041005, 'created_at': datetime.datetime(2025, 4, 3, 23, 33, 5), 'result': '0.05620358030875997', 'result_long': None, 'result_double': None}] Qualite : 0.05620358030875997 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22041005 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22041005_03-04-2025_23_33_05.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22041005 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_P22041005_03-04-2025_23_33_05.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22041008, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22041009, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22041010, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22041011, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22041012, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22041013, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22041014, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22041015, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22041016, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22041017, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22041018, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22041019, 'pht': 3726}}" where mtr_portfolio_id = 22041005 and dashboard_run_id = 1723130 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`=22041005 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9863191, 0.05620358030875997, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22041005_03-04-2025_23_33_05.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22041008, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22041009, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22041010, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22041011, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22041012, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22041013, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22041014, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22041015, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22041016, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22041017, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22041018, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22041019, '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 = 22041770 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': 2722295, 'mtr_portfolio_id': 22041770, 'created_at': datetime.datetime(2025, 4, 3, 23, 46, 58), 'result': '0.044554771341631515', 'result_long': None, 'result_double': None}] Qualite : 0.044554771341631515 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22041770 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22041770_03-04-2025_23_46_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22041770 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_P22041770_03-04-2025_23_46_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22041789, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22041790, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22041792, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22041793, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22041794, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22041795, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22041796, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22041797, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22041798, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22041799, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22041800, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22041801, 'pht': 3726}}" where mtr_portfolio_id = 22041770 and dashboard_run_id = 1723130 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`=22041770 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9863192, 0.044554771341631515, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22041770_03-04-2025_23_46_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22041789, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22041790, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22041792, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22041793, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22041794, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22041795, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22041796, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22041797, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22041798, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22041799, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22041800, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22041801, '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 = 22042424 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': 2722340, 'mtr_portfolio_id': 22042424, 'created_at': datetime.datetime(2025, 4, 3, 23, 59, 34), 'result': '0.0349414234475793', 'result_long': None, 'result_double': None}] Qualite : 0.0349414234475793 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22042424 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22042424_03-04-2025_23_59_35.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22042424 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_P22042424_03-04-2025_23_59_35.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22042475, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22042476, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22042477, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22042478, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22042479, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22042480, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22042481, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22042482, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22042483, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22042484, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22042485, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22042486, 'pht': 3726}}" where mtr_portfolio_id = 22042424 and dashboard_run_id = 1723130 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`=22042424 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9863193, 0.0349414234475793, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22042424_03-04-2025_23_59_35.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22042475, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22042476, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22042477, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22042478, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22042479, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22042480, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22042481, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22042482, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22042483, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22042484, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22042485, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22042486, '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 (22040415,22041005,22041770,22042424) result : ((1349903562,), (1349903594,), (1349903953,), (1349903984,), (1349903999,), (1349904026,), (1349904056,), (1349904099,), (1349904352,), (1349904438,), (1349904469,), (1349904502,), (1349904527,), (1349904553,), (1349904756,), (1349904792,), (1349904812,), (1349905073,), (1349905162,), (1349905218,), (1349905241,), (1349905332,), (1349905376,), (1349905520,), (1349905556,), (1349905767,), (1349905814,), (1349905864,), (1349905903,), (1349905935,), (1349906200,), (1349906242,), (1349906283,), (1349906309,), (1349906339,), (1349906590,), (1349906623,), (1349906657,), (1349906686,), (1349906708,), (1349906918,), (1349906952,), (1349906976,), (1349907009,), (1349907032,), (1349907282,), (1349907323,), (1349907348,), (1349907374,), (1349907406,), (1349907442,), (1349907700,), (1349907715,), (1349907721,), (1349907725,), (1349907729,), (1349907819,), (1349907822,), (1349907827,), (1349907831,), (1349907835,), (1349907839,), (1349908041,), (1349908070,), (1349908097,), (1349908120,), (1349908334,), (1349908340,), (1349908350,), (1349908374,), (1349908395,), (1349908400,), (1349908507,), (1349908476,), (1349908492,), (1349908499,), (1349908503,), (1349908536,), (1349908544,), (1349908550,), (1349908556,), (1349908562,), (1349908613,), (1349908617,), (1349908622,), (1349908631,), (1349908678,), (1349908681,), (1349908687,), (1349908743,), (1349908756,), (1349908761,), (1349908951,), (1349908954,), (1349908961,), (1349908965,), (1349908972,), (1349908975,), (1349909072,), (1349909088,), (1349909104,), (1349909109,), (1349909141,), (1349909150,), (1349909161,), (1349909182,), (1349909186,), (1349909199,), (1349910101,), (1349910116,), (1349910129,), (1349910133,), (1349910136,), (1349910874,), (1349910924,), (1349910974,), (1349911020,), (1349911058,), (1349911457,), (1349911455,), (1349911584,), (1349911600,), (1349911612,), (1349911616,), (1349911655,), (1349911691,), (1349911789,), (1349911828,), (1349911883,), (1349911950,), (1349912026,), (1349912127,), (1349912177,), (1349912236,), (1349912270,), (1349912307,), (1349912309,), (1349912319,), (1349912421,), (1349912466,), (1349912504,), (1349912528,), (1349912809,), (1349912833,), (1349912842,), (1349912845,), (1349912883,), (1349912887,), (1349912891,), (1349912893,), (1349912896,), (1349912898,), (1349912924,), (1349912926,), (1349912929,), (1349912976,), (1349912979,), (1349912983,), (1349912987,), (1349912989,), (1349912992,), (1349913019,), (1349913022,), (1349913024,), (1349913033,), (1349913077,), (1349913205,), (1349913219,), (1349913223,), (1349913227,), (1349913254,), (1349913262,), (1349913269,), (1349913274,), (1349913278,), (1349913282,), (1349913313,), (1349913318,), (1349913325,), (1349913334,), (1349913371,), (1349913374,), (1349913379,), (1349913385,), (1349913663,), (1349913628,), (1349913837,), (1349913843,), (1349913848,), (1349913852,), (1349913856,), (1349913915,), (1349913951,), (1349913975,), (1349913985,), (1349914035,), (1349914077,), (1349914125,), (1349914144,), (1349914148,), (1349914792,), (1349914796,), (1349914801,), (1349914833,), (1349914864,), (1349914871,), (1349914874,), (1349914877,), (1349914880,), (1349914887,), (1349914907,), (1349914911,), (1349915089,), (1349915112,), (1349915136,), (1349915159,), (1349915178,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'03042025': {'nb_upload': 32, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22042424]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1349915178, 1349915159, 1349915136, 1349915112, 1349915089] map_info['map_portfolio_photo'] : {22042424: [1349915178, 1349915159, 1349915136, 1349915112, 1349915089, 1349914911, 1349914907, 1349914887, 1349914880, 1349914877, 1349914874, 1349914871, 1349914864, 1349914833, 1349914801, 1349914796, 1349914792, 1349914148, 1349914144, 1349914125, 1349914077, 1349914035, 1349913985, 1349913975, 1349913951, 1349913915, 1349913856, 1349913852, 1349913848, 1349913843, 1349913837, 1349913628]} final : True mtd_id 4302 list_pids : [1349915178, 1349915159, 1349915136, 1349915112, 1349915089] Looping around the photos to save general results len do output : 1 /22042424Didn'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, '2722340') ('4302', '22042424', '1349915178', None, None, None, None, None, '2722340') ('4302', None, None, None, None, None, None, None, '2722340') ('4302', '22042424', '1349915159', None, None, None, None, None, '2722340') ('4302', None, None, None, None, None, None, None, '2722340') ('4302', '22042424', '1349915136', None, None, None, None, None, '2722340') ('4302', None, None, None, None, None, None, None, '2722340') ('4302', '22042424', '1349915112', None, None, None, None, None, '2722340') ('4302', None, None, None, None, None, None, None, '2722340') ('4302', '22042424', '1349915089', None, None, None, None, None, '2722340') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '22042424', 'None', None, None, None, None, '2722340'), ('4302', '22042424', '1349915178', None, None, None, None, None, '2722340'), ('4302', '22042424', '1349915159', None, None, None, None, None, '2722340'), ('4302', '22042424', '1349915136', None, None, None, None, None, '2722340'), ('4302', '22042424', '1349915112', None, None, None, None, None, '2722340'), ('4302', '22042424', '1349915089', None, None, None, None, None, '2722340')] time used for this insertion : 0.027478694915771484 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.8430612087249756 time spend to save output : 0.027741432189941406 total time spend for step 5 : 0.870802640914917 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 (2722340) 2.11user 2.23system 0:13.49elapsed 32%CPU (0avgtext+0avgdata 158656maxresident)k 37480inputs+7344outputs (139major+69113minor)pagefaults 0swaps