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 : 1614268 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 (2691883) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2691883) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21720583 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2691883'] with mtr_portfolio_ids : ['21720583'] and first list_photo_ids : [] new path : /proc/1614268/ Name: python3 Umask: 0002 State: R (running) Tgid: 1614268 Ngid: 0 Pid: 1614268 PPid: 1614267 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1614268 NSpid: 1614268 NSpgid: 1610522 NSsid: 1610522 VmPeak: 1106928 kB VmSize: 1106928 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 97832 kB VmRSS: 97832 kB RssAnon: 59764 kB RssFile: 38068 kB RssShmem: 0 kB VmData: 865676 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 600 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: 104 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1614268', 'Ngid': '0', 'Pid': '1614268', 'PPid': '1614267', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1614268', 'NSpid': '1614268', 'NSpgid': '1610522', 'NSsid': '1610522', 'VmPeak': '1106928 kB', 'VmSize': '1106928 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '97832 kB', 'VmRSS': '97832 kB', 'RssAnon': '59764 kB', 'RssFile': '38068 kB', 'RssShmem': '0 kB', 'VmData': '865676 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '600 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': '104'} ('datou_batch_current', '1614268', '1106928', '0', '1106928', '865676', '97832', b'', 'marlene', '2691883') 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 (21720583) 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 (2691883 ) ) 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 (21720583) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1347435174, 'portfolio_id': 21720583}, {'photo_id': 1347435147, 'portfolio_id': 21720583}, {'photo_id': 1347435125, 'portfolio_id': 21720583}, {'photo_id': 1347435069, 'portfolio_id': 21720583}, {'photo_id': 1347434839, 'portfolio_id': 21720583}, {'photo_id': 1347434814, 'portfolio_id': 21720583}, {'photo_id': 1347434805, 'portfolio_id': 21720583}, {'photo_id': 1347434800, 'portfolio_id': 21720583}, {'photo_id': 1347434797, 'portfolio_id': 21720583}, {'photo_id': 1347434794, 'portfolio_id': 21720583}, {'photo_id': 1347434649, 'portfolio_id': 21720583}, {'photo_id': 1347434644, 'portfolio_id': 21720583}, {'photo_id': 1347434611, 'portfolio_id': 21720583}, {'photo_id': 1347434600, 'portfolio_id': 21720583}, {'photo_id': 1347434595, 'portfolio_id': 21720583}, {'photo_id': 1347434588, 'portfolio_id': 21720583}, {'photo_id': 1347434583, 'portfolio_id': 21720583}, {'photo_id': 1347434578, 'portfolio_id': 21720583}, {'photo_id': 1347434543, 'portfolio_id': 21720583}, {'photo_id': 1347434538, 'portfolio_id': 21720583}, {'photo_id': 1347434534, 'portfolio_id': 21720583}, {'photo_id': 1347434525, 'portfolio_id': 21720583}, {'photo_id': 1347434522, 'portfolio_id': 21720583}, {'photo_id': 1347434517, 'portfolio_id': 21720583}, {'photo_id': 1347434286, 'portfolio_id': 21720583}] map_portfolio_id_photo_id: {21720583: [1347435174, 1347435147, 1347435125, 1347435069, 1347434839, 1347434814, 1347434805, 1347434800, 1347434797, 1347434794, 1347434649, 1347434644, 1347434611, 1347434600, 1347434595, 1347434588, 1347434583, 1347434578, 1347434543, 1347434538, 1347434534, 1347434525, 1347434522, 1347434517, 1347434286]} ##### 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.014403104782104492 #### 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 Wed Mar 26 07:08: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 After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21720583) 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 : 21720583 get user id for portfolio 21720583 get sub ptf for main ptf 21720583, type 3726 and hashtags ['papier', 'Carton_gris', 'environnement', 'metal', 'Carton_brun', 'autre_refus', 'kraft', 'flou', 'plastique', 'mal_croppe', 'Teint_Dans_La_Masse', 'cartonnette'] 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`=21720583 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','Carton_gris','environnement','metal','Carton_brun','autre_refus','kraft','flou','plastique','mal_croppe','Teint_Dans_La_Masse','cartonnette')) 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`=21720583 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','Carton_gris','environnement','metal','Carton_brun','autre_refus','kraft','flou','plastique','mal_croppe','Teint_Dans_La_Masse','cartonnette')) AND mptpi.`min_score`=0.5 To do returned map {'mal_croppe': {'main_port_id': 21720583, 'sub_port_id': 21720584, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14248107, 'last_updated_at': datetime.datetime(2025, 3, 26, 7, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 7, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 7, 6, 57)}, 'Teint_Dans_La_Masse': {'main_port_id': 21720583, 'sub_port_id': 21720585, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14248108, 'last_updated_at': datetime.datetime(2025, 3, 26, 7, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 7, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 7, 6, 57)}, 'Carton_brun': {'main_port_id': 21720583, 'sub_port_id': 21720586, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14248109, 'last_updated_at': datetime.datetime(2025, 3, 26, 7, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 7, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 7, 6, 57)}, 'Carton_gris': {'main_port_id': 21720583, 'sub_port_id': 21720587, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14248110, 'last_updated_at': datetime.datetime(2025, 3, 26, 7, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 7, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 7, 6, 57)}, 'kraft': {'main_port_id': 21720583, 'sub_port_id': 21720588, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14248111, 'last_updated_at': datetime.datetime(2025, 3, 26, 7, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 7, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 7, 6, 57)}, 'flou': {'main_port_id': 21720583, 'sub_port_id': 21720589, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14248112, 'last_updated_at': datetime.datetime(2025, 3, 26, 7, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 7, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 7, 6, 57)}, 'cartonnette': {'main_port_id': 21720583, 'sub_port_id': 21720590, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14248113, 'last_updated_at': datetime.datetime(2025, 3, 26, 7, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 7, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 7, 6, 57)}, 'plastique': {'main_port_id': 21720583, 'sub_port_id': 21720591, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14248114, 'last_updated_at': datetime.datetime(2025, 3, 26, 7, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 7, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 7, 6, 57)}, 'autre_refus': {'main_port_id': 21720583, 'sub_port_id': 21720592, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14248115, 'last_updated_at': datetime.datetime(2025, 3, 26, 7, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 7, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 7, 6, 57)}, 'papier': {'main_port_id': 21720583, 'sub_port_id': 21720593, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14248116, 'last_updated_at': datetime.datetime(2025, 3, 26, 7, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 7, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 7, 6, 57)}, 'environnement': {'main_port_id': 21720583, 'sub_port_id': 21720594, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14248117, 'last_updated_at': datetime.datetime(2025, 3, 26, 7, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 7, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 7, 6, 57)}, 'metal': {'main_port_id': 21720583, 'sub_port_id': 21720595, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14248118, 'last_updated_at': datetime.datetime(2025, 3, 26, 7, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 7, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 7, 6, 57)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21720584 , 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=21720583 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 (21720584) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21720583) result : ((1347434286,), (1347434517,), (1347434522,), (1347434525,), (1347434534,), (1347434538,), (1347434543,), (1347434578,), (1347434583,), (1347434588,), (1347434595,), (1347434600,), (1347434611,), (1347434644,), (1347434649,), (1347434794,), (1347434797,), (1347434800,), (1347434805,), (1347434814,), (1347434839,), (1347435069,), (1347435125,), (1347435147,), (1347435174,)) 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 (1347434800,1347434600) 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 21720585 , 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=21720583 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 (21720585) result : ((1347435229,), (1347435230,), (1347435231,), (1347435232,), (1347435233,), (1347435234,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21720583) result : ((1347434286,), (1347434517,), (1347434522,), (1347434525,), (1347434534,), (1347434538,), (1347434543,), (1347434578,), (1347434583,), (1347434588,), (1347434595,), (1347434600,), (1347434611,), (1347434644,), (1347434649,), (1347434794,), (1347434797,), (1347434800,), (1347434805,), (1347434814,), (1347434839,), (1347435069,), (1347435125,), (1347435147,), (1347435174,)) 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 (1347434800,1347434600) 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 21720586 , 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=21720583 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 (21720586) result : ((1347435222,), (1347435244,), (1347435245,), (1347435246,), (1347435247,), (1347435248,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21720583) result : ((1347434286,), (1347434517,), (1347434522,), (1347434525,), (1347434534,), (1347434538,), (1347434543,), (1347434578,), (1347434583,), (1347434588,), (1347434595,), (1347434600,), (1347434611,), (1347434644,), (1347434649,), (1347434794,), (1347434797,), (1347434800,), (1347434805,), (1347434814,), (1347434839,), (1347435069,), (1347435125,), (1347435147,), (1347435174,)) 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 (1347434800,1347434600) 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 21720587 , 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=21720583 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 (21720587) result : ((1347435235,), (1347435236,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21720583) result : ((1347434286,), (1347434517,), (1347434522,), (1347434525,), (1347434534,), (1347434538,), (1347434543,), (1347434578,), (1347434583,), (1347434588,), (1347434595,), (1347434600,), (1347434611,), (1347434644,), (1347434649,), (1347434794,), (1347434797,), (1347434800,), (1347434805,), (1347434814,), (1347434839,), (1347435069,), (1347435125,), (1347435147,), (1347435174,)) 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 (1347434800,1347434600) 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 21720588 , 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=21720583 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 (21720588) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21720583) result : ((1347434286,), (1347434517,), (1347434522,), (1347434525,), (1347434534,), (1347434538,), (1347434543,), (1347434578,), (1347434583,), (1347434588,), (1347434595,), (1347434600,), (1347434611,), (1347434644,), (1347434649,), (1347434794,), (1347434797,), (1347434800,), (1347434805,), (1347434814,), (1347434839,), (1347435069,), (1347435125,), (1347435147,), (1347435174,)) 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 (1347434800,1347434600) 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 21720589 , 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=21720583 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 (21720589) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21720583) result : ((1347434286,), (1347434517,), (1347434522,), (1347434525,), (1347434534,), (1347434538,), (1347434543,), (1347434578,), (1347434583,), (1347434588,), (1347434595,), (1347434600,), (1347434611,), (1347434644,), (1347434649,), (1347434794,), (1347434797,), (1347434800,), (1347434805,), (1347434814,), (1347434839,), (1347435069,), (1347435125,), (1347435147,), (1347435174,)) 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 (1347434800,1347434600) 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 21720590 , 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=21720583 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 (21720590) result : ((1347435240,), (1347435241,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21720583) result : ((1347434286,), (1347434517,), (1347434522,), (1347434525,), (1347434534,), (1347434538,), (1347434543,), (1347434578,), (1347434583,), (1347434588,), (1347434595,), (1347434600,), (1347434611,), (1347434644,), (1347434649,), (1347434794,), (1347434797,), (1347434800,), (1347434805,), (1347434814,), (1347434839,), (1347435069,), (1347435125,), (1347435147,), (1347435174,)) 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 (1347434800,1347434600) 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 21720591 , 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=21720583 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 (21720591) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21720583) result : ((1347434286,), (1347434517,), (1347434522,), (1347434525,), (1347434534,), (1347434538,), (1347434543,), (1347434578,), (1347434583,), (1347434588,), (1347434595,), (1347434600,), (1347434611,), (1347434644,), (1347434649,), (1347434794,), (1347434797,), (1347434800,), (1347434805,), (1347434814,), (1347434839,), (1347435069,), (1347435125,), (1347435147,), (1347435174,)) 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 (1347434800,1347434600) 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 21720592 , 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=21720583 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 (21720592) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21720583) result : ((1347434286,), (1347434517,), (1347434522,), (1347434525,), (1347434534,), (1347434538,), (1347434543,), (1347434578,), (1347434583,), (1347434588,), (1347434595,), (1347434600,), (1347434611,), (1347434644,), (1347434649,), (1347434794,), (1347434797,), (1347434800,), (1347434805,), (1347434814,), (1347434839,), (1347435069,), (1347435125,), (1347435147,), (1347435174,)) 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 (1347434800,1347434600) 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 21720593 , 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=21720583 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 (21720593) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21720583) result : ((1347434286,), (1347434517,), (1347434522,), (1347434525,), (1347434534,), (1347434538,), (1347434543,), (1347434578,), (1347434583,), (1347434588,), (1347434595,), (1347434600,), (1347434611,), (1347434644,), (1347434649,), (1347434794,), (1347434797,), (1347434800,), (1347434805,), (1347434814,), (1347434839,), (1347435069,), (1347435125,), (1347435147,), (1347435174,)) 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 (1347434800,1347434600) 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 21720594 , 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=21720583 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 (21720594) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21720583) result : ((1347434286,), (1347434517,), (1347434522,), (1347434525,), (1347434534,), (1347434538,), (1347434543,), (1347434578,), (1347434583,), (1347434588,), (1347434595,), (1347434600,), (1347434611,), (1347434644,), (1347434649,), (1347434794,), (1347434797,), (1347434800,), (1347434805,), (1347434814,), (1347434839,), (1347435069,), (1347435125,), (1347435147,), (1347435174,)) 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 (1347434800,1347434600) 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 21720595 , 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=21720583 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 (21720595) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21720583) result : ((1347434286,), (1347434517,), (1347434522,), (1347434525,), (1347434534,), (1347434538,), (1347434543,), (1347434578,), (1347434583,), (1347434588,), (1347434595,), (1347434600,), (1347434611,), (1347434644,), (1347434649,), (1347434794,), (1347434797,), (1347434800,), (1347434805,), (1347434814,), (1347434839,), (1347435069,), (1347435125,), (1347435147,), (1347435174,)) 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 (1347434800,1347434600) 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`=21720583 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','Carton_gris','environnement','metal','Carton_brun','autre_refus','kraft','flou','plastique','mal_croppe','Teint_Dans_La_Masse','cartonnette')) 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`=21720583 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','Carton_gris','environnement','metal','Carton_brun','autre_refus','kraft','flou','plastique','mal_croppe','Teint_Dans_La_Masse','cartonnette')) AND mptpi.`min_score`=0.5 To do returned map {'mal_croppe': {'main_port_id': 21720583, 'sub_port_id': 21720596, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14248119, 'last_updated_at': datetime.datetime(2025, 3, 26, 7, 6, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 7, 6, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 7, 6, 58)}, 'Teint_Dans_La_Masse': {'main_port_id': 21720583, 'sub_port_id': 21720597, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14248120, 'last_updated_at': datetime.datetime(2025, 3, 26, 7, 6, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 7, 6, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 7, 6, 58)}, 'Carton_brun': {'main_port_id': 21720583, 'sub_port_id': 21720598, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14248121, 'last_updated_at': datetime.datetime(2025, 3, 26, 7, 6, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 7, 6, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 7, 6, 58)}, 'Carton_gris': {'main_port_id': 21720583, 'sub_port_id': 21720599, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14248122, 'last_updated_at': datetime.datetime(2025, 3, 26, 7, 6, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 7, 6, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 7, 6, 58)}, 'kraft': {'main_port_id': 21720583, 'sub_port_id': 21720600, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14248123, 'last_updated_at': datetime.datetime(2025, 3, 26, 7, 6, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 7, 6, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 7, 6, 58)}, 'flou': {'main_port_id': 21720583, 'sub_port_id': 21720601, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14248124, 'last_updated_at': datetime.datetime(2025, 3, 26, 7, 6, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 7, 6, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 7, 6, 58)}, 'cartonnette': {'main_port_id': 21720583, 'sub_port_id': 21720602, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14248125, 'last_updated_at': datetime.datetime(2025, 3, 26, 7, 6, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 7, 6, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 7, 6, 58)}, 'plastique': {'main_port_id': 21720583, 'sub_port_id': 21720603, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14248126, 'last_updated_at': datetime.datetime(2025, 3, 26, 7, 6, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 7, 6, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 7, 6, 58)}, 'autre_refus': {'main_port_id': 21720583, 'sub_port_id': 21720604, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14248127, 'last_updated_at': datetime.datetime(2025, 3, 26, 7, 6, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 7, 6, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 7, 6, 58)}, 'papier': {'main_port_id': 21720583, 'sub_port_id': 21720605, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14248128, 'last_updated_at': datetime.datetime(2025, 3, 26, 7, 6, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 7, 6, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 7, 6, 58)}, 'environnement': {'main_port_id': 21720583, 'sub_port_id': 21720606, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14248129, 'last_updated_at': datetime.datetime(2025, 3, 26, 7, 6, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 7, 6, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 7, 6, 58)}, 'metal': {'main_port_id': 21720583, 'sub_port_id': 21720607, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14248130, 'last_updated_at': datetime.datetime(2025, 3, 26, 7, 6, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 7, 6, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 7, 6, 58)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21720596,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21720584 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21720597,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21720585 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21720598,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21720586 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21720599,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21720587 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21720600,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21720588 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21720601,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21720589 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21720602,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21720590 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21720603,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21720591 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21720604,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21720592 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21720605,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21720593 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21720606,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21720594 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21720607,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21720595 lien utilise dans velours : https://www.fotonower.com/velours/21720596,21720597,21720598,21720599,21720600,21720601,21720602,21720603,21720604,21720605,21720606,21720607?tags=mal_croppe,Teint_Dans_La_Masse,Carton_brun,Carton_gris,kraft,flou,cartonnette,plastique,autre_refus,papier,environnement,metal After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21720583]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1347435174, 1347435147, 1347435125, 1347435069] map_info['map_portfolio_photo'] : {21720583: [1347435174, 1347435147, 1347435125, 1347435069, 1347434839, 1347434814, 1347434805, 1347434800, 1347434797, 1347434794, 1347434649, 1347434644, 1347434611, 1347434600, 1347434595, 1347434588, 1347434583, 1347434578, 1347434543, 1347434538, 1347434534, 1347434525, 1347434522, 1347434517, 1347434286]} final : False mtd_id 4302 list_pids : [1347435174, 1347435147, 1347435125, 1347435069] Looping around the photos to save general results len do output : 1 /21720583. 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, '2691883') ('4302', '21720583', '1347435174', None, None, None, None, None, '2691883') ('4302', None, None, None, None, None, None, None, '2691883') ('4302', '21720583', '1347435147', None, None, None, None, None, '2691883') ('4302', None, None, None, None, None, None, None, '2691883') ('4302', '21720583', '1347435125', None, None, None, None, None, '2691883') ('4302', None, None, None, None, None, None, None, '2691883') ('4302', '21720583', '1347435069', None, None, None, None, None, '2691883') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 5 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '21720583', "{'mal_croppe': 21720584, 'Teint_Dans_La_Masse': 21720585, 'Carton_brun': 21720586, 'Carton_gris': 21720587, 'kraft': 21720588, 'flou': 21720589, 'cartonnette': 21720590, 'plastique': 21720591, 'autre_refus': 21720592, 'papier': 21720593, 'environnement': 21720594, 'metal': 21720595}", None, None, None, None, '2691883'), ('4302', '21720583', '1347435174', None, None, None, None, None, '2691883'), ('4302', '21720583', '1347435147', None, None, None, None, None, '2691883'), ('4302', '21720583', '1347435125', None, None, None, None, None, '2691883'), ('4302', '21720583', '1347435069', None, None, None, None, None, '2691883')] time used for this insertion : 0.016759634017944336 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.4984853267669678 time spend to save output : 0.01708984375 total time spend for step 1 : 2.5155751705169678 step2:final Wed Mar 26 07:08:03 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 (21720583) 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 21720583 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1347434286,1347434543,1347434538,1347434534,1347434525,1347434522,1347434517,1347434611,1347434600,1347434595,1347434588,1347434583,1347434578,1347434649,1347434644,1347434839,1347434814,1347434805,1347434800,1347434797,1347434794,1347435174,1347435147,1347435125,1347435069); insert ignore into MTRUser.portfolio_carac_ratio (portfolio_id, hashtag_type, hashtag_id, value) values (%s,%s,%s,%s) on DUPLICATE KEY UPDATE value=VALUES(value) After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21720583]) Inside saveOutput : final : False verbose : True original output for save of step final : {1347435174: ('0.05993362118918428',), 1347435147: ('0.05993362118918428',), 1347435125: ('0.05993362118918428',), 1347435069: ('0.05993362118918428',)} new output for save of step final : {1347435174: ('0.05993362118918428',), 1347435147: ('0.05993362118918428',), 1347435125: ('0.05993362118918428',), 1347435069: ('0.05993362118918428',)} [1347435174, 1347435147, 1347435125, 1347435069] map_info['map_portfolio_photo'] : {21720583: [1347435174, 1347435147, 1347435125, 1347435069, 1347434839, 1347434814, 1347434805, 1347434800, 1347434797, 1347434794, 1347434649, 1347434644, 1347434611, 1347434600, 1347434595, 1347434588, 1347434583, 1347434578, 1347434543, 1347434538, 1347434534, 1347434525, 1347434522, 1347434517, 1347434286]} final : False mtd_id 4302 list_pids : [1347435174, 1347435147, 1347435125, 1347435069] Looping around the photos to save general results len do output : 4 /1347435174.Didn't retrieve data . /1347435147.Didn't retrieve data . /1347435125.Didn't retrieve data . /1347435069.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, '2691883') ('4302', '21720583', '1347435174', None, None, None, None, None, '2691883') ('4302', None, None, None, None, None, None, None, '2691883') ('4302', '21720583', '1347435147', None, None, None, None, None, '2691883') ('4302', None, None, None, None, None, None, None, '2691883') ('4302', '21720583', '1347435125', None, None, None, None, None, '2691883') ('4302', None, None, None, None, None, None, None, '2691883') ('4302', '21720583', '1347435069', None, None, None, None, None, '2691883') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 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', '21720583', '1347435174', '0.05993362118918428', None, None, None, None, '2691883'), ('4302', '21720583', '1347435147', '0.05993362118918428', None, None, None, None, '2691883'), ('4302', '21720583', '1347435125', '0.05993362118918428', None, None, None, None, '2691883'), ('4302', '21720583', '1347435069', '0.05993362118918428', None, None, None, None, '2691883')] time used for this insertion : 0.017696142196655273 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06484389305114746 time spend to save output : 0.01807713508605957 total time spend for step 2 : 0.08292102813720703 step3:velours_tree Wed Mar 26 07:08:03 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 : {21720583: [{'mal_croppe': 21720584, 'Teint_Dans_La_Masse': 21720585, 'Carton_brun': 21720586, 'Carton_gris': 21720587, 'kraft': 21720588, 'flou': 21720589, 'cartonnette': 21720590, 'plastique': 21720591, 'autre_refus': 21720592, 'papier': 21720593, 'environnement': 21720594, 'metal': 21720595}]} input_args_next_step : {21720583: ()} output_args : {21720583: [{'mal_croppe': 21720584, 'Teint_Dans_La_Masse': 21720585, 'Carton_brun': 21720586, 'Carton_gris': 21720587, 'kraft': 21720588, 'flou': 21720589, 'cartonnette': 21720590, 'plastique': 21720591, 'autre_refus': 21720592, 'papier': 21720593, 'environnement': 21720594, 'metal': 21720595}]} args : 21720583 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 : ({'mal_croppe': 21720584, 'Teint_Dans_La_Masse': 21720585, 'Carton_brun': 21720586, 'Carton_gris': 21720587, 'kraft': 21720588, 'flou': 21720589, 'cartonnette': 21720590, 'plastique': 21720591, 'autre_refus': 21720592, 'papier': 21720593, 'environnement': 21720594, 'metal': 21720595},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21720583) 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([21720583]) 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.29854583740234375 time spend to save output : 6.222724914550781e-05 total time spend for step 3 : 0.29860806465148926 step4:send_mail_cod Wed Mar 26 07:08:04 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed 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 : {1347435174: ('0.05993362118918428',), 1347435147: ('0.05993362118918428',), 1347435125: ('0.05993362118918428',), 1347435069: ('0.05993362118918428',)} input_args_next_step : {1347435174: ()} output_args : {1347435174: ('0.05993362118918428',), 1347435147: ('0.05993362118918428',), 1347435125: ('0.05993362118918428',), 1347435069: ('0.05993362118918428',)} args : 1347435174 depend.output_id : 0 input_args_next_step : {1347435174: ('0.05993362118918428',), 1347435147: ()} output_args : {1347435174: ('0.05993362118918428',), 1347435147: ('0.05993362118918428',), 1347435125: ('0.05993362118918428',), 1347435069: ('0.05993362118918428',)} args : 1347435147 depend.output_id : 0 input_args_next_step : {1347435174: ('0.05993362118918428',), 1347435147: ('0.05993362118918428',), 1347435125: ()} output_args : {1347435174: ('0.05993362118918428',), 1347435147: ('0.05993362118918428',), 1347435125: ('0.05993362118918428',), 1347435069: ('0.05993362118918428',)} args : 1347435125 depend.output_id : 0 input_args_next_step : {1347435174: ('0.05993362118918428',), 1347435147: ('0.05993362118918428',), 1347435125: ('0.05993362118918428',), 1347435069: ()} output_args : {1347435174: ('0.05993362118918428',), 1347435147: ('0.05993362118918428',), 1347435125: ('0.05993362118918428',), 1347435069: ('0.05993362118918428',)} args : 1347435069 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 : {21720583: [{'mal_croppe': 21720584, 'Teint_Dans_La_Masse': 21720585, 'Carton_brun': 21720586, 'Carton_gris': 21720587, 'kraft': 21720588, 'flou': 21720589, 'cartonnette': 21720590, 'plastique': 21720591, 'autre_refus': 21720592, 'papier': 21720593, 'environnement': 21720594, 'metal': 21720595}]} input_args_next_step : {1347435174: ('0.05993362118918428',), 1347435147: ('0.05993362118918428',), 1347435125: ('0.05993362118918428',), 1347435069: ('0.05993362118918428',), 21720583: ()} output_args : {21720583: [{'mal_croppe': 21720584, 'Teint_Dans_La_Masse': 21720585, 'Carton_brun': 21720586, 'Carton_gris': 21720587, 'kraft': 21720588, 'flou': 21720589, 'cartonnette': 21720590, 'plastique': 21720591, 'autre_refus': 21720592, 'papier': 21720593, 'environnement': 21720594, 'metal': 21720595}]} args : 21720583 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 :5, first value : ('0.05993362118918428',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21720583) 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 (1347435174,1347435147,1347435125,1347435069) Found this number of photos: 4 ##### Call download_photos : nb_thread : 5 begin to download photo : 1347435069 begin to download photo : 1347435125 begin to download photo : 1347435147 begin to download photo : 1347435174 download finish for photo 1347435069 download finish for photo 1347435147 download finish for photo 1347435125 download finish for photo 1347435174 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette217205841742969284/ imagette217205881742969284/ imagette217205891742969284/ length of list_filenames : 4 ; length of list_pids : 4 ; length of list_args : 4 results_Auto_P21720583_26-03-2025_07_08_04.pdf 21720584 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=21720584 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217205841742969284 21720588 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=21720588 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217205881742969284 21720589 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=21720589 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217205891742969284 21720590 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=21720590 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1347435240: '1742969213_1462991_1347434595_2747b08d4210f623d38266d5c41f1038_rle_crop_3730832441_0.png', 1347435241: '1742969213_1462991_1347434578_e21ac13aa56f9042aa119ff5529b15f4_rle_crop_3730832488_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/ed1ead3b4e095add8aed462fbf3d3149_59092010.png change filename to text .imagette217205901742969284/ imagette217205901742969284/1742969213_1462991_1347434578_e21ac13aa56f9042aa119ff5529b15f4_rle_crop_3730832488_0.png.png imagette217205901742969284/1742969213_1462991_1347434595_2747b08d4210f623d38266d5c41f1038_rle_crop_3730832441_0.png.png imagette217205911742969284/ imagette217205921742969284/ imagette217205951742969284/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/a536a2f2e6e05103c2de591ae83b93b1_70185963.png imagette217205901742969284 21720591 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=21720591 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217205911742969284 21720592 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=21720592 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217205921742969284 21720595 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=21720595 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217205951742969284 21720585 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=21720585 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1347435229: '1742969213_1462991_1347434600_03f5a2346b73b1c469b34fa16b36fb67_rle_crop_3730832429_0.png', 1347435230: '1742969213_1462991_1347434595_2747b08d4210f623d38266d5c41f1038_rle_crop_3730832450_0.png', 1347435231: '1742969213_1462991_1347434588_2170ca047219d9623e913a2a556fccaa_rle_crop_3730832459_0.png', 1347435232: '1742969213_1462991_1347434588_2170ca047219d9623e913a2a556fccaa_rle_crop_3730832460_0.png', 1347435233: '1742969213_1462991_1347434583_0c19a578954c9b03e6f4221ddb979303_rle_crop_3730832473_0.png', 1347435234: '1742969213_1462991_1347434578_e21ac13aa56f9042aa119ff5529b15f4_rle_crop_3730832490_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/8be4634ba94e93b65688c1abb1adfab0_52904962.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/83df062087e5598e6e989cd145a47bbc_41980526.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/0ea4812026eaf9a7a63e6ceb81b90422_22909140.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/a5b2b91af38580a6a2c603e3fdb57597_79906590.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/b8a383682a36f160c38cc5db307369b5_57096381.png change filename to text .imagette217205851742969284/ imagette217205851742969284/1742969213_1462991_1347434588_2170ca047219d9623e913a2a556fccaa_rle_crop_3730832460_0.png.png imagette217205851742969284/1742969213_1462991_1347434600_03f5a2346b73b1c469b34fa16b36fb67_rle_crop_3730832429_0.png.png imagette217205851742969284/1742969213_1462991_1347434583_0c19a578954c9b03e6f4221ddb979303_rle_crop_3730832473_0.png.png imagette217205851742969284/1742969213_1462991_1347434578_e21ac13aa56f9042aa119ff5529b15f4_rle_crop_3730832490_0.png.png imagette217205851742969284/1742969213_1462991_1347434588_2170ca047219d9623e913a2a556fccaa_rle_crop_3730832459_0.png.png imagette217205851742969284/1742969213_1462991_1347434595_2747b08d4210f623d38266d5c41f1038_rle_crop_3730832450_0.png.png wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/5aa8886d61df777c23dcd5239f48a3c4_84548135.png imagette217205851742969284 21720586 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=21720586 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1347435222: '1742969230_1463159_1347434286_34e1979b7ac49aaaac86eab66cd6dda6_rle_crop_3730832505_0.png', 1347435244: '1742969213_1462991_1347434600_03f5a2346b73b1c469b34fa16b36fb67_rle_crop_3730832435_0.png', 1347435245: '1742969213_1462991_1347434600_03f5a2346b73b1c469b34fa16b36fb67_rle_crop_3730832430_0.png', 1347435246: '1742969213_1462991_1347434595_2747b08d4210f623d38266d5c41f1038_rle_crop_3730832443_0.png', 1347435247: '1742969213_1462991_1347434595_2747b08d4210f623d38266d5c41f1038_rle_crop_3730832446_0.png', 1347435248: '1742969213_1462991_1347434578_e21ac13aa56f9042aa119ff5529b15f4_rle_crop_3730832486_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/5e8bd6fdf714a1b25afa2f2dbade2141_8562593.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/737cf61ff5032707dc349865b3c897bf_64868079.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/c3fc8142e431331ba068f37924d9ccff_46907007.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/55e2b0483501ec632080170069ecbf3b_94930241.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/e246f538bb8d5797baf6d99066da85c6_82879215.png change filename to text .imagette217205861742969284/ imagette217205861742969284/1742969213_1462991_1347434578_e21ac13aa56f9042aa119ff5529b15f4_rle_crop_3730832486_0.png.png imagette217205861742969284/1742969230_1463159_1347434286_34e1979b7ac49aaaac86eab66cd6dda6_rle_crop_3730832505_0.png.png imagette217205861742969284/1742969213_1462991_1347434600_03f5a2346b73b1c469b34fa16b36fb67_rle_crop_3730832430_0.png.png imagette217205861742969284/1742969213_1462991_1347434595_2747b08d4210f623d38266d5c41f1038_rle_crop_3730832443_0.png.png imagette217205861742969284/1742969213_1462991_1347434600_03f5a2346b73b1c469b34fa16b36fb67_rle_crop_3730832435_0.png.png imagette217205861742969284/1742969213_1462991_1347434595_2747b08d4210f623d38266d5c41f1038_rle_crop_3730832446_0.png.png wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/f1b17a69b0f9d6e78685e322a64bdfdf_55287343.png imagette217205861742969284 21720587 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=21720587 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1347435235: '1742969213_1462991_1347434578_e21ac13aa56f9042aa119ff5529b15f4_rle_crop_3730832493_0.png', 1347435236: '1742969213_1462991_1347434578_e21ac13aa56f9042aa119ff5529b15f4_rle_crop_3730832482_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/eb1b3b9af967362932ba220cabe14098_50523632.png change filename to text .imagette217205871742969285/ imagette217205871742969285/1742969213_1462991_1347434578_e21ac13aa56f9042aa119ff5529b15f4_rle_crop_3730832482_0.png.png imagette217205871742969285/1742969213_1462991_1347434578_e21ac13aa56f9042aa119ff5529b15f4_rle_crop_3730832493_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/0324ad0e99108db93a391123bb16a87b_93051643.png imagette217205871742969285 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=21720583 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/21720596,21720597,21720598,21720599,21720600,21720601,21720602,21720603,21720604,21720605,21720606,21720607?tags=mal_croppe,Teint_Dans_La_Masse,Carton_brun,Carton_gris,kraft,flou,cartonnette,plastique,autre_refus,papier,environnement,metal your option no_mail is active, we will not send the real mail to your client args[1347435174] : ('0.05993362118918428',) no score found for photo 1347435174 We are sending mail with results at report@fotonower.com args[1347435147] : ('0.05993362118918428',) no score found for photo 1347435147 We are sending mail with results at report@fotonower.com args[1347435125] : ('0.05993362118918428',) no score found for photo 1347435125 We are sending mail with results at report@fotonower.com args[1347435069] : ('0.05993362118918428',) no score found for photo 1347435069 We are sending mail with results at report@fotonower.com refus_total : 0.05993362118918428 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=21720583 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_P21720583_26-03-2025_07_08_04.pdf results_Auto_P21720583_26-03-2025_07_08_04.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21720583_26-03-2025_07_08_04.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','21720583','results_Auto_P21720583_26-03-2025_07_08_04.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21720583_26-03-2025_07_08_04.pdf','pdf','','0.1','0.05993362118918428') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21720583]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1347435174, 1347435147, 1347435125, 1347435069] map_info['map_portfolio_photo'] : {21720583: [1347435174, 1347435147, 1347435125, 1347435069, 1347434839, 1347434814, 1347434805, 1347434800, 1347434797, 1347434794, 1347434649, 1347434644, 1347434611, 1347434600, 1347434595, 1347434588, 1347434583, 1347434578, 1347434543, 1347434538, 1347434534, 1347434525, 1347434522, 1347434517, 1347434286]} final : False mtd_id 4302 list_pids : [1347435174, 1347435147, 1347435125, 1347435069] 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, '2691883') ('4302', '21720583', '1347435174', None, None, None, None, None, '2691883') ('4302', None, None, None, None, None, None, None, '2691883') ('4302', '21720583', '1347435147', None, None, None, None, None, '2691883') ('4302', None, None, None, None, None, None, None, '2691883') ('4302', '21720583', '1347435125', None, None, None, None, None, '2691883') ('4302', None, None, None, None, None, None, None, '2691883') ('4302', '21720583', '1347435069', None, None, None, None, None, '2691883') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 4 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', '21720583', '1347435174', None, None, None, None, None, '2691883'), ('4302', '21720583', '1347435147', None, None, None, None, None, '2691883'), ('4302', '21720583', '1347435125', None, None, None, None, None, '2691883'), ('4302', '21720583', '1347435069', None, None, None, None, None, '2691883')] time used for this insertion : 0.020637035369873047 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.924180507659912 time spend to save output : 0.020894765853881836 total time spend for step 4 : 1.945075273513794 step5:split_time_score Wed Mar 26 07:08:05 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 : ['21720583'] 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 : [('21720583',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21720583) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1347435069: {'path': 'temp/1742969284_1614268_1347435069_343eb313e76acf89530d159cf9aba4e3.jpg', 'extension': 'jpg'}, 1347435147: {'path': 'temp/1742969284_1614268_1347435147_ecbcb2bd77c89372a722ef2221c92f78.jpg', 'extension': 'jpg'}, 1347435125: {'path': 'temp/1742969284_1614268_1347435125_6dd4d8fcdc7799a7edb162d971e84ea1.jpg', 'extension': 'jpg'}, 1347435174: {'path': 'temp/1742969284_1614268_1347435174_0db8827c5a43a8279b107eaf6f4dfc3b.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 = 21720583; (('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 = 21720583 group by h (('07', 25),) 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=21720583 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 (21720583) 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 (21720583) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 26032025 21720583 Nombre de photos uploadées : 25 / 23040 (0%) 26032025 21720583 Nombre de photos taguées (types de déchets): 0 / 25 (0%) 26032025 21720583 Nombre de photos taguées (volume) : 0 / 25 (0%) [{'photo_id': 1347434286, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/34e1979b7ac49aaaac86eab66cd6dda6.jpg', 'username': None, 'uploaded_at': 1742968934, 'text': 'image_26032025_07_00_14_10206.jpg'}, {'photo_id': 1347434543, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/cbb3d71e67c427f39b2c3858f6eb048b.jpg', 'username': None, 'uploaded_at': 1742968994, 'text': 'image_26032025_07_00_24_10141.jpg'}, {'photo_id': 1347434538, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/63f340b0eb95515278c0ded2af651068.jpg', 'username': None, 'uploaded_at': 1742968994, 'text': 'image_26032025_07_01_05_10165.jpg'}, {'photo_id': 1347434534, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/118279ae5344f2e4a82505de33c572a6.jpg', 'username': None, 'uploaded_at': 1742968994, 'text': 'image_26032025_07_01_14_9126.jpg'}] 0 [] elapsed_time : load_data_split_time_score 3.5762786865234375e-06 elapsed_time : order_list_meta_photo_and_scores 8.106231689453125e-06 ????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.001384735107421875 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 21720583, '2025-03-26' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1689284,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.04088544845581055 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= 1689284 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1689284, 'dashboard_run_id': 1697506, 'mtr_portfolio_id': 21719113, 'dashboard_result_id': 9630204, '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_P21719113_26-03-2025_06_34_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21719138, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21719139, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21719140, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21719141, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21719142, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21719143, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21719144, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21719145, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21719146, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21719147, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21719148, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21719149, 'pht': 3726}}"}, {'dashboat_entry_day': 1689284, 'dashboard_run_id': 1697506, 'mtr_portfolio_id': 21719546, 'dashboard_result_id': 9630205, '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_P21719546_26-03-2025_06_48_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21719595, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21719596, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21719597, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21719598, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21719599, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21719600, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21719601, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21719602, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21719603, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21719604, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21719605, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21719606, 'pht': 3726}}"}, {'dashboat_entry_day': 1689284, 'dashboard_run_id': 1697506, 'mtr_portfolio_id': 21720025, 'dashboard_result_id': 9630206, '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_P21720025_26-03-2025_07_04_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 21720026, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21720027, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21720028, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21720029, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21720030, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21720031, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21720032, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21720033, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21720034, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21720035, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21720036, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21720037, 'pht': 3726}}"}, {'dashboat_entry_day': 1689284, 'dashboard_run_id': 1697506, 'mtr_portfolio_id': 21720583, 'dashboard_result_id': 9630207, '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_P21720583_26-03-2025_07_06_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21720584, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21720585, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21720586, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21720587, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21720588, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21720589, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21720590, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21720591, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21720592, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21720593, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21720594, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21720595, '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 = 21719113 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': 2691720, 'mtr_portfolio_id': 21719113, 'created_at': datetime.datetime(2025, 3, 26, 6, 34, 57), 'result': '0.030993241953474745', 'result_long': None, 'result_double': None}] Qualite : 0.030993241953474745 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21719113 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21719113_26-03-2025_06_34_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21719113 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_P21719113_26-03-2025_06_34_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21719138, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21719139, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21719140, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21719141, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21719142, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21719143, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21719144, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21719145, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21719146, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21719147, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21719148, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21719149, 'pht': 3726}}" where mtr_portfolio_id = 21719113 and dashboard_run_id = 1697506 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`=21719113 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9630204, 0.030993241953474745, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21719113_26-03-2025_06_34_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21719138, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21719139, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21719140, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21719141, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21719142, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21719143, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21719144, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21719145, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21719146, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21719147, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21719148, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21719149, '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 = 21719546 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': 2691756, 'mtr_portfolio_id': 21719546, 'created_at': datetime.datetime(2025, 3, 26, 6, 47, 59), 'result': '0.04042865095834226', 'result_long': None, 'result_double': None}] Qualite : 0.04042865095834226 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21719546 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21719546_26-03-2025_06_48_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21719546 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_P21719546_26-03-2025_06_48_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21719595, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21719596, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21719597, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21719598, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21719599, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21719600, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21719601, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21719602, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21719603, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21719604, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21719605, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21719606, 'pht': 3726}}" where mtr_portfolio_id = 21719546 and dashboard_run_id = 1697506 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`=21719546 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9630205, 0.04042865095834226, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21719546_26-03-2025_06_48_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21719595, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21719596, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21719597, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21719598, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21719599, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21719600, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21719601, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21719602, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21719603, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21719604, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21719605, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21719606, '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 = 21720025 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': 2691791, 'mtr_portfolio_id': 21720025, 'created_at': datetime.datetime(2025, 3, 26, 7, 4, 58), 'result': '0.04119960071053704', 'result_long': None, 'result_double': None}] Qualite : 0.04119960071053704 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21720025 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21720025_26-03-2025_07_04_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21720025 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_P21720025_26-03-2025_07_04_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 21720026, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21720027, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21720028, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21720029, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21720030, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21720031, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21720032, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21720033, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21720034, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21720035, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21720036, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21720037, 'pht': 3726}}" where mtr_portfolio_id = 21720025 and dashboard_run_id = 1697506 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`=21720025 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9630206, 0.04119960071053704, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21720025_26-03-2025_07_04_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 21720026, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21720027, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21720028, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21720029, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21720030, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21720031, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21720032, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21720033, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21720034, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21720035, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21720036, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21720037, '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 = 21720583 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': 2691883, 'mtr_portfolio_id': 21720583, 'created_at': datetime.datetime(2025, 3, 26, 7, 8, 3), 'result': '0.05993362118918428', 'result_long': None, 'result_double': None}] Qualite : 0.05993362118918428 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21720583 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21720583_26-03-2025_07_08_04.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21720583 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_P21720583_26-03-2025_07_08_04.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21720584, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21720585, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21720586, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21720587, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21720588, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21720589, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21720590, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21720591, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21720592, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21720593, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21720594, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21720595, 'pht': 3726}}" where mtr_portfolio_id = 21720583 and dashboard_run_id = 1697506 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`=21720583 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9630207, 0.05993362118918428, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21720583_26-03-2025_07_08_04.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21720584, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21720585, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21720586, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21720587, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21720588, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21720589, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21720590, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21720591, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21720592, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21720593, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21720594, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21720595, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21719113,21719546,21720025,21720583) result : ((1347430558,), (1347430562,), (1347430566,), (1347430571,), (1347430574,), (1347430609,), (1347430617,), (1347430626,), (1347430668,), (1347430669,), (1347430670,), (1347430674,), (1347430678,), (1347430684,), (1347430708,), (1347430710,), (1347430712,), (1347430715,), (1347430764,), (1347430766,), (1347430769,), (1347430809,), (1347430812,), (1347430815,), (1347430821,), (1347430864,), (1347430868,), (1347430874,), (1347430877,), (1347430903,), (1347430905,), (1347430907,), (1347430918,), (1347430970,), (1347430973,), (1347430978,), (1347430982,), (1347431010,), (1347431012,), (1347431014,), (1347431018,), (1347431021,), (1347431054,), (1347431056,), (1347431059,), (1347431065,), (1347431070,), (1347431076,), (1347431102,), (1347431105,), (1347431109,), (1347431145,), (1347431148,), (1347431152,), (1347431156,), (1347431159,), (1347431164,), (1347431187,), (1347431190,), (1347431195,), (1347431199,), (1347431201,), (1347431205,), (1347431258,), (1347431261,), (1347431263,), (1347431268,), (1347431327,), (1347431295,), (1347431299,), (1347431306,), (1347431316,), (1347431320,), (1347431352,), (1347431359,), (1347431367,), (1347431373,), (1347431376,), (1347431401,), (1347431404,), (1347431407,), (1347431451,), (1347431461,), (1347431465,), (1347431470,), (1347431475,), (1347431500,), (1347431504,), (1347431508,), (1347431513,), (1347431542,), (1347431546,), (1347431548,), (1347431554,), (1347431561,), (1347431564,), (1347431584,), (1347431587,), (1347431590,), (1347431595,), (1347431601,), (1347431606,), (1347431635,), (1347431646,), (1347431683,), (1347431686,), (1347431689,), (1347431696,), (1347431702,), (1347431721,), (1347431759,), (1347431763,), (1347431778,), (1347431791,), (1347431814,), (1347431816,), (1347431821,), (1347431828,), (1347431833,), (1347431838,), (1347431862,), (1347431867,), (1347431870,), (1347431876,), (1347431911,), (1347431913,), (1347431915,), (1347431920,), (1347431923,), (1347431928,), (1347431970,), (1347431974,), (1347431978,), (1347431986,), (1347431992,), (1347432016,), (1347432019,), (1347432023,), (1347432094,), (1347432072,), (1347432075,), (1347432079,), (1347432086,), (1347432089,), (1347432115,), (1347432119,), (1347432123,), (1347432129,), (1347432173,), (1347432176,), (1347432178,), (1347432187,), (1347432212,), (1347432225,), (1347432248,), (1347432252,), (1347432451,), (1347432454,), (1347432500,), (1347432503,), (1347432506,), (1347432514,), (1347432549,), (1347432554,), (1347432559,), (1347432565,), (1347432569,), (1347432611,), (1347432615,), (1347432617,), (1347432779,), (1347432805,), (1347432834,), (1347432863,), (1347432894,), (1347432926,), (1347433395,), (1347433444,), (1347433496,), (1347433524,), (1347433547,), (1347434070,), (1347434093,), (1347434095,), (1347434105,), (1347434117,), (1347434311,), (1347434286,), (1347434517,), (1347434522,), (1347434525,), (1347434534,), (1347434538,), (1347434543,), (1347434578,), (1347434583,), (1347434588,), (1347434595,), (1347434600,), (1347434611,), (1347434644,), (1347434649,), (1347434794,), (1347434797,), (1347434800,), (1347434805,), (1347434814,), (1347434839,), (1347435069,), (1347435125,), (1347435147,), (1347435174,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'26032025': {'nb_upload': 25, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21720583]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1347435174, 1347435147, 1347435125, 1347435069] map_info['map_portfolio_photo'] : {21720583: [1347435174, 1347435147, 1347435125, 1347435069, 1347434839, 1347434814, 1347434805, 1347434800, 1347434797, 1347434794, 1347434649, 1347434644, 1347434611, 1347434600, 1347434595, 1347434588, 1347434583, 1347434578, 1347434543, 1347434538, 1347434534, 1347434525, 1347434522, 1347434517, 1347434286]} final : True mtd_id 4302 list_pids : [1347435174, 1347435147, 1347435125, 1347435069] Looping around the photos to save general results len do output : 1 /21720583Didn'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, '2691883') ('4302', '21720583', '1347435174', None, None, None, None, None, '2691883') ('4302', None, None, None, None, None, None, None, '2691883') ('4302', '21720583', '1347435147', None, None, None, None, None, '2691883') ('4302', None, None, None, None, None, None, None, '2691883') ('4302', '21720583', '1347435125', None, None, None, None, None, '2691883') ('4302', None, None, None, None, None, None, None, '2691883') ('4302', '21720583', '1347435069', None, None, None, None, None, '2691883') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 5 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '21720583', 'None', None, None, None, None, '2691883'), ('4302', '21720583', '1347435174', None, None, None, None, None, '2691883'), ('4302', '21720583', '1347435147', None, None, None, None, None, '2691883'), ('4302', '21720583', '1347435125', None, None, None, None, None, '2691883'), ('4302', '21720583', '1347435069', None, None, None, None, None, '2691883')] time used for this insertion : 0.018384456634521484 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.47344446182250977 time spend to save output : 0.018563270568847656 total time spend for step 5 : 0.4920077323913574 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 (2691883) 1.84user 2.36system 0:11.90elapsed 35%CPU (0avgtext+0avgdata 157468maxresident)k 64inputs+4320outputs (11major+63705minor)pagefaults 0swaps