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 : 3765609 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 (2861723) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2861723) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23009044 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2861723'] with mtr_portfolio_ids : ['23009044'] and first list_photo_ids : [] new path : /proc/3765609/ Name: python3 Umask: 0002 State: R (running) Tgid: 3765609 Ngid: 0 Pid: 3765609 PPid: 3765608 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 3765609 NSpid: 3765609 NSpgid: 3760964 NSsid: 3760964 VmPeak: 1107216 kB VmSize: 1107216 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98472 kB VmRSS: 98472 kB RssAnon: 60204 kB RssFile: 38268 kB RssShmem: 0 kB VmData: 865964 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 616 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63054 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 54 nonvoluntary_ctxt_switches: 116 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '3765609', 'Ngid': '0', 'Pid': '3765609', 'PPid': '3765608', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '3765609', 'NSpid': '3765609', 'NSpgid': '3760964', 'NSsid': '3760964', 'VmPeak': '1107216 kB', 'VmSize': '1107216 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98472 kB', 'VmRSS': '98472 kB', 'RssAnon': '60204 kB', 'RssFile': '38268 kB', 'RssShmem': '0 kB', 'VmData': '865964 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '616 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63054', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '54', 'nonvoluntary_ctxt_switches': '116'} ('datou_batch_current', '3765609', '1107216', '0', '1107216', '865964', '98472', b'', 'marlene', '2861723') 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 (23009044) 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 (2861723 ) ) 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 (23009044) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1358517381, 'portfolio_id': 23009044}, {'photo_id': 1358517377, 'portfolio_id': 23009044}, {'photo_id': 1358517371, 'portfolio_id': 23009044}, {'photo_id': 1358517366, 'portfolio_id': 23009044}, {'photo_id': 1358517328, 'portfolio_id': 23009044}, {'photo_id': 1358517325, 'portfolio_id': 23009044}, {'photo_id': 1358517307, 'portfolio_id': 23009044}, {'photo_id': 1358517271, 'portfolio_id': 23009044}, {'photo_id': 1358517255, 'portfolio_id': 23009044}, {'photo_id': 1358517129, 'portfolio_id': 23009044}, {'photo_id': 1358517100, 'portfolio_id': 23009044}, {'photo_id': 1358517073, 'portfolio_id': 23009044}, {'photo_id': 1358517061, 'portfolio_id': 23009044}, {'photo_id': 1358517058, 'portfolio_id': 23009044}, {'photo_id': 1358517054, 'portfolio_id': 23009044}, {'photo_id': 1358516759, 'portfolio_id': 23009044}, {'photo_id': 1358516731, 'portfolio_id': 23009044}, {'photo_id': 1358516705, 'portfolio_id': 23009044}, {'photo_id': 1358516678, 'portfolio_id': 23009044}, {'photo_id': 1358516587, 'portfolio_id': 23009044}, {'photo_id': 1358516585, 'portfolio_id': 23009044}, {'photo_id': 1358516583, 'portfolio_id': 23009044}, {'photo_id': 1358516580, 'portfolio_id': 23009044}, {'photo_id': 1358516576, 'portfolio_id': 23009044}, {'photo_id': 1358516574, 'portfolio_id': 23009044}, {'photo_id': 1358516527, 'portfolio_id': 23009044}, {'photo_id': 1358516522, 'portfolio_id': 23009044}, {'photo_id': 1358516518, 'portfolio_id': 23009044}, {'photo_id': 1358516512, 'portfolio_id': 23009044}, {'photo_id': 1358516509, 'portfolio_id': 23009044}, {'photo_id': 1358516507, 'portfolio_id': 23009044}, {'photo_id': 1358516466, 'portfolio_id': 23009044}, {'photo_id': 1358516215, 'portfolio_id': 23009044}, {'photo_id': 1358516175, 'portfolio_id': 23009044}, {'photo_id': 1358515867, 'portfolio_id': 23009044}, {'photo_id': 1358515811, 'portfolio_id': 23009044}, {'photo_id': 1358515755, 'portfolio_id': 23009044}, {'photo_id': 1358515726, 'portfolio_id': 23009044}, {'photo_id': 1358515699, 'portfolio_id': 23009044}, {'photo_id': 1358515668, 'portfolio_id': 23009044}, {'photo_id': 1358515621, 'portfolio_id': 23009044}, {'photo_id': 1358515598, 'portfolio_id': 23009044}, {'photo_id': 1358515585, 'portfolio_id': 23009044}, {'photo_id': 1358515564, 'portfolio_id': 23009044}, {'photo_id': 1358515539, 'portfolio_id': 23009044}] map_portfolio_id_photo_id: {23009044: [1358517381, 1358517377, 1358517371, 1358517366, 1358517328, 1358517325, 1358517307, 1358517271, 1358517255, 1358517129, 1358517100, 1358517073, 1358517061, 1358517058, 1358517054, 1358516759, 1358516731, 1358516705, 1358516678, 1358516587, 1358516585, 1358516583, 1358516580, 1358516576, 1358516574, 1358516527, 1358516522, 1358516518, 1358516512, 1358516509, 1358516507, 1358516466, 1358516215, 1358516175, 1358515867, 1358515811, 1358515755, 1358515726, 1358515699, 1358515668, 1358515621, 1358515598, 1358515585, 1358515564, 1358515539]} ##### 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.019883394241333008 #### 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 May 15 14:56:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (23009044) 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 : 23009044 get user id for portfolio 23009044 get sub ptf for main ptf 23009044, type 3726 and hashtags ['Carton_gris', 'environnement', 'flou', 'cartonnette', 'papier', 'mal_croppe', 'metal', 'kraft', 'plastique', 'Teint_Dans_La_Masse', 'autre_refus', '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`=23009044 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','environnement','flou','cartonnette','papier','mal_croppe','metal','kraft','plastique','Teint_Dans_La_Masse','autre_refus','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`=23009044 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','environnement','flou','cartonnette','papier','mal_croppe','metal','kraft','plastique','Teint_Dans_La_Masse','autre_refus','Carton_brun')) AND mptpi.`min_score`=0.5 To do returned map {'environnement': {'main_port_id': 23009044, 'sub_port_id': 23009072, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15359377, 'last_updated_at': datetime.datetime(2025, 5, 15, 14, 54, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 15, 14, 54, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 15, 14, 49, 28)}, 'metal': {'main_port_id': 23009044, 'sub_port_id': 23009073, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15359378, 'last_updated_at': datetime.datetime(2025, 5, 15, 14, 54, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 15, 14, 54, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 15, 14, 49, 28)}, 'cartonnette': {'main_port_id': 23009044, 'sub_port_id': 23009074, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15359379, 'last_updated_at': datetime.datetime(2025, 5, 15, 14, 54, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 15, 14, 54, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 15, 14, 49, 28)}, 'autre_refus': {'main_port_id': 23009044, 'sub_port_id': 23009075, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15359380, 'last_updated_at': datetime.datetime(2025, 5, 15, 14, 54, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 15, 14, 54, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 15, 14, 49, 28)}, 'plastique': {'main_port_id': 23009044, 'sub_port_id': 23009076, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15359381, 'last_updated_at': datetime.datetime(2025, 5, 15, 14, 54, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 15, 14, 54, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 15, 14, 49, 28)}, 'kraft': {'main_port_id': 23009044, 'sub_port_id': 23009077, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15359382, 'last_updated_at': datetime.datetime(2025, 5, 15, 14, 54, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 15, 14, 54, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 15, 14, 49, 28)}, 'Carton_gris': {'main_port_id': 23009044, 'sub_port_id': 23009078, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15359383, 'last_updated_at': datetime.datetime(2025, 5, 15, 14, 54, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 15, 14, 54, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 15, 14, 49, 28)}, 'flou': {'main_port_id': 23009044, 'sub_port_id': 23009079, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15359384, 'last_updated_at': datetime.datetime(2025, 5, 15, 14, 54, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 15, 14, 54, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 15, 14, 49, 28)}, 'mal_croppe': {'main_port_id': 23009044, 'sub_port_id': 23009080, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15359385, 'last_updated_at': datetime.datetime(2025, 5, 15, 14, 54, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 15, 14, 54, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 15, 14, 49, 28)}, 'papier': {'main_port_id': 23009044, 'sub_port_id': 23009081, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15359386, 'last_updated_at': datetime.datetime(2025, 5, 15, 14, 54, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 15, 14, 54, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 15, 14, 49, 28)}, 'Carton_brun': {'main_port_id': 23009044, 'sub_port_id': 23009082, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15359387, 'last_updated_at': datetime.datetime(2025, 5, 15, 14, 54, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 15, 14, 54, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 15, 14, 49, 28)}, 'Teint_Dans_La_Masse': {'main_port_id': 23009044, 'sub_port_id': 23009083, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15359388, 'last_updated_at': datetime.datetime(2025, 5, 15, 14, 54, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 15, 14, 54, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 15, 14, 49, 28)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23009072 , 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=23009044 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 (23009072) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23009044) result : ((1358515539,), (1358515564,), (1358515585,), (1358515598,), (1358515621,), (1358515668,), (1358515699,), (1358515726,), (1358515755,), (1358515811,), (1358515867,), (1358516175,), (1358516215,), (1358516466,), (1358516507,), (1358516509,), (1358516512,), (1358516518,), (1358516522,), (1358516527,), (1358516574,), (1358516576,), (1358516580,), (1358516583,), (1358516585,), (1358516587,), (1358516678,), (1358516705,), (1358516731,), (1358516759,), (1358517054,), (1358517058,), (1358517061,), (1358517073,), (1358517100,), (1358517129,), (1358517255,), (1358517271,), (1358517307,), (1358517325,), (1358517328,), (1358517366,), (1358517371,), (1358517377,), (1358517381,)) 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 (1358517100) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23009073 , 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=23009044 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 (23009073) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23009044) result : ((1358515539,), (1358515564,), (1358515585,), (1358515598,), (1358515621,), (1358515668,), (1358515699,), (1358515726,), (1358515755,), (1358515811,), (1358515867,), (1358516175,), (1358516215,), (1358516466,), (1358516507,), (1358516509,), (1358516512,), (1358516518,), (1358516522,), (1358516527,), (1358516574,), (1358516576,), (1358516580,), (1358516583,), (1358516585,), (1358516587,), (1358516678,), (1358516705,), (1358516731,), (1358516759,), (1358517054,), (1358517058,), (1358517061,), (1358517073,), (1358517100,), (1358517129,), (1358517255,), (1358517271,), (1358517307,), (1358517325,), (1358517328,), (1358517366,), (1358517371,), (1358517377,), (1358517381,)) 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 (1358517100) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23009074 , 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=23009044 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 (23009074) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23009044) result : ((1358515539,), (1358515564,), (1358515585,), (1358515598,), (1358515621,), (1358515668,), (1358515699,), (1358515726,), (1358515755,), (1358515811,), (1358515867,), (1358516175,), (1358516215,), (1358516466,), (1358516507,), (1358516509,), (1358516512,), (1358516518,), (1358516522,), (1358516527,), (1358516574,), (1358516576,), (1358516580,), (1358516583,), (1358516585,), (1358516587,), (1358516678,), (1358516705,), (1358516731,), (1358516759,), (1358517054,), (1358517058,), (1358517061,), (1358517073,), (1358517100,), (1358517129,), (1358517255,), (1358517271,), (1358517307,), (1358517325,), (1358517328,), (1358517366,), (1358517371,), (1358517377,), (1358517381,)) 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 (1358517100) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23009075 , 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=23009044 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 (23009075) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23009044) result : ((1358515539,), (1358515564,), (1358515585,), (1358515598,), (1358515621,), (1358515668,), (1358515699,), (1358515726,), (1358515755,), (1358515811,), (1358515867,), (1358516175,), (1358516215,), (1358516466,), (1358516507,), (1358516509,), (1358516512,), (1358516518,), (1358516522,), (1358516527,), (1358516574,), (1358516576,), (1358516580,), (1358516583,), (1358516585,), (1358516587,), (1358516678,), (1358516705,), (1358516731,), (1358516759,), (1358517054,), (1358517058,), (1358517061,), (1358517073,), (1358517100,), (1358517129,), (1358517255,), (1358517271,), (1358517307,), (1358517325,), (1358517328,), (1358517366,), (1358517371,), (1358517377,), (1358517381,)) 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 (1358517100) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23009076 , 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=23009044 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 (23009076) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23009044) result : ((1358515539,), (1358515564,), (1358515585,), (1358515598,), (1358515621,), (1358515668,), (1358515699,), (1358515726,), (1358515755,), (1358515811,), (1358515867,), (1358516175,), (1358516215,), (1358516466,), (1358516507,), (1358516509,), (1358516512,), (1358516518,), (1358516522,), (1358516527,), (1358516574,), (1358516576,), (1358516580,), (1358516583,), (1358516585,), (1358516587,), (1358516678,), (1358516705,), (1358516731,), (1358516759,), (1358517054,), (1358517058,), (1358517061,), (1358517073,), (1358517100,), (1358517129,), (1358517255,), (1358517271,), (1358517307,), (1358517325,), (1358517328,), (1358517366,), (1358517371,), (1358517377,), (1358517381,)) 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 (1358517100) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23009077 , 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=23009044 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 (23009077) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23009044) result : ((1358515539,), (1358515564,), (1358515585,), (1358515598,), (1358515621,), (1358515668,), (1358515699,), (1358515726,), (1358515755,), (1358515811,), (1358515867,), (1358516175,), (1358516215,), (1358516466,), (1358516507,), (1358516509,), (1358516512,), (1358516518,), (1358516522,), (1358516527,), (1358516574,), (1358516576,), (1358516580,), (1358516583,), (1358516585,), (1358516587,), (1358516678,), (1358516705,), (1358516731,), (1358516759,), (1358517054,), (1358517058,), (1358517061,), (1358517073,), (1358517100,), (1358517129,), (1358517255,), (1358517271,), (1358517307,), (1358517325,), (1358517328,), (1358517366,), (1358517371,), (1358517377,), (1358517381,)) 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 (1358517100) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23009078 , 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=23009044 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 (23009078) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23009044) result : ((1358515539,), (1358515564,), (1358515585,), (1358515598,), (1358515621,), (1358515668,), (1358515699,), (1358515726,), (1358515755,), (1358515811,), (1358515867,), (1358516175,), (1358516215,), (1358516466,), (1358516507,), (1358516509,), (1358516512,), (1358516518,), (1358516522,), (1358516527,), (1358516574,), (1358516576,), (1358516580,), (1358516583,), (1358516585,), (1358516587,), (1358516678,), (1358516705,), (1358516731,), (1358516759,), (1358517054,), (1358517058,), (1358517061,), (1358517073,), (1358517100,), (1358517129,), (1358517255,), (1358517271,), (1358517307,), (1358517325,), (1358517328,), (1358517366,), (1358517371,), (1358517377,), (1358517381,)) 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 (1358517100) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23009079 , 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=23009044 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 (23009079) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23009044) result : ((1358515539,), (1358515564,), (1358515585,), (1358515598,), (1358515621,), (1358515668,), (1358515699,), (1358515726,), (1358515755,), (1358515811,), (1358515867,), (1358516175,), (1358516215,), (1358516466,), (1358516507,), (1358516509,), (1358516512,), (1358516518,), (1358516522,), (1358516527,), (1358516574,), (1358516576,), (1358516580,), (1358516583,), (1358516585,), (1358516587,), (1358516678,), (1358516705,), (1358516731,), (1358516759,), (1358517054,), (1358517058,), (1358517061,), (1358517073,), (1358517100,), (1358517129,), (1358517255,), (1358517271,), (1358517307,), (1358517325,), (1358517328,), (1358517366,), (1358517371,), (1358517377,), (1358517381,)) 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 (1358517100) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23009080 , 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=23009044 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 (23009080) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23009044) result : ((1358515539,), (1358515564,), (1358515585,), (1358515598,), (1358515621,), (1358515668,), (1358515699,), (1358515726,), (1358515755,), (1358515811,), (1358515867,), (1358516175,), (1358516215,), (1358516466,), (1358516507,), (1358516509,), (1358516512,), (1358516518,), (1358516522,), (1358516527,), (1358516574,), (1358516576,), (1358516580,), (1358516583,), (1358516585,), (1358516587,), (1358516678,), (1358516705,), (1358516731,), (1358516759,), (1358517054,), (1358517058,), (1358517061,), (1358517073,), (1358517100,), (1358517129,), (1358517255,), (1358517271,), (1358517307,), (1358517325,), (1358517328,), (1358517366,), (1358517371,), (1358517377,), (1358517381,)) 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 (1358517100) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23009081 , 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=23009044 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 (23009081) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23009044) result : ((1358515539,), (1358515564,), (1358515585,), (1358515598,), (1358515621,), (1358515668,), (1358515699,), (1358515726,), (1358515755,), (1358515811,), (1358515867,), (1358516175,), (1358516215,), (1358516466,), (1358516507,), (1358516509,), (1358516512,), (1358516518,), (1358516522,), (1358516527,), (1358516574,), (1358516576,), (1358516580,), (1358516583,), (1358516585,), (1358516587,), (1358516678,), (1358516705,), (1358516731,), (1358516759,), (1358517054,), (1358517058,), (1358517061,), (1358517073,), (1358517100,), (1358517129,), (1358517255,), (1358517271,), (1358517307,), (1358517325,), (1358517328,), (1358517366,), (1358517371,), (1358517377,), (1358517381,)) 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 (1358517100) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23009082 , 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=23009044 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 (23009082) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23009044) result : ((1358515539,), (1358515564,), (1358515585,), (1358515598,), (1358515621,), (1358515668,), (1358515699,), (1358515726,), (1358515755,), (1358515811,), (1358515867,), (1358516175,), (1358516215,), (1358516466,), (1358516507,), (1358516509,), (1358516512,), (1358516518,), (1358516522,), (1358516527,), (1358516574,), (1358516576,), (1358516580,), (1358516583,), (1358516585,), (1358516587,), (1358516678,), (1358516705,), (1358516731,), (1358516759,), (1358517054,), (1358517058,), (1358517061,), (1358517073,), (1358517100,), (1358517129,), (1358517255,), (1358517271,), (1358517307,), (1358517325,), (1358517328,), (1358517366,), (1358517371,), (1358517377,), (1358517381,)) 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 (1358517100) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23009083 , 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=23009044 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 (23009083) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23009044) result : ((1358515539,), (1358515564,), (1358515585,), (1358515598,), (1358515621,), (1358515668,), (1358515699,), (1358515726,), (1358515755,), (1358515811,), (1358515867,), (1358516175,), (1358516215,), (1358516466,), (1358516507,), (1358516509,), (1358516512,), (1358516518,), (1358516522,), (1358516527,), (1358516574,), (1358516576,), (1358516580,), (1358516583,), (1358516585,), (1358516587,), (1358516678,), (1358516705,), (1358516731,), (1358516759,), (1358517054,), (1358517058,), (1358517061,), (1358517073,), (1358517100,), (1358517129,), (1358517255,), (1358517271,), (1358517307,), (1358517325,), (1358517328,), (1358517366,), (1358517371,), (1358517377,), (1358517381,)) 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 (1358517100) and cspi.crop_hashtag_id = chi.id; 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`=23009044 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','environnement','flou','cartonnette','papier','mal_croppe','metal','kraft','plastique','Teint_Dans_La_Masse','autre_refus','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`=23009044 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','environnement','flou','cartonnette','papier','mal_croppe','metal','kraft','plastique','Teint_Dans_La_Masse','autre_refus','Carton_brun')) AND mptpi.`min_score`=0.5 To do returned map {'environnement': {'main_port_id': 23009044, 'sub_port_id': 23009085, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15359389, 'last_updated_at': datetime.datetime(2025, 5, 15, 14, 49, 34), 'last_updated_at_desc': datetime.datetime(2025, 5, 15, 14, 49, 34), 'last_updated_at_asc': datetime.datetime(2025, 5, 15, 14, 49, 34)}, 'metal': {'main_port_id': 23009044, 'sub_port_id': 23009086, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15359390, 'last_updated_at': datetime.datetime(2025, 5, 15, 14, 49, 34), 'last_updated_at_desc': datetime.datetime(2025, 5, 15, 14, 49, 34), 'last_updated_at_asc': datetime.datetime(2025, 5, 15, 14, 49, 34)}, 'cartonnette': {'main_port_id': 23009044, 'sub_port_id': 23009087, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15359391, 'last_updated_at': datetime.datetime(2025, 5, 15, 14, 49, 34), 'last_updated_at_desc': datetime.datetime(2025, 5, 15, 14, 49, 34), 'last_updated_at_asc': datetime.datetime(2025, 5, 15, 14, 49, 34)}, 'autre_refus': {'main_port_id': 23009044, 'sub_port_id': 23009088, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15359392, 'last_updated_at': datetime.datetime(2025, 5, 15, 14, 49, 34), 'last_updated_at_desc': datetime.datetime(2025, 5, 15, 14, 49, 34), 'last_updated_at_asc': datetime.datetime(2025, 5, 15, 14, 49, 34)}, 'plastique': {'main_port_id': 23009044, 'sub_port_id': 23009089, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15359393, 'last_updated_at': datetime.datetime(2025, 5, 15, 14, 49, 34), 'last_updated_at_desc': datetime.datetime(2025, 5, 15, 14, 49, 34), 'last_updated_at_asc': datetime.datetime(2025, 5, 15, 14, 49, 34)}, 'kraft': {'main_port_id': 23009044, 'sub_port_id': 23009090, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15359394, 'last_updated_at': datetime.datetime(2025, 5, 15, 14, 49, 34), 'last_updated_at_desc': datetime.datetime(2025, 5, 15, 14, 49, 34), 'last_updated_at_asc': datetime.datetime(2025, 5, 15, 14, 49, 34)}, 'Carton_gris': {'main_port_id': 23009044, 'sub_port_id': 23009091, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15359395, 'last_updated_at': datetime.datetime(2025, 5, 15, 14, 49, 34), 'last_updated_at_desc': datetime.datetime(2025, 5, 15, 14, 49, 34), 'last_updated_at_asc': datetime.datetime(2025, 5, 15, 14, 49, 34)}, 'flou': {'main_port_id': 23009044, 'sub_port_id': 23009092, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15359396, 'last_updated_at': datetime.datetime(2025, 5, 15, 14, 49, 34), 'last_updated_at_desc': datetime.datetime(2025, 5, 15, 14, 49, 34), 'last_updated_at_asc': datetime.datetime(2025, 5, 15, 14, 49, 34)}, 'mal_croppe': {'main_port_id': 23009044, 'sub_port_id': 23009093, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15359397, 'last_updated_at': datetime.datetime(2025, 5, 15, 14, 49, 34), 'last_updated_at_desc': datetime.datetime(2025, 5, 15, 14, 49, 34), 'last_updated_at_asc': datetime.datetime(2025, 5, 15, 14, 49, 34)}, 'papier': {'main_port_id': 23009044, 'sub_port_id': 23009094, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15359398, 'last_updated_at': datetime.datetime(2025, 5, 15, 14, 49, 34), 'last_updated_at_desc': datetime.datetime(2025, 5, 15, 14, 49, 34), 'last_updated_at_asc': datetime.datetime(2025, 5, 15, 14, 49, 34)}, 'Carton_brun': {'main_port_id': 23009044, 'sub_port_id': 23009095, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15359399, 'last_updated_at': datetime.datetime(2025, 5, 15, 14, 49, 34), 'last_updated_at_desc': datetime.datetime(2025, 5, 15, 14, 49, 34), 'last_updated_at_asc': datetime.datetime(2025, 5, 15, 14, 49, 34)}, 'Teint_Dans_La_Masse': {'main_port_id': 23009044, 'sub_port_id': 23009096, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15359400, 'last_updated_at': datetime.datetime(2025, 5, 15, 14, 54, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 15, 14, 54, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 15, 14, 49, 34)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23009085,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23009072 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23009086,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23009073 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23009087,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23009074 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23009088,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23009075 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23009089,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23009076 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23009090,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23009077 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23009091,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23009078 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23009092,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23009079 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23009093,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23009080 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23009094,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23009081 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23009095,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23009082 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23009096,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23009083 lien utilise dans velours : https://www.fotonower.com/velours/23009085,23009086,23009087,23009088,23009089,23009090,23009091,23009092,23009093,23009094,23009095,23009096?tags=environnement,metal,cartonnette,autre_refus,plastique,kraft,Carton_gris,flou,mal_croppe,papier,Carton_brun,Teint_Dans_La_Masse After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([23009044]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1358517381, 1358517377, 1358517371, 1358517366, 1358517328, 1358517325, 1358517307, 1358517271, 1358517255] map_info['map_portfolio_photo'] : {23009044: [1358517381, 1358517377, 1358517371, 1358517366, 1358517328, 1358517325, 1358517307, 1358517271, 1358517255, 1358517129, 1358517100, 1358517073, 1358517061, 1358517058, 1358517054, 1358516759, 1358516731, 1358516705, 1358516678, 1358516587, 1358516585, 1358516583, 1358516580, 1358516576, 1358516574, 1358516527, 1358516522, 1358516518, 1358516512, 1358516509, 1358516507, 1358516466, 1358516215, 1358516175, 1358515867, 1358515811, 1358515755, 1358515726, 1358515699, 1358515668, 1358515621, 1358515598, 1358515585, 1358515564, 1358515539]} final : False mtd_id 4302 list_pids : [1358517381, 1358517377, 1358517371, 1358517366, 1358517328, 1358517325, 1358517307, 1358517271, 1358517255] Looping around the photos to save general results len do output : 1 /23009044. 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, '2861723') ('4302', '23009044', '1358517381', None, None, None, None, None, '2861723') ('4302', None, None, None, None, None, None, None, '2861723') ('4302', '23009044', '1358517377', None, None, None, None, None, '2861723') ('4302', None, None, None, None, None, None, None, '2861723') ('4302', '23009044', '1358517371', None, None, None, None, None, '2861723') ('4302', None, None, None, None, None, None, None, '2861723') ('4302', '23009044', '1358517366', None, None, None, None, None, '2861723') ('4302', None, None, None, None, None, None, None, '2861723') ('4302', '23009044', '1358517328', None, None, None, None, None, '2861723') ('4302', None, None, None, None, None, None, None, '2861723') ('4302', '23009044', '1358517325', None, None, None, None, None, '2861723') ('4302', None, None, None, None, None, None, None, '2861723') ('4302', '23009044', '1358517307', None, None, None, None, None, '2861723') ('4302', None, None, None, None, None, None, None, '2861723') ('4302', '23009044', '1358517271', None, None, None, None, None, '2861723') ('4302', None, None, None, None, None, None, None, '2861723') ('4302', '23009044', '1358517255', None, None, None, None, None, '2861723') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '23009044', "{'environnement': 23009072, 'metal': 23009073, 'cartonnette': 23009074, 'autre_refus': 23009075, 'plastique': 23009076, 'kraft': 23009077, 'Carton_gris': 23009078, 'flou': 23009079, 'mal_croppe': 23009080, 'papier': 23009081, 'Carton_brun': 23009082, 'Teint_Dans_La_Masse': 23009083}", None, None, None, None, '2861723'), ('4302', '23009044', '1358517381', None, None, None, None, None, '2861723'), ('4302', '23009044', '1358517377', None, None, None, None, None, '2861723'), ('4302', '23009044', '1358517371', None, None, None, None, None, '2861723'), ('4302', '23009044', '1358517366', None, None, None, None, None, '2861723'), ('4302', '23009044', '1358517328', None, None, None, None, None, '2861723'), ('4302', '23009044', '1358517325', None, None, None, None, None, '2861723'), ('4302', '23009044', '1358517307', None, None, None, None, None, '2861723'), ('4302', '23009044', '1358517271', None, None, None, None, None, '2861723'), ('4302', '23009044', '1358517255', None, None, None, None, None, '2861723')] time used for this insertion : 0.016431808471679688 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.45034098625183105 time spend to save output : 0.016803741455078125 total time spend for step 1 : 0.4671447277069092 step2:final Thu May 15 14:56:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (23009044) 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 23009044 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1358515621,1358515598,1358515585,1358515564,1358515539,1358515867,1358515811,1358515755,1358515726,1358515699,1358515668,1358516215,1358516175,1358516466,1358516527,1358516522,1358516518,1358516512,1358516509,1358516507,1358516587,1358516585,1358516583,1358516580,1358516576,1358516574,1358516759,1358516731,1358516705,1358516678,1358517129,1358517100,1358517073,1358517061,1358517058,1358517054,1358517328,1358517325,1358517307,1358517271,1358517255,1358517381,1358517377,1358517371,1358517366); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([23009044]) Inside saveOutput : final : False verbose : True original output for save of step final : {1358517381: ('0.0',), 1358517377: ('0.0',), 1358517371: ('0.0',), 1358517366: ('0.0',), 1358517328: ('0.0',), 1358517325: ('0.0',), 1358517307: ('0.0',), 1358517271: ('0.0',), 1358517255: ('0.0',)} new output for save of step final : {1358517381: ('0.0',), 1358517377: ('0.0',), 1358517371: ('0.0',), 1358517366: ('0.0',), 1358517328: ('0.0',), 1358517325: ('0.0',), 1358517307: ('0.0',), 1358517271: ('0.0',), 1358517255: ('0.0',)} [1358517381, 1358517377, 1358517371, 1358517366, 1358517328, 1358517325, 1358517307, 1358517271, 1358517255] map_info['map_portfolio_photo'] : {23009044: [1358517381, 1358517377, 1358517371, 1358517366, 1358517328, 1358517325, 1358517307, 1358517271, 1358517255, 1358517129, 1358517100, 1358517073, 1358517061, 1358517058, 1358517054, 1358516759, 1358516731, 1358516705, 1358516678, 1358516587, 1358516585, 1358516583, 1358516580, 1358516576, 1358516574, 1358516527, 1358516522, 1358516518, 1358516512, 1358516509, 1358516507, 1358516466, 1358516215, 1358516175, 1358515867, 1358515811, 1358515755, 1358515726, 1358515699, 1358515668, 1358515621, 1358515598, 1358515585, 1358515564, 1358515539]} final : False mtd_id 4302 list_pids : [1358517381, 1358517377, 1358517371, 1358517366, 1358517328, 1358517325, 1358517307, 1358517271, 1358517255] Looping around the photos to save general results len do output : 9 /1358517381.Didn't retrieve data . /1358517377.Didn't retrieve data . /1358517371.Didn't retrieve data . /1358517366.Didn't retrieve data . /1358517328.Didn't retrieve data . /1358517325.Didn't retrieve data . /1358517307.Didn't retrieve data . /1358517271.Didn't retrieve data . /1358517255.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, '2861723') ('4302', '23009044', '1358517381', None, None, None, None, None, '2861723') ('4302', None, None, None, None, None, None, None, '2861723') ('4302', '23009044', '1358517377', None, None, None, None, None, '2861723') ('4302', None, None, None, None, None, None, None, '2861723') ('4302', '23009044', '1358517371', None, None, None, None, None, '2861723') ('4302', None, None, None, None, None, None, None, '2861723') ('4302', '23009044', '1358517366', None, None, None, None, None, '2861723') ('4302', None, None, None, None, None, None, None, '2861723') ('4302', '23009044', '1358517328', None, None, None, None, None, '2861723') ('4302', None, None, None, None, None, None, None, '2861723') ('4302', '23009044', '1358517325', None, None, None, None, None, '2861723') ('4302', None, None, None, None, None, None, None, '2861723') ('4302', '23009044', '1358517307', None, None, None, None, None, '2861723') ('4302', None, None, None, None, None, None, None, '2861723') ('4302', '23009044', '1358517271', None, None, None, None, None, '2861723') ('4302', None, None, None, None, None, None, None, '2861723') ('4302', '23009044', '1358517255', None, None, None, None, None, '2861723') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 27 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '23009044', '1358517381', '0.0', None, None, None, None, '2861723'), ('4302', '23009044', '1358517377', '0.0', None, None, None, None, '2861723'), ('4302', '23009044', '1358517371', '0.0', None, None, None, None, '2861723'), ('4302', '23009044', '1358517366', '0.0', None, None, None, None, '2861723'), ('4302', '23009044', '1358517328', '0.0', None, None, None, None, '2861723'), ('4302', '23009044', '1358517325', '0.0', None, None, None, None, '2861723'), ('4302', '23009044', '1358517307', '0.0', None, None, None, None, '2861723'), ('4302', '23009044', '1358517271', '0.0', None, None, None, None, '2861723'), ('4302', '23009044', '1358517255', '0.0', None, None, None, None, '2861723')] time used for this insertion : 0.014768123626708984 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.0571291446685791 time spend to save output : 0.015316009521484375 total time spend for step 2 : 0.07244515419006348 step3:velours_tree Thu May 15 14:56:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {23009044: [{'environnement': 23009072, 'metal': 23009073, 'cartonnette': 23009074, 'autre_refus': 23009075, 'plastique': 23009076, 'kraft': 23009077, 'Carton_gris': 23009078, 'flou': 23009079, 'mal_croppe': 23009080, 'papier': 23009081, 'Carton_brun': 23009082, 'Teint_Dans_La_Masse': 23009083}]} input_args_next_step : {23009044: ()} output_args : {23009044: [{'environnement': 23009072, 'metal': 23009073, 'cartonnette': 23009074, 'autre_refus': 23009075, 'plastique': 23009076, 'kraft': 23009077, 'Carton_gris': 23009078, 'flou': 23009079, 'mal_croppe': 23009080, 'papier': 23009081, 'Carton_brun': 23009082, 'Teint_Dans_La_Masse': 23009083}]} args : 23009044 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 : ({'environnement': 23009072, 'metal': 23009073, 'cartonnette': 23009074, 'autre_refus': 23009075, 'plastique': 23009076, 'kraft': 23009077, 'Carton_gris': 23009078, 'flou': 23009079, 'mal_croppe': 23009080, 'papier': 23009081, 'Carton_brun': 23009082, 'Teint_Dans_La_Masse': 23009083},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (23009044) 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([23009044]) 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.6438190937042236 time spend to save output : 8.368492126464844e-05 total time spend for step 3 : 0.6439027786254883 step4:send_mail_cod Thu May 15 14:56:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1358517381: ('0.0',), 1358517377: ('0.0',), 1358517371: ('0.0',), 1358517366: ('0.0',), 1358517328: ('0.0',), 1358517325: ('0.0',), 1358517307: ('0.0',), 1358517271: ('0.0',), 1358517255: ('0.0',)} input_args_next_step : {1358517381: ()} output_args : {1358517381: ('0.0',), 1358517377: ('0.0',), 1358517371: ('0.0',), 1358517366: ('0.0',), 1358517328: ('0.0',), 1358517325: ('0.0',), 1358517307: ('0.0',), 1358517271: ('0.0',), 1358517255: ('0.0',)} args : 1358517381 depend.output_id : 0 input_args_next_step : {1358517381: ('0.0',), 1358517377: ()} output_args : {1358517381: ('0.0',), 1358517377: ('0.0',), 1358517371: ('0.0',), 1358517366: ('0.0',), 1358517328: ('0.0',), 1358517325: ('0.0',), 1358517307: ('0.0',), 1358517271: ('0.0',), 1358517255: ('0.0',)} args : 1358517377 depend.output_id : 0 input_args_next_step : {1358517381: ('0.0',), 1358517377: ('0.0',), 1358517371: ()} output_args : {1358517381: ('0.0',), 1358517377: ('0.0',), 1358517371: ('0.0',), 1358517366: ('0.0',), 1358517328: ('0.0',), 1358517325: ('0.0',), 1358517307: ('0.0',), 1358517271: ('0.0',), 1358517255: ('0.0',)} args : 1358517371 depend.output_id : 0 input_args_next_step : {1358517381: ('0.0',), 1358517377: ('0.0',), 1358517371: ('0.0',), 1358517366: ()} output_args : {1358517381: ('0.0',), 1358517377: ('0.0',), 1358517371: ('0.0',), 1358517366: ('0.0',), 1358517328: ('0.0',), 1358517325: ('0.0',), 1358517307: ('0.0',), 1358517271: ('0.0',), 1358517255: ('0.0',)} args : 1358517366 depend.output_id : 0 input_args_next_step : {1358517381: ('0.0',), 1358517377: ('0.0',), 1358517371: ('0.0',), 1358517366: ('0.0',), 1358517328: ()} output_args : {1358517381: ('0.0',), 1358517377: ('0.0',), 1358517371: ('0.0',), 1358517366: ('0.0',), 1358517328: ('0.0',), 1358517325: ('0.0',), 1358517307: ('0.0',), 1358517271: ('0.0',), 1358517255: ('0.0',)} args : 1358517328 depend.output_id : 0 input_args_next_step : {1358517381: ('0.0',), 1358517377: ('0.0',), 1358517371: ('0.0',), 1358517366: ('0.0',), 1358517328: ('0.0',), 1358517325: ()} output_args : {1358517381: ('0.0',), 1358517377: ('0.0',), 1358517371: ('0.0',), 1358517366: ('0.0',), 1358517328: ('0.0',), 1358517325: ('0.0',), 1358517307: ('0.0',), 1358517271: ('0.0',), 1358517255: ('0.0',)} args : 1358517325 depend.output_id : 0 input_args_next_step : {1358517381: ('0.0',), 1358517377: ('0.0',), 1358517371: ('0.0',), 1358517366: ('0.0',), 1358517328: ('0.0',), 1358517325: ('0.0',), 1358517307: ()} output_args : {1358517381: ('0.0',), 1358517377: ('0.0',), 1358517371: ('0.0',), 1358517366: ('0.0',), 1358517328: ('0.0',), 1358517325: ('0.0',), 1358517307: ('0.0',), 1358517271: ('0.0',), 1358517255: ('0.0',)} args : 1358517307 depend.output_id : 0 input_args_next_step : {1358517381: ('0.0',), 1358517377: ('0.0',), 1358517371: ('0.0',), 1358517366: ('0.0',), 1358517328: ('0.0',), 1358517325: ('0.0',), 1358517307: ('0.0',), 1358517271: ()} output_args : {1358517381: ('0.0',), 1358517377: ('0.0',), 1358517371: ('0.0',), 1358517366: ('0.0',), 1358517328: ('0.0',), 1358517325: ('0.0',), 1358517307: ('0.0',), 1358517271: ('0.0',), 1358517255: ('0.0',)} args : 1358517271 depend.output_id : 0 input_args_next_step : {1358517381: ('0.0',), 1358517377: ('0.0',), 1358517371: ('0.0',), 1358517366: ('0.0',), 1358517328: ('0.0',), 1358517325: ('0.0',), 1358517307: ('0.0',), 1358517271: ('0.0',), 1358517255: ()} output_args : {1358517381: ('0.0',), 1358517377: ('0.0',), 1358517371: ('0.0',), 1358517366: ('0.0',), 1358517328: ('0.0',), 1358517325: ('0.0',), 1358517307: ('0.0',), 1358517271: ('0.0',), 1358517255: ('0.0',)} args : 1358517255 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 : {23009044: [{'environnement': 23009072, 'metal': 23009073, 'cartonnette': 23009074, 'autre_refus': 23009075, 'plastique': 23009076, 'kraft': 23009077, 'Carton_gris': 23009078, 'flou': 23009079, 'mal_croppe': 23009080, 'papier': 23009081, 'Carton_brun': 23009082, 'Teint_Dans_La_Masse': 23009083}]} input_args_next_step : {1358517381: ('0.0',), 1358517377: ('0.0',), 1358517371: ('0.0',), 1358517366: ('0.0',), 1358517328: ('0.0',), 1358517325: ('0.0',), 1358517307: ('0.0',), 1358517271: ('0.0',), 1358517255: ('0.0',), 23009044: ()} output_args : {23009044: [{'environnement': 23009072, 'metal': 23009073, 'cartonnette': 23009074, 'autre_refus': 23009075, 'plastique': 23009076, 'kraft': 23009077, 'Carton_gris': 23009078, 'flou': 23009079, 'mal_croppe': 23009080, 'papier': 23009081, 'Carton_brun': 23009082, 'Teint_Dans_La_Masse': 23009083}]} args : 23009044 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :10, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (23009044) 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 (1358517381,1358517377,1358517371,1358517366,1358517328,1358517325,1358517307,1358517271,1358517255) Found this number of photos: 9 ##### Call download_photos : nb_thread : 5 begin to download photo : 1358517255 begin to download photo : 1358517307 begin to download photo : 1358517328 begin to download photo : 1358517371 begin to download photo : 1358517381 download finish for photo 1358517381 download finish for photo 1358517307 begin to download photo : 1358517325 download finish for photo 1358517255 begin to download photo : 1358517271 download finish for photo 1358517328 begin to download photo : 1358517366 download finish for photo 1358517371 begin to download photo : 1358517377 download finish for photo 1358517325 download finish for photo 1358517271 download finish for photo 1358517366 download finish for photo 1358517377 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette230090731747313820/ imagette230090741747313820/ imagette230090751747313820/ imagette230090761747313820/ imagette230090771747313820/ imagette230090791747313820/ imagette230090801747313820/ imagette230090781747313820/ imagette230090821747313820/ imagette230090831747313820/ length of list_filenames : 9 ; length of list_pids : 9 ; length of list_args : 9 results_Auto_P23009044_15-05-2025_14_57_00.pdf 23009073 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=23009073 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette230090731747313820 23009074 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=23009074 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette230090741747313820 23009075 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=23009075 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette230090751747313820 23009076 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=23009076 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette230090761747313820 23009077 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=23009077 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette230090771747313820 23009079 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=23009079 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette230090791747313820 23009080 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=23009080 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette230090801747313820 23009078 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=23009078 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette230090781747313820 23009082 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=23009082 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette230090821747313820 23009083 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=23009083 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette230090831747313820 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=23009044 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/23009085,23009086,23009087,23009088,23009089,23009090,23009091,23009092,23009093,23009094,23009095,23009096?tags=environnement,metal,cartonnette,autre_refus,plastique,kraft,Carton_gris,flou,mal_croppe,papier,Carton_brun,Teint_Dans_La_Masse your option no_mail is active, we will not send the real mail to your client args[1358517381] : ('0.0',) no score found for photo 1358517381 We are sending mail with results at report@fotonower.com args[1358517377] : ('0.0',) no score found for photo 1358517377 We are sending mail with results at report@fotonower.com args[1358517371] : ('0.0',) no score found for photo 1358517371 We are sending mail with results at report@fotonower.com args[1358517366] : ('0.0',) no score found for photo 1358517366 We are sending mail with results at report@fotonower.com args[1358517328] : ('0.0',) no score found for photo 1358517328 We are sending mail with results at report@fotonower.com args[1358517325] : ('0.0',) no score found for photo 1358517325 We are sending mail with results at report@fotonower.com args[1358517307] : ('0.0',) no score found for photo 1358517307 We are sending mail with results at report@fotonower.com args[1358517271] : ('0.0',) no score found for photo 1358517271 We are sending mail with results at report@fotonower.com args[1358517255] : ('0.0',) no score found for photo 1358517255 We are sending mail with results at report@fotonower.com refus_total : 0.0 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=23009044 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_P23009044_15-05-2025_14_57_00.pdf results_Auto_P23009044_15-05-2025_14_57_00.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23009044_15-05-2025_14_57_00.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','23009044','results_Auto_P23009044_15-05-2025_14_57_00.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23009044_15-05-2025_14_57_00.pdf','pdf','','0.09','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([23009044]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1358517381, 1358517377, 1358517371, 1358517366, 1358517328, 1358517325, 1358517307, 1358517271, 1358517255] map_info['map_portfolio_photo'] : {23009044: [1358517381, 1358517377, 1358517371, 1358517366, 1358517328, 1358517325, 1358517307, 1358517271, 1358517255, 1358517129, 1358517100, 1358517073, 1358517061, 1358517058, 1358517054, 1358516759, 1358516731, 1358516705, 1358516678, 1358516587, 1358516585, 1358516583, 1358516580, 1358516576, 1358516574, 1358516527, 1358516522, 1358516518, 1358516512, 1358516509, 1358516507, 1358516466, 1358516215, 1358516175, 1358515867, 1358515811, 1358515755, 1358515726, 1358515699, 1358515668, 1358515621, 1358515598, 1358515585, 1358515564, 1358515539]} final : False mtd_id 4302 list_pids : [1358517381, 1358517377, 1358517371, 1358517366, 1358517328, 1358517325, 1358517307, 1358517271, 1358517255] 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, '2861723') ('4302', '23009044', '1358517381', None, None, None, None, None, '2861723') ('4302', None, None, None, None, None, None, None, '2861723') ('4302', '23009044', '1358517377', None, None, None, None, None, '2861723') ('4302', None, None, None, None, None, None, None, '2861723') ('4302', '23009044', '1358517371', None, None, None, None, None, '2861723') ('4302', None, None, None, None, None, None, None, '2861723') ('4302', '23009044', '1358517366', None, None, None, None, None, '2861723') ('4302', None, None, None, None, None, None, None, '2861723') ('4302', '23009044', '1358517328', None, None, None, None, None, '2861723') ('4302', None, None, None, None, None, None, None, '2861723') ('4302', '23009044', '1358517325', None, None, None, None, None, '2861723') ('4302', None, None, None, None, None, None, None, '2861723') ('4302', '23009044', '1358517307', None, None, None, None, None, '2861723') ('4302', None, None, None, None, None, None, None, '2861723') ('4302', '23009044', '1358517271', None, None, None, None, None, '2861723') ('4302', None, None, None, None, None, None, None, '2861723') ('4302', '23009044', '1358517255', None, None, None, None, None, '2861723') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 9 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '23009044', '1358517381', None, None, None, None, None, '2861723'), ('4302', '23009044', '1358517377', None, None, None, None, None, '2861723'), ('4302', '23009044', '1358517371', None, None, None, None, None, '2861723'), ('4302', '23009044', '1358517366', None, None, None, None, None, '2861723'), ('4302', '23009044', '1358517328', None, None, None, None, None, '2861723'), ('4302', '23009044', '1358517325', None, None, None, None, None, '2861723'), ('4302', '23009044', '1358517307', None, None, None, None, None, '2861723'), ('4302', '23009044', '1358517271', None, None, None, None, None, '2861723'), ('4302', '23009044', '1358517255', None, None, None, None, None, '2861723')] time used for this insertion : 0.014632940292358398 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.860548734664917 time spend to save output : 0.014912128448486328 total time spend for step 4 : 1.8754608631134033 step5:split_time_score Thu May 15 14:57:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['23009044'] 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 : [('23009044',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (23009044) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1358517381: {'path': 'temp/1747313819_3765609_1358517381_3fb379d98f449a9ed3e525fe087c569d.jpg', 'extension': 'jpg'}, 1358517307: {'path': 'temp/1747313819_3765609_1358517307_c985b068a861f8753ee2e5172d92430c.jpg', 'extension': 'jpg'}, 1358517325: {'path': 'temp/1747313819_3765609_1358517325_12e2cfbba69e65f2b0bafbfdf24ceac6.jpg', 'extension': 'jpg'}, 1358517255: {'path': 'temp/1747313819_3765609_1358517255_7939aec24183503f3944034431a219fd.jpg', 'extension': 'jpg'}, 1358517271: {'path': 'temp/1747313819_3765609_1358517271_d743d43ffd9263b2cac2cdf29fea035a.jpg', 'extension': 'jpg'}, 1358517328: {'path': 'temp/1747313819_3765609_1358517328_e75937e2508a3938544e006e8868f7bb.jpg', 'extension': 'jpg'}, 1358517366: {'path': 'temp/1747313819_3765609_1358517366_718863990e50b4f6435499a6134885e5.jpg', 'extension': 'jpg'}, 1358517371: {'path': 'temp/1747313819_3765609_1358517371_3cdc248df3d271b8bcff06d94fb0d9fc.jpg', 'extension': 'jpg'}, 1358517377: {'path': 'temp/1747313819_3765609_1358517377_c51290218bb895855573dc7b96124a59.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 = 23009044; (('arc_en_ciel_jrm_live',), ('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 = 23009044 group by h (('14', 45),) 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=23009044 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 (23009044) 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 (23009044) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 15052025 23009044 Nombre de photos uploadées : 45 / 23040 (0%) 15052025 23009044 Nombre de photos taguées (types de déchets): 0 / 45 (0%) 15052025 23009044 Nombre de photos taguées (volume) : 0 / 45 (0%) [{'photo_id': 1358515621, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/15/de2b4ca12b78dc595062b44ac69a96b0.jpg', 'username': None, 'uploaded_at': 1747313167, 'text': 'image_15052025_14_45_04_10149.jpg'}, {'photo_id': 1358515598, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/15/10bb841f00b7416859bc57a8f7b64f77.jpg', 'username': None, 'uploaded_at': 1747313167, 'text': 'image_15052025_14_45_14_10135.jpg'}, {'photo_id': 1358515585, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/15/43d4a8fde48fe180a7aaaaf52d3776ab.jpg', 'username': None, 'uploaded_at': 1747313167, 'text': 'image_15052025_14_45_24_10134.jpg'}, {'photo_id': 1358515564, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/15/ce33c9bd5a02ad2477bbd707102c3b46.jpg', 'username': None, 'uploaded_at': 1747313167, 'text': 'image_15052025_14_45_34_10142.jpg'}] 0 [] elapsed_time : load_data_split_time_score 4.0531158447265625e-06 elapsed_time : order_list_meta_photo_and_scores 1.3828277587890625e-05 ????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0033311843872070312 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 23009044, '2025-05-15' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1807564,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.02814316749572754 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= 1807564 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1807564, 'dashboard_run_id': 1817189, 'mtr_portfolio_id': 23008283, 'dashboard_result_id': 10588828, '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_P23008283_15-05-2025_14_47_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23008284, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23008285, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23008286, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23008287, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23008288, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23008289, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23008290, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23008291, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23008292, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23008293, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23008294, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23008295, 'pht': 3726}}"}, {'dashboat_entry_day': 1807564, 'dashboard_run_id': 1817189, 'mtr_portfolio_id': 23008972, 'dashboard_result_id': 10588829, '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_P23008972_15-05-2025_14_49_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23008996, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23008997, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23008998, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23008999, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23009000, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23009001, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23009002, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23009003, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23009004, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23009005, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23009006, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23009007, 'pht': 3726}}"}, {'dashboat_entry_day': 1807564, 'dashboard_run_id': 1817189, 'mtr_portfolio_id': 23009044, 'dashboard_result_id': 10588830, '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_P23009044_15-05-2025_14_54_32.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23009072, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23009073, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23009074, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23009075, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23009076, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23009077, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23009078, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23009079, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23009080, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23009081, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23009082, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23009083, '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 = 23008283 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': 2861559, 'mtr_portfolio_id': 23008283, 'created_at': datetime.datetime(2025, 5, 15, 14, 47), 'result': '0.07580253279821209', 'result_long': None, 'result_double': None}] Qualite : 0.07580253279821209 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23008283 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23008283_15-05-2025_14_47_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23008283 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_P23008283_15-05-2025_14_47_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23008284, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23008285, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23008286, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23008287, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23008288, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23008289, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23008290, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23008291, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23008292, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23008293, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23008294, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23008295, 'pht': 3726}}" where mtr_portfolio_id = 23008283 and dashboard_run_id = 1817190 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`=23008283 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10588828, 0.07580253279821209, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23008283_15-05-2025_14_47_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23008284, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23008285, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23008286, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23008287, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23008288, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23008289, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23008290, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23008291, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23008292, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23008293, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23008294, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23008295, '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 = 23008972 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': 2861704, 'mtr_portfolio_id': 23008972, 'created_at': datetime.datetime(2025, 5, 15, 14, 48, 59), 'result': '0.07046261531923294', 'result_long': None, 'result_double': None}] Qualite : 0.07046261531923294 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23008972 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23008972_15-05-2025_14_49_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23008972 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_P23008972_15-05-2025_14_49_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23008996, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23008997, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23008998, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23008999, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23009000, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23009001, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23009002, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23009003, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23009004, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23009005, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23009006, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23009007, 'pht': 3726}}" where mtr_portfolio_id = 23008972 and dashboard_run_id = 1817190 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`=23008972 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10588829, 0.07046261531923294, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23008972_15-05-2025_14_49_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23008996, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23008997, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23008998, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23008999, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23009000, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23009001, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23009002, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23009003, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23009004, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23009005, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23009006, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23009007, '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 = 23009044 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 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 = 23009044 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 23009044 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 23009044 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 23009044 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23009044 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23009044_15-05-2025_14_57_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23009044 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_P23009044_15-05-2025_14_57_00.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23009072, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23009073, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23009074, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23009075, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23009076, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23009077, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23009078, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23009079, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23009080, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23009081, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23009082, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23009083, 'pht': 3726}}" where mtr_portfolio_id = 23009044 and dashboard_run_id = 1817190 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23008283,23008972,23009044) result : ((1358509930,), (1358509933,), (1358509937,), (1358509978,), (1358509988,), (1358510815,), (1358510817,), (1358510970,), (1358510972,), (1358511028,), (1358511053,), (1358511081,), (1358511105,), (1358511451,), (1358511479,), (1358511507,), (1358511534,), (1358511568,), (1358511637,), (1358511894,), (1358511920,), (1358511946,), (1358511987,), (1358512078,), (1358512189,), (1358512199,), (1358512203,), (1358512476,), (1358512401,), (1358512404,), (1358512407,), (1358512410,), (1358512445,), (1358512594,), (1358512596,), (1358512599,), (1358512635,), (1358512637,), (1358512639,), (1358512641,), (1358512644,), (1358512648,), (1358512685,), (1358512689,), (1358512691,), (1358512693,), (1358512694,), (1358512698,), (1358512730,), (1358512733,), (1358512734,), (1358512765,), (1358512767,), (1358512769,), (1358512782,), (1358512786,), (1358512792,), (1358512812,), (1358512813,), (1358512814,), (1358512817,), (1358512821,), (1358512919,), (1358512961,), (1358512989,), (1358513110,), (1358513178,), (1358513179,), (1358513182,), (1358513185,), (1358513216,), (1358513219,), (1358513222,), (1358513224,), (1358513226,), (1358513348,), (1358513376,), (1358513406,), (1358513438,), (1358513974,), (1358514020,), (1358514053,), (1358514083,), (1358514134,), (1358514444,), (1358514494,), (1358514877,), (1358515016,), (1358515091,), (1358515121,), (1358515173,), (1358515206,), (1358515280,), (1358515283,), (1358515288,), (1358515292,), (1358515624,), (1358515539,), (1358515564,), (1358515585,), (1358515598,), (1358515621,), (1358515668,), (1358515699,), (1358515726,), (1358515755,), (1358515811,), (1358515867,), (1358516175,), (1358516215,), (1358516466,), (1358516507,), (1358516509,), (1358516512,), (1358516518,), (1358516522,), (1358516527,), (1358516574,), (1358516576,), (1358516580,), (1358516583,), (1358516585,), (1358516587,), (1358516678,), (1358516705,), (1358516731,), (1358516759,), (1358517054,), (1358517058,), (1358517061,), (1358517073,), (1358517100,), (1358517129,), (1358517255,), (1358517271,), (1358517307,), (1358517325,), (1358517328,), (1358517366,), (1358517371,), (1358517377,), (1358517381,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'15052025': {'nb_upload': 45, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([23009044]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1358517381, 1358517377, 1358517371, 1358517366, 1358517328, 1358517325, 1358517307, 1358517271, 1358517255] map_info['map_portfolio_photo'] : {23009044: [1358517381, 1358517377, 1358517371, 1358517366, 1358517328, 1358517325, 1358517307, 1358517271, 1358517255, 1358517129, 1358517100, 1358517073, 1358517061, 1358517058, 1358517054, 1358516759, 1358516731, 1358516705, 1358516678, 1358516587, 1358516585, 1358516583, 1358516580, 1358516576, 1358516574, 1358516527, 1358516522, 1358516518, 1358516512, 1358516509, 1358516507, 1358516466, 1358516215, 1358516175, 1358515867, 1358515811, 1358515755, 1358515726, 1358515699, 1358515668, 1358515621, 1358515598, 1358515585, 1358515564, 1358515539]} final : True mtd_id 4302 list_pids : [1358517381, 1358517377, 1358517371, 1358517366, 1358517328, 1358517325, 1358517307, 1358517271, 1358517255] Looping around the photos to save general results len do output : 1 /23009044Didn'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, '2861723') ('4302', '23009044', '1358517381', None, None, None, None, None, '2861723') ('4302', None, None, None, None, None, None, None, '2861723') ('4302', '23009044', '1358517377', None, None, None, None, None, '2861723') ('4302', None, None, None, None, None, None, None, '2861723') ('4302', '23009044', '1358517371', None, None, None, None, None, '2861723') ('4302', None, None, None, None, None, None, None, '2861723') ('4302', '23009044', '1358517366', None, None, None, None, None, '2861723') ('4302', None, None, None, None, None, None, None, '2861723') ('4302', '23009044', '1358517328', None, None, None, None, None, '2861723') ('4302', None, None, None, None, None, None, None, '2861723') ('4302', '23009044', '1358517325', None, None, None, None, None, '2861723') ('4302', None, None, None, None, None, None, None, '2861723') ('4302', '23009044', '1358517307', None, None, None, None, None, '2861723') ('4302', None, None, None, None, None, None, None, '2861723') ('4302', '23009044', '1358517271', None, None, None, None, None, '2861723') ('4302', None, None, None, None, None, None, None, '2861723') ('4302', '23009044', '1358517255', None, None, None, None, None, '2861723') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '23009044', 'None', None, None, None, None, '2861723'), ('4302', '23009044', '1358517381', None, None, None, None, None, '2861723'), ('4302', '23009044', '1358517377', None, None, None, None, None, '2861723'), ('4302', '23009044', '1358517371', None, None, None, None, None, '2861723'), ('4302', '23009044', '1358517366', None, None, None, None, None, '2861723'), ('4302', '23009044', '1358517328', None, None, None, None, None, '2861723'), ('4302', '23009044', '1358517325', None, None, None, None, None, '2861723'), ('4302', '23009044', '1358517307', None, None, None, None, None, '2861723'), ('4302', '23009044', '1358517271', None, None, None, None, None, '2861723'), ('4302', '23009044', '1358517255', None, None, None, None, None, '2861723')] time used for this insertion : 0.027008056640625 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.2918243408203125 time spend to save output : 0.02722334861755371 total time spend for step 5 : 0.3190476894378662 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 (2861723) 2.13user 2.15system 0:06.37elapsed 67%CPU (0avgtext+0avgdata 159968maxresident)k 81488inputs+4976outputs (299major+74822minor)pagefaults 0swaps