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 : 1553162 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 (2603397) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2603397) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20715400 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2603397'] with mtr_portfolio_ids : ['20715400'] and first list_photo_ids : [] new path : /proc/1553162/ Name: python3 Umask: 0002 State: R (running) Tgid: 1553162 Ngid: 0 Pid: 1553162 PPid: 1553161 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1553162 NSpid: 1553162 NSpgid: 1547440 NSsid: 1547440 VmPeak: 1106832 kB VmSize: 1106832 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99304 kB VmRSS: 99304 kB RssAnon: 59804 kB RssFile: 39500 kB RssShmem: 0 kB VmData: 865580 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 612 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 3/63054 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 59 nonvoluntary_ctxt_switches: 327 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1553162', 'Ngid': '0', 'Pid': '1553162', 'PPid': '1553161', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1553162', 'NSpid': '1553162', 'NSpgid': '1547440', 'NSsid': '1547440', 'VmPeak': '1106832 kB', 'VmSize': '1106832 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99304 kB', 'VmRSS': '99304 kB', 'RssAnon': '59804 kB', 'RssFile': '39500 kB', 'RssShmem': '0 kB', 'VmData': '865580 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '612 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '3/63054', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '59', 'nonvoluntary_ctxt_switches': '327'} ('datou_batch_current', '1553162', '1106832', '0', '1106832', '865580', '99304', b'', 'marlene', '2603397') 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 (20715400) 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 (2603397 ) ) 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 (20715400) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1338766922, 'portfolio_id': 20715400}, {'photo_id': 1338766918, 'portfolio_id': 20715400}, {'photo_id': 1338766910, 'portfolio_id': 20715400}, {'photo_id': 1338766901, 'portfolio_id': 20715400}, {'photo_id': 1338766894, 'portfolio_id': 20715400}, {'photo_id': 1338766876, 'portfolio_id': 20715400}, {'photo_id': 1338766865, 'portfolio_id': 20715400}, {'photo_id': 1338766855, 'portfolio_id': 20715400}, {'photo_id': 1338766852, 'portfolio_id': 20715400}, {'photo_id': 1338766849, 'portfolio_id': 20715400}, {'photo_id': 1338766845, 'portfolio_id': 20715400}, {'photo_id': 1338766805, 'portfolio_id': 20715400}, {'photo_id': 1338766800, 'portfolio_id': 20715400}, {'photo_id': 1338766797, 'portfolio_id': 20715400}, {'photo_id': 1338766792, 'portfolio_id': 20715400}, {'photo_id': 1338766759, 'portfolio_id': 20715400}, {'photo_id': 1338766757, 'portfolio_id': 20715400}, {'photo_id': 1338766634, 'portfolio_id': 20715400}, {'photo_id': 1338766631, 'portfolio_id': 20715400}, {'photo_id': 1338766628, 'portfolio_id': 20715400}, {'photo_id': 1338766625, 'portfolio_id': 20715400}, {'photo_id': 1338766594, 'portfolio_id': 20715400}, {'photo_id': 1338766591, 'portfolio_id': 20715400}, {'photo_id': 1338766589, 'portfolio_id': 20715400}] map_portfolio_id_photo_id: {20715400: [1338766922, 1338766918, 1338766910, 1338766901, 1338766894, 1338766876, 1338766865, 1338766855, 1338766852, 1338766849, 1338766845, 1338766805, 1338766800, 1338766797, 1338766792, 1338766759, 1338766757, 1338766634, 1338766631, 1338766628, 1338766625, 1338766594, 1338766591, 1338766589]} ##### 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.026173114776611328 #### 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 Fri Feb 21 07:36:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20715400) 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 : 20715400 get user id for portfolio 20715400 get sub ptf for main ptf 20715400, type 3726 and hashtags ['flou', 'Carton_gris', 'plastique', 'metal', 'Carton_brun', 'kraft', 'environnement', 'papier', 'mal_croppe', 'cartonnette', 'autre_refus', 'Teint_Dans_La_Masse'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=20715400 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','Carton_gris','plastique','metal','Carton_brun','kraft','environnement','papier','mal_croppe','cartonnette','autre_refus','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=20715400 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','Carton_gris','plastique','metal','Carton_brun','kraft','environnement','papier','mal_croppe','cartonnette','autre_refus','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'metal': {'main_port_id': 20715400, 'sub_port_id': 20715429, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13362242, 'last_updated_at': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 7, 34, 57)}, 'environnement': {'main_port_id': 20715400, 'sub_port_id': 20715430, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13362243, 'last_updated_at': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 7, 34, 57)}, 'flou': {'main_port_id': 20715400, 'sub_port_id': 20715431, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13362244, 'last_updated_at': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 7, 34, 57)}, 'plastique': {'main_port_id': 20715400, 'sub_port_id': 20715432, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13362245, 'last_updated_at': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 7, 34, 57)}, 'Carton_brun': {'main_port_id': 20715400, 'sub_port_id': 20715433, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13362246, 'last_updated_at': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 7, 34, 57)}, 'autre_refus': {'main_port_id': 20715400, 'sub_port_id': 20715434, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13362247, 'last_updated_at': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 7, 34, 57)}, 'Teint_Dans_La_Masse': {'main_port_id': 20715400, 'sub_port_id': 20715435, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13362248, 'last_updated_at': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 7, 34, 57)}, 'mal_croppe': {'main_port_id': 20715400, 'sub_port_id': 20715436, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13362249, 'last_updated_at': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 7, 34, 57)}, 'Carton_gris': {'main_port_id': 20715400, 'sub_port_id': 20715437, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13362250, 'last_updated_at': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 7, 34, 57)}, 'cartonnette': {'main_port_id': 20715400, 'sub_port_id': 20715438, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13362251, 'last_updated_at': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 7, 34, 57)}, 'kraft': {'main_port_id': 20715400, 'sub_port_id': 20715439, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13362252, 'last_updated_at': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 7, 34, 57)}, 'papier': {'main_port_id': 20715400, 'sub_port_id': 20715440, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13362253, 'last_updated_at': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 7, 34, 57)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20715429 , 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=20715400 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 (20715429) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20715400) result : ((1338766589,), (1338766591,), (1338766594,), (1338766625,), (1338766628,), (1338766631,), (1338766634,), (1338766757,), (1338766759,), (1338766792,), (1338766797,), (1338766800,), (1338766805,), (1338766845,), (1338766849,), (1338766852,), (1338766855,), (1338766865,), (1338766876,), (1338766894,), (1338766901,), (1338766910,), (1338766918,), (1338766922,)) 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 (1338766800) 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 20715430 , 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=20715400 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 (20715430) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20715400) result : ((1338766589,), (1338766591,), (1338766594,), (1338766625,), (1338766628,), (1338766631,), (1338766634,), (1338766757,), (1338766759,), (1338766792,), (1338766797,), (1338766800,), (1338766805,), (1338766845,), (1338766849,), (1338766852,), (1338766855,), (1338766865,), (1338766876,), (1338766894,), (1338766901,), (1338766910,), (1338766918,), (1338766922,)) 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 (1338766800) 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 20715431 , 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=20715400 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 (20715431) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20715400) result : ((1338766589,), (1338766591,), (1338766594,), (1338766625,), (1338766628,), (1338766631,), (1338766634,), (1338766757,), (1338766759,), (1338766792,), (1338766797,), (1338766800,), (1338766805,), (1338766845,), (1338766849,), (1338766852,), (1338766855,), (1338766865,), (1338766876,), (1338766894,), (1338766901,), (1338766910,), (1338766918,), (1338766922,)) 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 (1338766800) 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 20715432 , 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=20715400 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 (20715432) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20715400) result : ((1338766589,), (1338766591,), (1338766594,), (1338766625,), (1338766628,), (1338766631,), (1338766634,), (1338766757,), (1338766759,), (1338766792,), (1338766797,), (1338766800,), (1338766805,), (1338766845,), (1338766849,), (1338766852,), (1338766855,), (1338766865,), (1338766876,), (1338766894,), (1338766901,), (1338766910,), (1338766918,), (1338766922,)) 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 (1338766800) 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 20715433 , 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=20715400 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 (20715433) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20715400) result : ((1338766589,), (1338766591,), (1338766594,), (1338766625,), (1338766628,), (1338766631,), (1338766634,), (1338766757,), (1338766759,), (1338766792,), (1338766797,), (1338766800,), (1338766805,), (1338766845,), (1338766849,), (1338766852,), (1338766855,), (1338766865,), (1338766876,), (1338766894,), (1338766901,), (1338766910,), (1338766918,), (1338766922,)) 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 (1338766800) 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 20715434 , 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=20715400 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 (20715434) result : ((1338766856,), (1338766857,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20715400) result : ((1338766589,), (1338766591,), (1338766594,), (1338766625,), (1338766628,), (1338766631,), (1338766634,), (1338766757,), (1338766759,), (1338766792,), (1338766797,), (1338766800,), (1338766805,), (1338766845,), (1338766849,), (1338766852,), (1338766855,), (1338766865,), (1338766876,), (1338766894,), (1338766901,), (1338766910,), (1338766918,), (1338766922,)) 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 (1338766800) 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 20715435 , 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=20715400 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 (20715435) result : ((1338766854,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20715400) result : ((1338766589,), (1338766591,), (1338766594,), (1338766625,), (1338766628,), (1338766631,), (1338766634,), (1338766757,), (1338766759,), (1338766792,), (1338766797,), (1338766800,), (1338766805,), (1338766845,), (1338766849,), (1338766852,), (1338766855,), (1338766865,), (1338766876,), (1338766894,), (1338766901,), (1338766910,), (1338766918,), (1338766922,)) 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 (1338766800) 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 20715436 , 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=20715400 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 (20715436) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20715400) result : ((1338766589,), (1338766591,), (1338766594,), (1338766625,), (1338766628,), (1338766631,), (1338766634,), (1338766757,), (1338766759,), (1338766792,), (1338766797,), (1338766800,), (1338766805,), (1338766845,), (1338766849,), (1338766852,), (1338766855,), (1338766865,), (1338766876,), (1338766894,), (1338766901,), (1338766910,), (1338766918,), (1338766922,)) 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 (1338766800) 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 20715437 , 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=20715400 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 (20715437) result : ((1338766858,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20715400) result : ((1338766589,), (1338766591,), (1338766594,), (1338766625,), (1338766628,), (1338766631,), (1338766634,), (1338766757,), (1338766759,), (1338766792,), (1338766797,), (1338766800,), (1338766805,), (1338766845,), (1338766849,), (1338766852,), (1338766855,), (1338766865,), (1338766876,), (1338766894,), (1338766901,), (1338766910,), (1338766918,), (1338766922,)) 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 (1338766800) 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 20715438 , 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=20715400 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 (20715438) result : ((1338766862,), (1338766863,), (1338766864,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20715400) result : ((1338766589,), (1338766591,), (1338766594,), (1338766625,), (1338766628,), (1338766631,), (1338766634,), (1338766757,), (1338766759,), (1338766792,), (1338766797,), (1338766800,), (1338766805,), (1338766845,), (1338766849,), (1338766852,), (1338766855,), (1338766865,), (1338766876,), (1338766894,), (1338766901,), (1338766910,), (1338766918,), (1338766922,)) 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 (1338766800) 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 20715439 , 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=20715400 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 (20715439) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20715400) result : ((1338766589,), (1338766591,), (1338766594,), (1338766625,), (1338766628,), (1338766631,), (1338766634,), (1338766757,), (1338766759,), (1338766792,), (1338766797,), (1338766800,), (1338766805,), (1338766845,), (1338766849,), (1338766852,), (1338766855,), (1338766865,), (1338766876,), (1338766894,), (1338766901,), (1338766910,), (1338766918,), (1338766922,)) 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 (1338766800) 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 20715440 , 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=20715400 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 (20715440) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20715400) result : ((1338766589,), (1338766591,), (1338766594,), (1338766625,), (1338766628,), (1338766631,), (1338766634,), (1338766757,), (1338766759,), (1338766792,), (1338766797,), (1338766800,), (1338766805,), (1338766845,), (1338766849,), (1338766852,), (1338766855,), (1338766865,), (1338766876,), (1338766894,), (1338766901,), (1338766910,), (1338766918,), (1338766922,)) 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 (1338766800) 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`=20715400 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','Carton_gris','plastique','metal','Carton_brun','kraft','environnement','papier','mal_croppe','cartonnette','autre_refus','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=20715400 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','Carton_gris','plastique','metal','Carton_brun','kraft','environnement','papier','mal_croppe','cartonnette','autre_refus','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'metal': {'main_port_id': 20715400, 'sub_port_id': 20715441, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13362254, 'last_updated_at': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 7, 34, 58)}, 'environnement': {'main_port_id': 20715400, 'sub_port_id': 20715442, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13362255, 'last_updated_at': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 7, 34, 58)}, 'flou': {'main_port_id': 20715400, 'sub_port_id': 20715443, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13362256, 'last_updated_at': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 7, 34, 58)}, 'plastique': {'main_port_id': 20715400, 'sub_port_id': 20715444, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13362257, 'last_updated_at': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 7, 34, 58)}, 'Carton_brun': {'main_port_id': 20715400, 'sub_port_id': 20715445, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13362258, 'last_updated_at': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 7, 34, 58)}, 'autre_refus': {'main_port_id': 20715400, 'sub_port_id': 20715446, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13362259, 'last_updated_at': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 7, 34, 58)}, 'Teint_Dans_La_Masse': {'main_port_id': 20715400, 'sub_port_id': 20715447, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13362260, 'last_updated_at': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 7, 34, 58)}, 'mal_croppe': {'main_port_id': 20715400, 'sub_port_id': 20715448, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13362261, 'last_updated_at': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 7, 34, 58)}, 'Carton_gris': {'main_port_id': 20715400, 'sub_port_id': 20715449, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13362262, 'last_updated_at': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 7, 34, 58)}, 'cartonnette': {'main_port_id': 20715400, 'sub_port_id': 20715450, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13362263, 'last_updated_at': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 7, 34, 58)}, 'kraft': {'main_port_id': 20715400, 'sub_port_id': 20715451, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13362264, 'last_updated_at': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 7, 34, 58)}, 'papier': {'main_port_id': 20715400, 'sub_port_id': 20715452, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13362265, 'last_updated_at': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 7, 34, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 7, 34, 58)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20715441,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20715429 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20715442,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20715430 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20715443,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20715431 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20715444,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20715432 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20715445,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20715433 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20715446,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20715434 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20715447,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20715435 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20715448,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20715436 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20715449,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20715437 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20715450,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20715438 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20715451,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20715439 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20715452,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20715440 lien utilise dans velours : https://www.fotonower.com/velours/20715441,20715442,20715443,20715444,20715445,20715446,20715447,20715448,20715449,20715450,20715451,20715452?tags=metal,environnement,flou,plastique,Carton_brun,autre_refus,Teint_Dans_La_Masse,mal_croppe,Carton_gris,cartonnette,kraft,papier After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20715400]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1338766922, 1338766918, 1338766910, 1338766901, 1338766894, 1338766876, 1338766865, 1338766855, 1338766852, 1338766849, 1338766845] map_info['map_portfolio_photo'] : {20715400: [1338766922, 1338766918, 1338766910, 1338766901, 1338766894, 1338766876, 1338766865, 1338766855, 1338766852, 1338766849, 1338766845, 1338766805, 1338766800, 1338766797, 1338766792, 1338766759, 1338766757, 1338766634, 1338766631, 1338766628, 1338766625, 1338766594, 1338766591, 1338766589]} final : False mtd_id 4302 list_pids : [1338766922, 1338766918, 1338766910, 1338766901, 1338766894, 1338766876, 1338766865, 1338766855, 1338766852, 1338766849, 1338766845] Looping around the photos to save general results len do output : 1 /20715400. 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, '2603397') ('4302', '20715400', '1338766922', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766918', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766910', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766901', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766894', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766876', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766865', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766855', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766852', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766849', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766845', None, None, None, None, None, '2603397') 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', None, '20715400', "{'metal': 20715429, 'environnement': 20715430, 'flou': 20715431, 'plastique': 20715432, 'Carton_brun': 20715433, 'autre_refus': 20715434, 'Teint_Dans_La_Masse': 20715435, 'mal_croppe': 20715436, 'Carton_gris': 20715437, 'cartonnette': 20715438, 'kraft': 20715439, 'papier': 20715440}", None, None, None, None, '2603397'), ('4302', '20715400', '1338766922', None, None, None, None, None, '2603397'), ('4302', '20715400', '1338766918', None, None, None, None, None, '2603397'), ('4302', '20715400', '1338766910', None, None, None, None, None, '2603397'), ('4302', '20715400', '1338766901', None, None, None, None, None, '2603397'), ('4302', '20715400', '1338766894', None, None, None, None, None, '2603397'), ('4302', '20715400', '1338766876', None, None, None, None, None, '2603397'), ('4302', '20715400', '1338766865', None, None, None, None, None, '2603397'), ('4302', '20715400', '1338766855', None, None, None, None, None, '2603397'), ('4302', '20715400', '1338766852', None, None, None, None, None, '2603397'), ('4302', '20715400', '1338766849', None, None, None, None, None, '2603397'), ('4302', '20715400', '1338766845', None, None, None, None, None, '2603397')] time used for this insertion : 0.015289545059204102 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.48366403579711914 time spend to save output : 0.015618562698364258 total time spend for step 1 : 0.4992825984954834 step2:final Fri Feb 21 07:36:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 (20715400) 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 20715400 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1338766594,1338766591,1338766589,1338766759,1338766757,1338766634,1338766631,1338766628,1338766625,1338766805,1338766800,1338766797,1338766792,1338766876,1338766865,1338766855,1338766852,1338766849,1338766845,1338766922,1338766918,1338766910,1338766901,1338766894); 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([20715400]) Inside saveOutput : final : False verbose : True original output for save of step final : {1338766922: ('0.09549364344514953',), 1338766918: ('0.09549364344514953',), 1338766910: ('0.09549364344514953',), 1338766901: ('0.09549364344514953',), 1338766894: ('0.09549364344514953',), 1338766876: ('0.09549364344514953',), 1338766865: ('0.09549364344514953',), 1338766855: ('0.09549364344514953',), 1338766852: ('0.09549364344514953',), 1338766849: ('0.09549364344514953',), 1338766845: ('0.09549364344514953',)} new output for save of step final : {1338766922: ('0.09549364344514953',), 1338766918: ('0.09549364344514953',), 1338766910: ('0.09549364344514953',), 1338766901: ('0.09549364344514953',), 1338766894: ('0.09549364344514953',), 1338766876: ('0.09549364344514953',), 1338766865: ('0.09549364344514953',), 1338766855: ('0.09549364344514953',), 1338766852: ('0.09549364344514953',), 1338766849: ('0.09549364344514953',), 1338766845: ('0.09549364344514953',)} [1338766922, 1338766918, 1338766910, 1338766901, 1338766894, 1338766876, 1338766865, 1338766855, 1338766852, 1338766849, 1338766845] map_info['map_portfolio_photo'] : {20715400: [1338766922, 1338766918, 1338766910, 1338766901, 1338766894, 1338766876, 1338766865, 1338766855, 1338766852, 1338766849, 1338766845, 1338766805, 1338766800, 1338766797, 1338766792, 1338766759, 1338766757, 1338766634, 1338766631, 1338766628, 1338766625, 1338766594, 1338766591, 1338766589]} final : False mtd_id 4302 list_pids : [1338766922, 1338766918, 1338766910, 1338766901, 1338766894, 1338766876, 1338766865, 1338766855, 1338766852, 1338766849, 1338766845] Looping around the photos to save general results len do output : 11 /1338766922.Didn't retrieve data . /1338766918.Didn't retrieve data . /1338766910.Didn't retrieve data . /1338766901.Didn't retrieve data . /1338766894.Didn't retrieve data . /1338766876.Didn't retrieve data . /1338766865.Didn't retrieve data . /1338766855.Didn't retrieve data . /1338766852.Didn't retrieve data . /1338766849.Didn't retrieve data . /1338766845.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, '2603397') ('4302', '20715400', '1338766922', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766918', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766910', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766901', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766894', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766876', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766865', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766855', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766852', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766849', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766845', None, None, None, None, None, '2603397') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 33 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', '20715400', '1338766922', '0.09549364344514953', None, None, None, None, '2603397'), ('4302', '20715400', '1338766918', '0.09549364344514953', None, None, None, None, '2603397'), ('4302', '20715400', '1338766910', '0.09549364344514953', None, None, None, None, '2603397'), ('4302', '20715400', '1338766901', '0.09549364344514953', None, None, None, None, '2603397'), ('4302', '20715400', '1338766894', '0.09549364344514953', None, None, None, None, '2603397'), ('4302', '20715400', '1338766876', '0.09549364344514953', None, None, None, None, '2603397'), ('4302', '20715400', '1338766865', '0.09549364344514953', None, None, None, None, '2603397'), ('4302', '20715400', '1338766855', '0.09549364344514953', None, None, None, None, '2603397'), ('4302', '20715400', '1338766852', '0.09549364344514953', None, None, None, None, '2603397'), ('4302', '20715400', '1338766849', '0.09549364344514953', None, None, None, None, '2603397'), ('4302', '20715400', '1338766845', '0.09549364344514953', None, None, None, None, '2603397')] time used for this insertion : 0.014040708541870117 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.0644536018371582 time spend to save output : 0.014536142349243164 total time spend for step 2 : 0.07898974418640137 step3:velours_tree Fri Feb 21 07:36:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 : {20715400: [{'metal': 20715429, 'environnement': 20715430, 'flou': 20715431, 'plastique': 20715432, 'Carton_brun': 20715433, 'autre_refus': 20715434, 'Teint_Dans_La_Masse': 20715435, 'mal_croppe': 20715436, 'Carton_gris': 20715437, 'cartonnette': 20715438, 'kraft': 20715439, 'papier': 20715440}]} input_args_next_step : {20715400: ()} output_args : {20715400: [{'metal': 20715429, 'environnement': 20715430, 'flou': 20715431, 'plastique': 20715432, 'Carton_brun': 20715433, 'autre_refus': 20715434, 'Teint_Dans_La_Masse': 20715435, 'mal_croppe': 20715436, 'Carton_gris': 20715437, 'cartonnette': 20715438, 'kraft': 20715439, 'papier': 20715440}]} args : 20715400 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'metal': 20715429, 'environnement': 20715430, 'flou': 20715431, 'plastique': 20715432, 'Carton_brun': 20715433, 'autre_refus': 20715434, 'Teint_Dans_La_Masse': 20715435, 'mal_croppe': 20715436, 'Carton_gris': 20715437, 'cartonnette': 20715438, 'kraft': 20715439, 'papier': 20715440},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20715400) 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([20715400]) 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.507929801940918 time spend to save output : 4.124641418457031e-05 total time spend for step 3 : 0.5079710483551025 step4:send_mail_cod Fri Feb 21 07:36:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 : {1338766922: ('0.09549364344514953',), 1338766918: ('0.09549364344514953',), 1338766910: ('0.09549364344514953',), 1338766901: ('0.09549364344514953',), 1338766894: ('0.09549364344514953',), 1338766876: ('0.09549364344514953',), 1338766865: ('0.09549364344514953',), 1338766855: ('0.09549364344514953',), 1338766852: ('0.09549364344514953',), 1338766849: ('0.09549364344514953',), 1338766845: ('0.09549364344514953',)} input_args_next_step : {1338766922: ()} output_args : {1338766922: ('0.09549364344514953',), 1338766918: ('0.09549364344514953',), 1338766910: ('0.09549364344514953',), 1338766901: ('0.09549364344514953',), 1338766894: ('0.09549364344514953',), 1338766876: ('0.09549364344514953',), 1338766865: ('0.09549364344514953',), 1338766855: ('0.09549364344514953',), 1338766852: ('0.09549364344514953',), 1338766849: ('0.09549364344514953',), 1338766845: ('0.09549364344514953',)} args : 1338766922 depend.output_id : 0 input_args_next_step : {1338766922: ('0.09549364344514953',), 1338766918: ()} output_args : {1338766922: ('0.09549364344514953',), 1338766918: ('0.09549364344514953',), 1338766910: ('0.09549364344514953',), 1338766901: ('0.09549364344514953',), 1338766894: ('0.09549364344514953',), 1338766876: ('0.09549364344514953',), 1338766865: ('0.09549364344514953',), 1338766855: ('0.09549364344514953',), 1338766852: ('0.09549364344514953',), 1338766849: ('0.09549364344514953',), 1338766845: ('0.09549364344514953',)} args : 1338766918 depend.output_id : 0 input_args_next_step : {1338766922: ('0.09549364344514953',), 1338766918: ('0.09549364344514953',), 1338766910: ()} output_args : {1338766922: ('0.09549364344514953',), 1338766918: ('0.09549364344514953',), 1338766910: ('0.09549364344514953',), 1338766901: ('0.09549364344514953',), 1338766894: ('0.09549364344514953',), 1338766876: ('0.09549364344514953',), 1338766865: ('0.09549364344514953',), 1338766855: ('0.09549364344514953',), 1338766852: ('0.09549364344514953',), 1338766849: ('0.09549364344514953',), 1338766845: ('0.09549364344514953',)} args : 1338766910 depend.output_id : 0 input_args_next_step : {1338766922: ('0.09549364344514953',), 1338766918: ('0.09549364344514953',), 1338766910: ('0.09549364344514953',), 1338766901: ()} output_args : {1338766922: ('0.09549364344514953',), 1338766918: ('0.09549364344514953',), 1338766910: ('0.09549364344514953',), 1338766901: ('0.09549364344514953',), 1338766894: ('0.09549364344514953',), 1338766876: ('0.09549364344514953',), 1338766865: ('0.09549364344514953',), 1338766855: ('0.09549364344514953',), 1338766852: ('0.09549364344514953',), 1338766849: ('0.09549364344514953',), 1338766845: ('0.09549364344514953',)} args : 1338766901 depend.output_id : 0 input_args_next_step : {1338766922: ('0.09549364344514953',), 1338766918: ('0.09549364344514953',), 1338766910: ('0.09549364344514953',), 1338766901: ('0.09549364344514953',), 1338766894: ()} output_args : {1338766922: ('0.09549364344514953',), 1338766918: ('0.09549364344514953',), 1338766910: ('0.09549364344514953',), 1338766901: ('0.09549364344514953',), 1338766894: ('0.09549364344514953',), 1338766876: ('0.09549364344514953',), 1338766865: ('0.09549364344514953',), 1338766855: ('0.09549364344514953',), 1338766852: ('0.09549364344514953',), 1338766849: ('0.09549364344514953',), 1338766845: ('0.09549364344514953',)} args : 1338766894 depend.output_id : 0 input_args_next_step : {1338766922: ('0.09549364344514953',), 1338766918: ('0.09549364344514953',), 1338766910: ('0.09549364344514953',), 1338766901: ('0.09549364344514953',), 1338766894: ('0.09549364344514953',), 1338766876: ()} output_args : {1338766922: ('0.09549364344514953',), 1338766918: ('0.09549364344514953',), 1338766910: ('0.09549364344514953',), 1338766901: ('0.09549364344514953',), 1338766894: ('0.09549364344514953',), 1338766876: ('0.09549364344514953',), 1338766865: ('0.09549364344514953',), 1338766855: ('0.09549364344514953',), 1338766852: ('0.09549364344514953',), 1338766849: ('0.09549364344514953',), 1338766845: ('0.09549364344514953',)} args : 1338766876 depend.output_id : 0 input_args_next_step : {1338766922: ('0.09549364344514953',), 1338766918: ('0.09549364344514953',), 1338766910: ('0.09549364344514953',), 1338766901: ('0.09549364344514953',), 1338766894: ('0.09549364344514953',), 1338766876: ('0.09549364344514953',), 1338766865: ()} output_args : {1338766922: ('0.09549364344514953',), 1338766918: ('0.09549364344514953',), 1338766910: ('0.09549364344514953',), 1338766901: ('0.09549364344514953',), 1338766894: ('0.09549364344514953',), 1338766876: ('0.09549364344514953',), 1338766865: ('0.09549364344514953',), 1338766855: ('0.09549364344514953',), 1338766852: ('0.09549364344514953',), 1338766849: ('0.09549364344514953',), 1338766845: ('0.09549364344514953',)} args : 1338766865 depend.output_id : 0 input_args_next_step : {1338766922: ('0.09549364344514953',), 1338766918: ('0.09549364344514953',), 1338766910: ('0.09549364344514953',), 1338766901: ('0.09549364344514953',), 1338766894: ('0.09549364344514953',), 1338766876: ('0.09549364344514953',), 1338766865: ('0.09549364344514953',), 1338766855: ()} output_args : {1338766922: ('0.09549364344514953',), 1338766918: ('0.09549364344514953',), 1338766910: ('0.09549364344514953',), 1338766901: ('0.09549364344514953',), 1338766894: ('0.09549364344514953',), 1338766876: ('0.09549364344514953',), 1338766865: ('0.09549364344514953',), 1338766855: ('0.09549364344514953',), 1338766852: ('0.09549364344514953',), 1338766849: ('0.09549364344514953',), 1338766845: ('0.09549364344514953',)} args : 1338766855 depend.output_id : 0 input_args_next_step : {1338766922: ('0.09549364344514953',), 1338766918: ('0.09549364344514953',), 1338766910: ('0.09549364344514953',), 1338766901: ('0.09549364344514953',), 1338766894: ('0.09549364344514953',), 1338766876: ('0.09549364344514953',), 1338766865: ('0.09549364344514953',), 1338766855: ('0.09549364344514953',), 1338766852: ()} output_args : {1338766922: ('0.09549364344514953',), 1338766918: ('0.09549364344514953',), 1338766910: ('0.09549364344514953',), 1338766901: ('0.09549364344514953',), 1338766894: ('0.09549364344514953',), 1338766876: ('0.09549364344514953',), 1338766865: ('0.09549364344514953',), 1338766855: ('0.09549364344514953',), 1338766852: ('0.09549364344514953',), 1338766849: ('0.09549364344514953',), 1338766845: ('0.09549364344514953',)} args : 1338766852 depend.output_id : 0 input_args_next_step : {1338766922: ('0.09549364344514953',), 1338766918: ('0.09549364344514953',), 1338766910: ('0.09549364344514953',), 1338766901: ('0.09549364344514953',), 1338766894: ('0.09549364344514953',), 1338766876: ('0.09549364344514953',), 1338766865: ('0.09549364344514953',), 1338766855: ('0.09549364344514953',), 1338766852: ('0.09549364344514953',), 1338766849: ()} output_args : {1338766922: ('0.09549364344514953',), 1338766918: ('0.09549364344514953',), 1338766910: ('0.09549364344514953',), 1338766901: ('0.09549364344514953',), 1338766894: ('0.09549364344514953',), 1338766876: ('0.09549364344514953',), 1338766865: ('0.09549364344514953',), 1338766855: ('0.09549364344514953',), 1338766852: ('0.09549364344514953',), 1338766849: ('0.09549364344514953',), 1338766845: ('0.09549364344514953',)} args : 1338766849 depend.output_id : 0 input_args_next_step : {1338766922: ('0.09549364344514953',), 1338766918: ('0.09549364344514953',), 1338766910: ('0.09549364344514953',), 1338766901: ('0.09549364344514953',), 1338766894: ('0.09549364344514953',), 1338766876: ('0.09549364344514953',), 1338766865: ('0.09549364344514953',), 1338766855: ('0.09549364344514953',), 1338766852: ('0.09549364344514953',), 1338766849: ('0.09549364344514953',), 1338766845: ()} output_args : {1338766922: ('0.09549364344514953',), 1338766918: ('0.09549364344514953',), 1338766910: ('0.09549364344514953',), 1338766901: ('0.09549364344514953',), 1338766894: ('0.09549364344514953',), 1338766876: ('0.09549364344514953',), 1338766865: ('0.09549364344514953',), 1338766855: ('0.09549364344514953',), 1338766852: ('0.09549364344514953',), 1338766849: ('0.09549364344514953',), 1338766845: ('0.09549364344514953',)} args : 1338766845 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 : {20715400: [{'metal': 20715429, 'environnement': 20715430, 'flou': 20715431, 'plastique': 20715432, 'Carton_brun': 20715433, 'autre_refus': 20715434, 'Teint_Dans_La_Masse': 20715435, 'mal_croppe': 20715436, 'Carton_gris': 20715437, 'cartonnette': 20715438, 'kraft': 20715439, 'papier': 20715440}]} input_args_next_step : {1338766922: ('0.09549364344514953',), 1338766918: ('0.09549364344514953',), 1338766910: ('0.09549364344514953',), 1338766901: ('0.09549364344514953',), 1338766894: ('0.09549364344514953',), 1338766876: ('0.09549364344514953',), 1338766865: ('0.09549364344514953',), 1338766855: ('0.09549364344514953',), 1338766852: ('0.09549364344514953',), 1338766849: ('0.09549364344514953',), 1338766845: ('0.09549364344514953',), 20715400: ()} output_args : {20715400: [{'metal': 20715429, 'environnement': 20715430, 'flou': 20715431, 'plastique': 20715432, 'Carton_brun': 20715433, 'autre_refus': 20715434, 'Teint_Dans_La_Masse': 20715435, 'mal_croppe': 20715436, 'Carton_gris': 20715437, 'cartonnette': 20715438, 'kraft': 20715439, 'papier': 20715440}]} args : 20715400 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 :12, first value : ('0.09549364344514953',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20715400) 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 (1338766922,1338766918,1338766910,1338766901,1338766894,1338766876,1338766865,1338766855,1338766852,1338766849,1338766845) Found this number of photos: 11 ##### Call download_photos : nb_thread : 5 begin to download photo : 1338766845 begin to download photo : 1338766855 begin to download photo : 1338766894 begin to download photo : 1338766918 download finish for photo 1338766855 begin to download photo : 1338766865 download finish for photo 1338766845 begin to download photo : 1338766849 download finish for photo 1338766918 begin to download photo : 1338766922 download finish for photo 1338766894 begin to download photo : 1338766901 download finish for photo 1338766849 begin to download photo : 1338766852 download finish for photo 1338766865 begin to download photo : 1338766876 download finish for photo 1338766922 download finish for photo 1338766901 begin to download photo : 1338766910 download finish for photo 1338766852 download finish for photo 1338766876 download finish for photo 1338766910 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette207154291740119819/ imagette207154311740119819/ imagette207154321740119819/ length of list_filenames : 11 ; length of list_pids : 11 ; length of list_args : 11 results_Auto_P20715400_21-02-2025_07_36_59.pdf 20715429 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=20715429 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette207154291740119819 20715431 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=20715431 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette207154311740119819 20715432 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=20715432 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette207154321740119819 20715434 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=20715434 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1338766856: '1740119613_3843300_1338766591_5d64d2678cff30615127435eab114820_rle_crop_3681685512_0.png', 1338766857: '1740119613_3843300_1338766591_5d64d2678cff30615127435eab114820_rle_crop_3681685514_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/b55d56349b186c8312682b174e4d8b98_95314098.png change filename to text .imagette207154341740119819/ imagette207154341740119819/1740119613_3843300_1338766591_5d64d2678cff30615127435eab114820_rle_crop_3681685514_0.png.png imagette207154341740119819/1740119613_3843300_1338766591_5d64d2678cff30615127435eab114820_rle_crop_3681685512_0.png.png imagette207154361740119819/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/2da6356368b49065889f2c0b0702f629_19076983.png imagette207154341740119819 20715436 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=20715436 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette207154361740119819 20715438 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=20715438 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1338766862: '1740119613_3843300_1338766591_5d64d2678cff30615127435eab114820_rle_crop_3681685511_0.png', 1338766863: '1740119613_3843300_1338766591_5d64d2678cff30615127435eab114820_rle_crop_3681685508_0.png', 1338766864: '1740119613_3843300_1338766589_8e38fb0d264af77bedb486d91aad7016_rle_crop_3681685528_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/719f320415e8ad64fa377526339a82ba_8117563.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/04d28b08551f4e59834218583a29f06f_83582981.png change filename to text .imagette207154381740119819/ imagette207154381740119819/1740119613_3843300_1338766591_5d64d2678cff30615127435eab114820_rle_crop_3681685508_0.png.png imagette207154381740119819/1740119613_3843300_1338766589_8e38fb0d264af77bedb486d91aad7016_rle_crop_3681685528_0.png.png imagette207154381740119819/1740119613_3843300_1338766591_5d64d2678cff30615127435eab114820_rle_crop_3681685511_0.png.png imagette207154391740119819/ imagette207154331740119819/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/7ebf93b1402effb0c584bd2c36b7155b_20425231.png imagette207154381740119819 20715439 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=20715439 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette207154391740119819 20715433 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=20715433 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette207154331740119819 20715435 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=20715435 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1338766854: '1740119613_3843300_1338766591_5d64d2678cff30615127435eab114820_rle_crop_3681685516_0.png'} change filename to text .imagette207154351740119819/ imagette207154351740119819/1740119613_3843300_1338766591_5d64d2678cff30615127435eab114820_rle_crop_3681685516_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/88981b356af4a0183258b2fc297731f0_37802570.png imagette207154351740119819 20715437 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=20715437 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1338766858: '1740119613_3843300_1338766589_8e38fb0d264af77bedb486d91aad7016_rle_crop_3681685527_0.png'} change filename to text .imagette207154371740119819/ imagette207154371740119819/1740119613_3843300_1338766589_8e38fb0d264af77bedb486d91aad7016_rle_crop_3681685527_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/50e875b81e90ce53c27b5600cc26347f_30418132.png imagette207154371740119819 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=20715400 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/20715441,20715442,20715443,20715444,20715445,20715446,20715447,20715448,20715449,20715450,20715451,20715452?tags=metal,environnement,flou,plastique,Carton_brun,autre_refus,Teint_Dans_La_Masse,mal_croppe,Carton_gris,cartonnette,kraft,papier your option no_mail is active, we will not send the real mail to your client args[1338766922] : ('0.09549364344514953',) no score found for photo 1338766922 We are sending mail with results at report@fotonower.com args[1338766918] : ('0.09549364344514953',) no score found for photo 1338766918 We are sending mail with results at report@fotonower.com args[1338766910] : ('0.09549364344514953',) no score found for photo 1338766910 We are sending mail with results at report@fotonower.com args[1338766901] : ('0.09549364344514953',) no score found for photo 1338766901 We are sending mail with results at report@fotonower.com args[1338766894] : ('0.09549364344514953',) no score found for photo 1338766894 We are sending mail with results at report@fotonower.com args[1338766876] : ('0.09549364344514953',) no score found for photo 1338766876 We are sending mail with results at report@fotonower.com args[1338766865] : ('0.09549364344514953',) no score found for photo 1338766865 We are sending mail with results at report@fotonower.com args[1338766855] : ('0.09549364344514953',) no score found for photo 1338766855 We are sending mail with results at report@fotonower.com args[1338766852] : ('0.09549364344514953',) no score found for photo 1338766852 We are sending mail with results at report@fotonower.com args[1338766849] : ('0.09549364344514953',) no score found for photo 1338766849 We are sending mail with results at report@fotonower.com args[1338766845] : ('0.09549364344514953',) no score found for photo 1338766845 We are sending mail with results at report@fotonower.com refus_total : 0.09549364344514953 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=20715400 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_P20715400_21-02-2025_07_36_59.pdf results_Auto_P20715400_21-02-2025_07_36_59.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20715400_21-02-2025_07_36_59.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','20715400','results_Auto_P20715400_21-02-2025_07_36_59.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20715400_21-02-2025_07_36_59.pdf','pdf','','0.13','0.09549364344514953') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20715400]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1338766922, 1338766918, 1338766910, 1338766901, 1338766894, 1338766876, 1338766865, 1338766855, 1338766852, 1338766849, 1338766845] map_info['map_portfolio_photo'] : {20715400: [1338766922, 1338766918, 1338766910, 1338766901, 1338766894, 1338766876, 1338766865, 1338766855, 1338766852, 1338766849, 1338766845, 1338766805, 1338766800, 1338766797, 1338766792, 1338766759, 1338766757, 1338766634, 1338766631, 1338766628, 1338766625, 1338766594, 1338766591, 1338766589]} final : False mtd_id 4302 list_pids : [1338766922, 1338766918, 1338766910, 1338766901, 1338766894, 1338766876, 1338766865, 1338766855, 1338766852, 1338766849, 1338766845] 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, '2603397') ('4302', '20715400', '1338766922', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766918', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766910', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766901', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766894', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766876', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766865', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766855', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766852', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766849', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766845', None, None, None, None, None, '2603397') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 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', '20715400', '1338766922', None, None, None, None, None, '2603397'), ('4302', '20715400', '1338766918', None, None, None, None, None, '2603397'), ('4302', '20715400', '1338766910', None, None, None, None, None, '2603397'), ('4302', '20715400', '1338766901', None, None, None, None, None, '2603397'), ('4302', '20715400', '1338766894', None, None, None, None, None, '2603397'), ('4302', '20715400', '1338766876', None, None, None, None, None, '2603397'), ('4302', '20715400', '1338766865', None, None, None, None, None, '2603397'), ('4302', '20715400', '1338766855', None, None, None, None, None, '2603397'), ('4302', '20715400', '1338766852', None, None, None, None, None, '2603397'), ('4302', '20715400', '1338766849', None, None, None, None, None, '2603397'), ('4302', '20715400', '1338766845', None, None, None, None, None, '2603397')] time used for this insertion : 0.020953893661499023 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.8991506099700928 time spend to save output : 0.02128458023071289 total time spend for step 4 : 1.9204351902008057 step5:split_time_score Fri Feb 21 07:37:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['20715400'] 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 : [('20715400',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20715400) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1338766918: {'path': 'temp/1740119818_1553162_1338766918_80d9a4e8ee7bd201ff66e2e77435ab05.jpg', 'extension': 'jpg'}, 1338766922: {'path': 'temp/1740119818_1553162_1338766922_814ba99f5a65c50009301bd7b930a959.jpg', 'extension': 'jpg'}, 1338766845: {'path': 'temp/1740119818_1553162_1338766845_eed5d483417b603049ee98d6218724bc.jpg', 'extension': 'jpg'}, 1338766849: {'path': 'temp/1740119818_1553162_1338766849_6159f0a8b94cecdeb701c59be45c7644.jpg', 'extension': 'jpg'}, 1338766852: {'path': 'temp/1740119818_1553162_1338766852_8e5ff48bbc039b88621d1b6eb9119af4.jpg', 'extension': 'jpg'}, 1338766855: {'path': 'temp/1740119818_1553162_1338766855_52997e93db92c9d3b363004b03e52ffc.jpg', 'extension': 'jpg'}, 1338766865: {'path': 'temp/1740119818_1553162_1338766865_167d258aa308425d30dbc1bd3b994e96.jpg', 'extension': 'jpg'}, 1338766876: {'path': 'temp/1740119818_1553162_1338766876_ac9b0d8a6c22a96d876ccd28866d719f.jpg', 'extension': 'jpg'}, 1338766894: {'path': 'temp/1740119818_1553162_1338766894_a331be4cf45e1a9b5d766b286bb8cc36.jpg', 'extension': 'jpg'}, 1338766901: {'path': 'temp/1740119818_1553162_1338766901_21b19fc738938d0f72bdef3e8f6d191f.jpg', 'extension': 'jpg'}, 1338766910: {'path': 'temp/1740119818_1553162_1338766910_7cf26063b30cbcf4b297daa92ecd0581.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 = 20715400; (('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 = 20715400 group by h (('07', 24),) 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=20715400 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 (20715400) 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 (20715400) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 21022025 20715400 Nombre de photos uploadées : 24 / 23040 (0%) 21022025 20715400 Nombre de photos taguées (types de déchets): 0 / 24 (0%) 21022025 20715400 Nombre de photos taguées (volume) : 0 / 24 (0%) [{'photo_id': 1338766594, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/be52ba7491a794c2351f6d4aa8c47f10.jpg', 'username': None, 'uploaded_at': 1740119483, 'text': 'image_21022025_07_30_25_10133.jpg'}, {'photo_id': 1338766591, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/5d64d2678cff30615127435eab114820.jpg', 'username': None, 'uploaded_at': 1740119483, 'text': 'image_21022025_07_30_35_10132.jpg'}, {'photo_id': 1338766589, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/8e38fb0d264af77bedb486d91aad7016.jpg', 'username': None, 'uploaded_at': 1740119483, 'text': 'image_21022025_07_30_44_9125.jpg'}, {'photo_id': 1338766759, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/fb16203d5397f1b16ff25a9603605857.jpg', 'username': None, 'uploaded_at': 1740119543, 'text': 'image_21022025_07_30_54_10136.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.6689300537109375e-06 elapsed_time : order_list_meta_photo_and_scores 5.7220458984375e-06 ???????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.001253366470336914 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 20715400, '2025-02-21' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1615145,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.027649402618408203 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= 1615145 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1615145, 'dashboard_run_id': 1623600, 'mtr_portfolio_id': 20713356, 'dashboard_result_id': 9000154, '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_P20713356_21-02-2025_07_03_02.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20713359, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20713360, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20713361, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20713362, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20713363, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20713364, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20713365, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20713366, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20713367, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20713368, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20713369, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20713370, 'pht': 3726}}"}, {'dashboat_entry_day': 1615145, 'dashboard_run_id': 1623600, 'mtr_portfolio_id': 20714111, 'dashboard_result_id': 9000155, '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_P20714111_21-02-2025_07_18_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 20714139, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20714140, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20714141, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20714142, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20714143, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20714144, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20714145, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20714146, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20714147, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20714148, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20714149, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20714150, 'pht': 3726}}"}, {'dashboat_entry_day': 1615145, 'dashboard_run_id': 1623600, 'mtr_portfolio_id': 20714749, 'dashboard_result_id': 9000156, '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_P20714749_21-02-2025_07_33_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20714778, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20714779, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20714780, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20714781, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20714782, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20714783, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20714784, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20714785, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20714786, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20714787, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20714788, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20714789, 'pht': 3726}}"}, {'dashboat_entry_day': 1615145, 'dashboard_run_id': 1623600, 'mtr_portfolio_id': 20715400, 'dashboard_result_id': 9000157, '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_P20715400_21-02-2025_07_34_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 20715429, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20715430, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20715431, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20715432, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20715433, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20715434, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20715435, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20715436, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20715437, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20715438, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20715439, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20715440, '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 = 20713356 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': 2603238, 'mtr_portfolio_id': 20713356, 'created_at': datetime.datetime(2025, 2, 21, 7, 3, 1), 'result': '0.06102482623120841', 'result_long': None, 'result_double': None}] Qualite : 0.06102482623120841 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20713356 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20713356_21-02-2025_07_03_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20713356 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_P20713356_21-02-2025_07_03_02.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20713359, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20713360, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20713361, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20713362, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20713363, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20713364, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20713365, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20713366, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20713367, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20713368, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20713369, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20713370, 'pht': 3726}}" where mtr_portfolio_id = 20713356 and dashboard_run_id = 1623600 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`=20713356 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9000154, 0.06102482623120841, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20713356_21-02-2025_07_03_02.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20713359, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20713360, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20713361, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20713362, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20713363, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20713364, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20713365, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20713366, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20713367, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20713368, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20713369, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20713370, '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 = 20714111 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': 2603300, 'mtr_portfolio_id': 20714111, 'created_at': datetime.datetime(2025, 2, 21, 7, 18, 58), 'result': '0.05231467903742512', 'result_long': None, 'result_double': None}] Qualite : 0.05231467903742512 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20714111 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20714111_21-02-2025_07_18_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20714111 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_P20714111_21-02-2025_07_18_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 20714139, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20714140, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20714141, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20714142, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20714143, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20714144, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20714145, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20714146, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20714147, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20714148, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20714149, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20714150, 'pht': 3726}}" where mtr_portfolio_id = 20714111 and dashboard_run_id = 1623600 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`=20714111 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9000155, 0.05231467903742512, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20714111_21-02-2025_07_18_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 20714139, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20714140, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20714141, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20714142, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20714143, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20714144, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20714145, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20714146, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20714147, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20714148, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20714149, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20714150, '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 = 20714749 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': 2603348, 'mtr_portfolio_id': 20714749, 'created_at': datetime.datetime(2025, 2, 21, 7, 33), 'result': '0.06664248658853894', 'result_long': None, 'result_double': None}] Qualite : 0.06664248658853894 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20714749 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20714749_21-02-2025_07_33_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20714749 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_P20714749_21-02-2025_07_33_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20714778, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20714779, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20714780, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20714781, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20714782, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20714783, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20714784, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20714785, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20714786, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20714787, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20714788, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20714789, 'pht': 3726}}" where mtr_portfolio_id = 20714749 and dashboard_run_id = 1623600 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`=20714749 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9000156, 0.06664248658853894, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20714749_21-02-2025_07_33_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20714778, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20714779, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20714780, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20714781, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20714782, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20714783, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20714784, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20714785, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20714786, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20714787, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20714788, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20714789, '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 = 20715400 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': 2603397, 'mtr_portfolio_id': 20715400, 'created_at': datetime.datetime(2025, 2, 21, 7, 36, 58), 'result': '0.09549364344514953', 'result_long': None, 'result_double': None}] Qualite : 0.09549364344514953 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20715400 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20715400_21-02-2025_07_36_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20715400 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_P20715400_21-02-2025_07_36_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 20715429, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20715430, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20715431, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20715432, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20715433, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20715434, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20715435, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20715436, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20715437, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20715438, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20715439, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20715440, 'pht': 3726}}" where mtr_portfolio_id = 20715400 and dashboard_run_id = 1623600 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`=20715400 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9000157, 0.09549364344514953, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20715400_21-02-2025_07_36_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 20715429, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20715430, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20715431, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20715432, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20715433, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20715434, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20715435, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20715436, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20715437, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20715438, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20715439, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20715440, '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 (20713356,20714111,20714749,20715400) result : ((1338762989,), (1338762991,), (1338762992,), (1338762995,), (1338762997,), (1338763033,), (1338763036,), (1338763040,), (1338763068,), (1338763139,), (1338763140,), (1338763143,), (1338763146,), (1338763148,), (1338763150,), (1338763169,), (1338763171,), (1338763173,), (1338763175,), (1338763217,), (1338763220,), (1338763231,), (1338763239,), (1338763248,), (1338763252,), (1338763255,), (1338763258,), (1338763261,), (1338763263,), (1338763266,), (1338763283,), (1338763292,), (1338763295,), (1338763298,), (1338763305,), (1338763306,), (1338763309,), (1338763312,), (1338763315,), (1338763318,), (1338763329,), (1338763336,), (1338763337,), (1338763340,), (1338763368,), (1338763371,), (1338763372,), (1338763388,), (1338763392,), (1338763395,), (1338763402,), (1338763406,), (1338763428,), (1338763434,), (1338763438,), (1338763461,), (1338763462,), (1338763463,), (1338763465,), (1338763467,), (1338763483,), (1338763486,), (1338763489,), (1338763491,), (1338763497,), (1338763973,), (1338763976,), (1338763985,), (1338763994,), (1338763999,), (1338764002,), (1338764004,), (1338764007,), (1338764010,), (1338764013,), (1338764034,), (1338764020,), (1338764023,), (1338764027,), (1338764031,), (1338764408,), (1338764418,), (1338764466,), (1338764468,), (1338764471,), (1338764533,), (1338764536,), (1338764539,), (1338764549,), (1338764582,), (1338764586,), (1338764588,), (1338764591,), (1338764616,), (1338764619,), (1338764622,), (1338764623,), (1338764626,), (1338764684,), (1338764686,), (1338764688,), (1338764690,), (1338764806,), (1338764808,), (1338764810,), (1338764812,), (1338764815,), (1338764817,), (1338765015,), (1338765089,), (1338765094,), (1338765098,), (1338765100,), (1338765154,), (1338765158,), (1338765161,), (1338765164,), (1338765170,), (1338765224,), (1338765227,), (1338765230,), (1338765234,), (1338765238,), (1338765261,), (1338765263,), (1338765266,), (1338765270,), (1338765274,), (1338765282,), (1338765334,), (1338765336,), (1338765340,), (1338765343,), (1338765347,), (1338765373,), (1338765382,), (1338765387,), (1338765391,), (1338765394,), (1338765397,), (1338765424,), (1338765414,), (1338765418,), (1338765476,), (1338765480,), (1338765488,), (1338765812,), (1338765892,), (1338765901,), (1338765950,), (1338765954,), (1338765958,), (1338765960,), (1338765978,), (1338765985,), (1338765996,), (1338765999,), (1338766003,), (1338766005,), (1338766031,), (1338766033,), (1338766034,), (1338766037,), (1338766040,), (1338766044,), (1338766082,), (1338766084,), (1338766100,), (1338766105,), (1338766135,), (1338766143,), (1338766146,), (1338766149,), (1338766160,), (1338766193,), (1338766205,), (1338766209,), (1338766214,), (1338766226,), (1338766240,), (1338766271,), (1338766274,), (1338766277,), (1338766313,), (1338766348,), (1338766364,), (1338766369,), (1338766373,), (1338766377,), (1338766380,), (1338766399,), (1338766403,), (1338766407,), (1338766410,), (1338766423,), (1338766456,), (1338766459,), (1338766462,), (1338766464,), (1338766467,), (1338766471,), (1338766489,), (1338766492,), (1338766495,), (1338766499,), (1338766506,), (1338766532,), (1338766537,), (1338766542,), (1338766546,), (1338766554,), (1338766572,), (1338766597,), (1338766589,), (1338766591,), (1338766594,), (1338766625,), (1338766628,), (1338766631,), (1338766634,), (1338766757,), (1338766759,), (1338766792,), (1338766797,), (1338766800,), (1338766805,), (1338766845,), (1338766849,), (1338766852,), (1338766855,), (1338766865,), (1338766876,), (1338766894,), (1338766901,), (1338766910,), (1338766918,), (1338766922,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'21022025': {'nb_upload': 24, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20715400]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1338766922, 1338766918, 1338766910, 1338766901, 1338766894, 1338766876, 1338766865, 1338766855, 1338766852, 1338766849, 1338766845] map_info['map_portfolio_photo'] : {20715400: [1338766922, 1338766918, 1338766910, 1338766901, 1338766894, 1338766876, 1338766865, 1338766855, 1338766852, 1338766849, 1338766845, 1338766805, 1338766800, 1338766797, 1338766792, 1338766759, 1338766757, 1338766634, 1338766631, 1338766628, 1338766625, 1338766594, 1338766591, 1338766589]} final : True mtd_id 4302 list_pids : [1338766922, 1338766918, 1338766910, 1338766901, 1338766894, 1338766876, 1338766865, 1338766855, 1338766852, 1338766849, 1338766845] Looping around the photos to save general results len do output : 1 /20715400Didn'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, '2603397') ('4302', '20715400', '1338766922', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766918', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766910', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766901', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766894', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766876', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766865', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766855', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766852', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766849', None, None, None, None, None, '2603397') ('4302', None, None, None, None, None, None, None, '2603397') ('4302', '20715400', '1338766845', None, None, None, None, None, '2603397') 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', None, '20715400', 'None', None, None, None, None, '2603397'), ('4302', '20715400', '1338766922', None, None, None, None, None, '2603397'), ('4302', '20715400', '1338766918', None, None, None, None, None, '2603397'), ('4302', '20715400', '1338766910', None, None, None, None, None, '2603397'), ('4302', '20715400', '1338766901', None, None, None, None, None, '2603397'), ('4302', '20715400', '1338766894', None, None, None, None, None, '2603397'), ('4302', '20715400', '1338766876', None, None, None, None, None, '2603397'), ('4302', '20715400', '1338766865', None, None, None, None, None, '2603397'), ('4302', '20715400', '1338766855', None, None, None, None, None, '2603397'), ('4302', '20715400', '1338766852', None, None, None, None, None, '2603397'), ('4302', '20715400', '1338766849', None, None, None, None, None, '2603397'), ('4302', '20715400', '1338766845', None, None, None, None, None, '2603397')] time used for this insertion : 0.022349834442138672 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.3907005786895752 time spend to save output : 0.025933027267456055 total time spend for step 5 : 0.41663360595703125 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 (2603397) 2.33user 2.63system 0:06.75elapsed 73%CPU (0avgtext+0avgdata 161156maxresident)k 51296inputs+8056outputs (261major+76867minor)pagefaults 0swaps