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 : 414475 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 (2731844) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2731844) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22137741 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2731844'] with mtr_portfolio_ids : ['22137741'] and first list_photo_ids : [] new path : /proc/414475/ Name: python3 Umask: 0002 State: R (running) Tgid: 414475 Ngid: 0 Pid: 414475 PPid: 414474 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 414475 NSpid: 414475 NSpgid: 411679 NSsid: 411679 VmPeak: 1106928 kB VmSize: 1106928 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98360 kB VmRSS: 98360 kB RssAnon: 59748 kB RssFile: 38612 kB RssShmem: 0 kB VmData: 865676 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 616 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63054 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 58 nonvoluntary_ctxt_switches: 132 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '414475', 'Ngid': '0', 'Pid': '414475', 'PPid': '414474', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '414475', 'NSpid': '414475', 'NSpgid': '411679', 'NSsid': '411679', 'VmPeak': '1106928 kB', 'VmSize': '1106928 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98360 kB', 'VmRSS': '98360 kB', 'RssAnon': '59748 kB', 'RssFile': '38612 kB', 'RssShmem': '0 kB', 'VmData': '865676 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '616 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63054', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '58', 'nonvoluntary_ctxt_switches': '132'} ('datou_batch_current', '414475', '1106928', '0', '1106928', '865676', '98360', b'', 'marlene', '2731844') 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 (22137741) 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 (2731844 ) ) 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 (22137741) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1350559393, 'portfolio_id': 22137741}, {'photo_id': 1350559389, 'portfolio_id': 22137741}, {'photo_id': 1350559384, 'portfolio_id': 22137741}, {'photo_id': 1350559374, 'portfolio_id': 22137741}, {'photo_id': 1350559372, 'portfolio_id': 22137741}, {'photo_id': 1350559341, 'portfolio_id': 22137741}, {'photo_id': 1350559195, 'portfolio_id': 22137741}, {'photo_id': 1350559191, 'portfolio_id': 22137741}, {'photo_id': 1350559187, 'portfolio_id': 22137741}, {'photo_id': 1350559183, 'portfolio_id': 22137741}, {'photo_id': 1350559040, 'portfolio_id': 22137741}, {'photo_id': 1350559038, 'portfolio_id': 22137741}, {'photo_id': 1350559034, 'portfolio_id': 22137741}, {'photo_id': 1350559030, 'portfolio_id': 22137741}, {'photo_id': 1350558970, 'portfolio_id': 22137741}, {'photo_id': 1350558963, 'portfolio_id': 22137741}, {'photo_id': 1350558917, 'portfolio_id': 22137741}, {'photo_id': 1350558756, 'portfolio_id': 22137741}, {'photo_id': 1350558393, 'portfolio_id': 22137741}, {'photo_id': 1350558361, 'portfolio_id': 22137741}, {'photo_id': 1350558356, 'portfolio_id': 22137741}, {'photo_id': 1350558351, 'portfolio_id': 22137741}, {'photo_id': 1350558331, 'portfolio_id': 22137741}, {'photo_id': 1350558260, 'portfolio_id': 22137741}, {'photo_id': 1350558140, 'portfolio_id': 22137741}, {'photo_id': 1350558135, 'portfolio_id': 22137741}, {'photo_id': 1350558127, 'portfolio_id': 22137741}, {'photo_id': 1350558121, 'portfolio_id': 22137741}, {'photo_id': 1350558019, 'portfolio_id': 22137741}, {'photo_id': 1350558015, 'portfolio_id': 22137741}, {'photo_id': 1350557999, 'portfolio_id': 22137741}, {'photo_id': 1350557985, 'portfolio_id': 22137741}, {'photo_id': 1350557940, 'portfolio_id': 22137741}, {'photo_id': 1350557931, 'portfolio_id': 22137741}, {'photo_id': 1350557828, 'portfolio_id': 22137741}, {'photo_id': 1350557825, 'portfolio_id': 22137741}, {'photo_id': 1350557820, 'portfolio_id': 22137741}, {'photo_id': 1350557817, 'portfolio_id': 22137741}, {'photo_id': 1350557813, 'portfolio_id': 22137741}, {'photo_id': 1350557808, 'portfolio_id': 22137741}, {'photo_id': 1350557697, 'portfolio_id': 22137741}, {'photo_id': 1350557690, 'portfolio_id': 22137741}, {'photo_id': 1350557668, 'portfolio_id': 22137741}, {'photo_id': 1350557340, 'portfolio_id': 22137741}, {'photo_id': 1350557270, 'portfolio_id': 22137741}, {'photo_id': 1350557200, 'portfolio_id': 22137741}, {'photo_id': 1350557190, 'portfolio_id': 22137741}, {'photo_id': 1350557184, 'portfolio_id': 22137741}, {'photo_id': 1350557123, 'portfolio_id': 22137741}, {'photo_id': 1350557117, 'portfolio_id': 22137741}, {'photo_id': 1350557106, 'portfolio_id': 22137741}, {'photo_id': 1350557072, 'portfolio_id': 22137741}] map_portfolio_id_photo_id: {22137741: [1350559393, 1350559389, 1350559384, 1350559374, 1350559372, 1350559341, 1350559195, 1350559191, 1350559187, 1350559183, 1350559040, 1350559038, 1350559034, 1350559030, 1350558970, 1350558963, 1350558917, 1350558756, 1350558393, 1350558361, 1350558356, 1350558351, 1350558331, 1350558260, 1350558140, 1350558135, 1350558127, 1350558121, 1350558019, 1350558015, 1350557999, 1350557985, 1350557940, 1350557931, 1350557828, 1350557825, 1350557820, 1350557817, 1350557813, 1350557808, 1350557697, 1350557690, 1350557668, 1350557340, 1350557270, 1350557200, 1350557190, 1350557184, 1350557123, 1350557117, 1350557106, 1350557072]} ##### 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.014924764633178711 #### 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 Tue Apr 8 08:46:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22137741) 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 : 22137741 get user id for portfolio 22137741 get sub ptf for main ptf 22137741, type 3726 and hashtags ['flou', 'environnement', 'Carton_gris', 'metal', 'papier', 'mal_croppe', 'cartonnette', 'Teint_Dans_La_Masse', 'Carton_brun', 'kraft', 'autre_refus', 'plastique'] 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`=22137741 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','environnement','Carton_gris','metal','papier','mal_croppe','cartonnette','Teint_Dans_La_Masse','Carton_brun','kraft','autre_refus','plastique')) 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`=22137741 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','environnement','Carton_gris','metal','papier','mal_croppe','cartonnette','Teint_Dans_La_Masse','Carton_brun','kraft','autre_refus','plastique')) AND mptpi.`min_score`=0.5 To do returned map {'Teint_Dans_La_Masse': {'main_port_id': 22137741, 'sub_port_id': 22137744, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14617808, 'last_updated_at': datetime.datetime(2025, 4, 8, 8, 44, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 8, 44, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 8, 34, 58)}, 'metal': {'main_port_id': 22137741, 'sub_port_id': 22137745, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14617809, 'last_updated_at': datetime.datetime(2025, 4, 8, 8, 44, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 8, 44, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 8, 34, 58)}, 'plastique': {'main_port_id': 22137741, 'sub_port_id': 22137746, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14617810, 'last_updated_at': datetime.datetime(2025, 4, 8, 8, 44, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 8, 44, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 8, 34, 58)}, 'cartonnette': {'main_port_id': 22137741, 'sub_port_id': 22137747, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14617811, 'last_updated_at': datetime.datetime(2025, 4, 8, 8, 44, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 8, 44, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 8, 34, 58)}, 'Carton_brun': {'main_port_id': 22137741, 'sub_port_id': 22137748, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14617812, 'last_updated_at': datetime.datetime(2025, 4, 8, 8, 44, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 8, 44, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 8, 34, 58)}, 'Carton_gris': {'main_port_id': 22137741, 'sub_port_id': 22137749, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14617813, 'last_updated_at': datetime.datetime(2025, 4, 8, 8, 44, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 8, 44, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 8, 34, 58)}, 'flou': {'main_port_id': 22137741, 'sub_port_id': 22137750, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14617814, 'last_updated_at': datetime.datetime(2025, 4, 8, 8, 44, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 8, 44, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 8, 34, 58)}, 'kraft': {'main_port_id': 22137741, 'sub_port_id': 22137751, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14617815, 'last_updated_at': datetime.datetime(2025, 4, 8, 8, 44, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 8, 44, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 8, 34, 58)}, 'autre_refus': {'main_port_id': 22137741, 'sub_port_id': 22137752, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14617816, 'last_updated_at': datetime.datetime(2025, 4, 8, 8, 44, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 8, 44, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 8, 34, 58)}, 'papier': {'main_port_id': 22137741, 'sub_port_id': 22137753, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14617817, 'last_updated_at': datetime.datetime(2025, 4, 8, 8, 44, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 8, 44, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 8, 34, 58)}, 'mal_croppe': {'main_port_id': 22137741, 'sub_port_id': 22137754, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14617818, 'last_updated_at': datetime.datetime(2025, 4, 8, 8, 44, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 8, 44, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 8, 34, 58)}, 'environnement': {'main_port_id': 22137741, 'sub_port_id': 22137755, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14617819, 'last_updated_at': datetime.datetime(2025, 4, 8, 8, 44, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 8, 44, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 8, 34, 58)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22137744 , 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=22137741 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 (22137744) result : ((1350557826,), (1350558099,), (1350558100,), (1350558405,), (1350558406,), (1350558407,), (1350558408,), (1350558707,), (1350559431,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22137741) result : ((1350557072,), (1350557106,), (1350557117,), (1350557123,), (1350557184,), (1350557190,), (1350557200,), (1350557270,), (1350557340,), (1350557668,), (1350557690,), (1350557697,), (1350557808,), (1350557813,), (1350557817,), (1350557820,), (1350557825,), (1350557828,), (1350557931,), (1350557940,), (1350557985,), (1350557999,), (1350558015,), (1350558019,), (1350558121,), (1350558127,), (1350558135,), (1350558140,), (1350558260,), (1350558331,), (1350558351,), (1350558356,), (1350558361,), (1350558393,), (1350558756,), (1350558917,), (1350558963,), (1350558970,), (1350559030,), (1350559034,), (1350559038,), (1350559040,), (1350559183,), (1350559187,), (1350559191,), (1350559195,), (1350559341,), (1350559372,), (1350559374,), (1350559384,), (1350559389,), (1350559393,)) 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 (1350557200) 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 22137745 , 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=22137741 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 (22137745) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22137741) result : ((1350557072,), (1350557106,), (1350557117,), (1350557123,), (1350557184,), (1350557190,), (1350557200,), (1350557270,), (1350557340,), (1350557668,), (1350557690,), (1350557697,), (1350557808,), (1350557813,), (1350557817,), (1350557820,), (1350557825,), (1350557828,), (1350557931,), (1350557940,), (1350557985,), (1350557999,), (1350558015,), (1350558019,), (1350558121,), (1350558127,), (1350558135,), (1350558140,), (1350558260,), (1350558331,), (1350558351,), (1350558356,), (1350558361,), (1350558393,), (1350558756,), (1350558917,), (1350558963,), (1350558970,), (1350559030,), (1350559034,), (1350559038,), (1350559040,), (1350559183,), (1350559187,), (1350559191,), (1350559195,), (1350559341,), (1350559372,), (1350559374,), (1350559384,), (1350559389,), (1350559393,)) 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 (1350557200) 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 22137746 , 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=22137741 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 (22137746) result : ((1350558134,), (1350558418,), (1350558427,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22137741) result : ((1350557072,), (1350557106,), (1350557117,), (1350557123,), (1350557184,), (1350557190,), (1350557200,), (1350557270,), (1350557340,), (1350557668,), (1350557690,), (1350557697,), (1350557808,), (1350557813,), (1350557817,), (1350557820,), (1350557825,), (1350557828,), (1350557931,), (1350557940,), (1350557985,), (1350557999,), (1350558015,), (1350558019,), (1350558121,), (1350558127,), (1350558135,), (1350558140,), (1350558260,), (1350558331,), (1350558351,), (1350558356,), (1350558361,), (1350558393,), (1350558756,), (1350558917,), (1350558963,), (1350558970,), (1350559030,), (1350559034,), (1350559038,), (1350559040,), (1350559183,), (1350559187,), (1350559191,), (1350559195,), (1350559341,), (1350559372,), (1350559374,), (1350559384,), (1350559389,), (1350559393,)) 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 (1350557200) 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 22137747 , 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=22137741 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 (22137747) result : ((1350558132,), (1350558413,), (1350558414,), (1350558415,), (1350558713,), (1350558734,), (1350558735,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22137741) result : ((1350557072,), (1350557106,), (1350557117,), (1350557123,), (1350557184,), (1350557190,), (1350557200,), (1350557270,), (1350557340,), (1350557668,), (1350557690,), (1350557697,), (1350557808,), (1350557813,), (1350557817,), (1350557820,), (1350557825,), (1350557828,), (1350557931,), (1350557940,), (1350557985,), (1350557999,), (1350558015,), (1350558019,), (1350558121,), (1350558127,), (1350558135,), (1350558140,), (1350558260,), (1350558331,), (1350558351,), (1350558356,), (1350558361,), (1350558393,), (1350558756,), (1350558917,), (1350558963,), (1350558970,), (1350559030,), (1350559034,), (1350559038,), (1350559040,), (1350559183,), (1350559187,), (1350559191,), (1350559195,), (1350559341,), (1350559372,), (1350559374,), (1350559384,), (1350559389,), (1350559393,)) 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 (1350557200) 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 22137748 , 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=22137741 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 (22137748) result : ((1350558102,), (1350558416,), (1350558421,), (1350558422,), (1350558423,), (1350558424,), (1350558425,), (1350558426,), (1350558723,), (1350558724,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22137741) result : ((1350557072,), (1350557106,), (1350557117,), (1350557123,), (1350557184,), (1350557190,), (1350557200,), (1350557270,), (1350557340,), (1350557668,), (1350557690,), (1350557697,), (1350557808,), (1350557813,), (1350557817,), (1350557820,), (1350557825,), (1350557828,), (1350557931,), (1350557940,), (1350557985,), (1350557999,), (1350558015,), (1350558019,), (1350558121,), (1350558127,), (1350558135,), (1350558140,), (1350558260,), (1350558331,), (1350558351,), (1350558356,), (1350558361,), (1350558393,), (1350558756,), (1350558917,), (1350558963,), (1350558970,), (1350559030,), (1350559034,), (1350559038,), (1350559040,), (1350559183,), (1350559187,), (1350559191,), (1350559195,), (1350559341,), (1350559372,), (1350559374,), (1350559384,), (1350559389,), (1350559393,)) 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 (1350557200) 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 22137749 , 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=22137741 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 (22137749) result : ((1350557832,), (1350557833,), (1350557834,), (1350558410,), (1350558411,), (1350558732,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22137741) result : ((1350557072,), (1350557106,), (1350557117,), (1350557123,), (1350557184,), (1350557190,), (1350557200,), (1350557270,), (1350557340,), (1350557668,), (1350557690,), (1350557697,), (1350557808,), (1350557813,), (1350557817,), (1350557820,), (1350557825,), (1350557828,), (1350557931,), (1350557940,), (1350557985,), (1350557999,), (1350558015,), (1350558019,), (1350558121,), (1350558127,), (1350558135,), (1350558140,), (1350558260,), (1350558331,), (1350558351,), (1350558356,), (1350558361,), (1350558393,), (1350558756,), (1350558917,), (1350558963,), (1350558970,), (1350559030,), (1350559034,), (1350559038,), (1350559040,), (1350559183,), (1350559187,), (1350559191,), (1350559195,), (1350559341,), (1350559372,), (1350559374,), (1350559384,), (1350559389,), (1350559393,)) 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 (1350557200) 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 22137750 , 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=22137741 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 (22137750) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22137741) result : ((1350557072,), (1350557106,), (1350557117,), (1350557123,), (1350557184,), (1350557190,), (1350557200,), (1350557270,), (1350557340,), (1350557668,), (1350557690,), (1350557697,), (1350557808,), (1350557813,), (1350557817,), (1350557820,), (1350557825,), (1350557828,), (1350557931,), (1350557940,), (1350557985,), (1350557999,), (1350558015,), (1350558019,), (1350558121,), (1350558127,), (1350558135,), (1350558140,), (1350558260,), (1350558331,), (1350558351,), (1350558356,), (1350558361,), (1350558393,), (1350558756,), (1350558917,), (1350558963,), (1350558970,), (1350559030,), (1350559034,), (1350559038,), (1350559040,), (1350559183,), (1350559187,), (1350559191,), (1350559195,), (1350559341,), (1350559372,), (1350559374,), (1350559384,), (1350559389,), (1350559393,)) 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 (1350557200) 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 22137751 , 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=22137741 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 (22137751) result : ((1350559426,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22137741) result : ((1350557072,), (1350557106,), (1350557117,), (1350557123,), (1350557184,), (1350557190,), (1350557200,), (1350557270,), (1350557340,), (1350557668,), (1350557690,), (1350557697,), (1350557808,), (1350557813,), (1350557817,), (1350557820,), (1350557825,), (1350557828,), (1350557931,), (1350557940,), (1350557985,), (1350557999,), (1350558015,), (1350558019,), (1350558121,), (1350558127,), (1350558135,), (1350558140,), (1350558260,), (1350558331,), (1350558351,), (1350558356,), (1350558361,), (1350558393,), (1350558756,), (1350558917,), (1350558963,), (1350558970,), (1350559030,), (1350559034,), (1350559038,), (1350559040,), (1350559183,), (1350559187,), (1350559191,), (1350559195,), (1350559341,), (1350559372,), (1350559374,), (1350559384,), (1350559389,), (1350559393,)) 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 (1350557200) 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 22137752 , 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=22137741 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 (22137752) result : ((1350557829,), (1350557830,), (1350558130,), (1350558131,), (1350559425,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22137741) result : ((1350557072,), (1350557106,), (1350557117,), (1350557123,), (1350557184,), (1350557190,), (1350557200,), (1350557270,), (1350557340,), (1350557668,), (1350557690,), (1350557697,), (1350557808,), (1350557813,), (1350557817,), (1350557820,), (1350557825,), (1350557828,), (1350557931,), (1350557940,), (1350557985,), (1350557999,), (1350558015,), (1350558019,), (1350558121,), (1350558127,), (1350558135,), (1350558140,), (1350558260,), (1350558331,), (1350558351,), (1350558356,), (1350558361,), (1350558393,), (1350558756,), (1350558917,), (1350558963,), (1350558970,), (1350559030,), (1350559034,), (1350559038,), (1350559040,), (1350559183,), (1350559187,), (1350559191,), (1350559195,), (1350559341,), (1350559372,), (1350559374,), (1350559384,), (1350559389,), (1350559393,)) 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 (1350557200) 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 22137753 , 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=22137741 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 (22137753) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22137741) result : ((1350557072,), (1350557106,), (1350557117,), (1350557123,), (1350557184,), (1350557190,), (1350557200,), (1350557270,), (1350557340,), (1350557668,), (1350557690,), (1350557697,), (1350557808,), (1350557813,), (1350557817,), (1350557820,), (1350557825,), (1350557828,), (1350557931,), (1350557940,), (1350557985,), (1350557999,), (1350558015,), (1350558019,), (1350558121,), (1350558127,), (1350558135,), (1350558140,), (1350558260,), (1350558331,), (1350558351,), (1350558356,), (1350558361,), (1350558393,), (1350558756,), (1350558917,), (1350558963,), (1350558970,), (1350559030,), (1350559034,), (1350559038,), (1350559040,), (1350559183,), (1350559187,), (1350559191,), (1350559195,), (1350559341,), (1350559372,), (1350559374,), (1350559384,), (1350559389,), (1350559393,)) 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 (1350557200) 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 22137754 , 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=22137741 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 (22137754) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22137741) result : ((1350557072,), (1350557106,), (1350557117,), (1350557123,), (1350557184,), (1350557190,), (1350557200,), (1350557270,), (1350557340,), (1350557668,), (1350557690,), (1350557697,), (1350557808,), (1350557813,), (1350557817,), (1350557820,), (1350557825,), (1350557828,), (1350557931,), (1350557940,), (1350557985,), (1350557999,), (1350558015,), (1350558019,), (1350558121,), (1350558127,), (1350558135,), (1350558140,), (1350558260,), (1350558331,), (1350558351,), (1350558356,), (1350558361,), (1350558393,), (1350558756,), (1350558917,), (1350558963,), (1350558970,), (1350559030,), (1350559034,), (1350559038,), (1350559040,), (1350559183,), (1350559187,), (1350559191,), (1350559195,), (1350559341,), (1350559372,), (1350559374,), (1350559384,), (1350559389,), (1350559393,)) 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 (1350557200) 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 22137755 , 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=22137741 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 (22137755) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22137741) result : ((1350557072,), (1350557106,), (1350557117,), (1350557123,), (1350557184,), (1350557190,), (1350557200,), (1350557270,), (1350557340,), (1350557668,), (1350557690,), (1350557697,), (1350557808,), (1350557813,), (1350557817,), (1350557820,), (1350557825,), (1350557828,), (1350557931,), (1350557940,), (1350557985,), (1350557999,), (1350558015,), (1350558019,), (1350558121,), (1350558127,), (1350558135,), (1350558140,), (1350558260,), (1350558331,), (1350558351,), (1350558356,), (1350558361,), (1350558393,), (1350558756,), (1350558917,), (1350558963,), (1350558970,), (1350559030,), (1350559034,), (1350559038,), (1350559040,), (1350559183,), (1350559187,), (1350559191,), (1350559195,), (1350559341,), (1350559372,), (1350559374,), (1350559384,), (1350559389,), (1350559393,)) 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 (1350557200) 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`=22137741 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','environnement','Carton_gris','metal','papier','mal_croppe','cartonnette','Teint_Dans_La_Masse','Carton_brun','kraft','autre_refus','plastique')) 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`=22137741 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','environnement','Carton_gris','metal','papier','mal_croppe','cartonnette','Teint_Dans_La_Masse','Carton_brun','kraft','autre_refus','plastique')) AND mptpi.`min_score`=0.5 To do returned map {'Teint_Dans_La_Masse': {'main_port_id': 22137741, 'sub_port_id': 22137756, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14617820, 'last_updated_at': datetime.datetime(2025, 4, 8, 8, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 8, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 8, 34, 59)}, 'metal': {'main_port_id': 22137741, 'sub_port_id': 22137757, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14617821, 'last_updated_at': datetime.datetime(2025, 4, 8, 8, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 8, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 8, 34, 59)}, 'plastique': {'main_port_id': 22137741, 'sub_port_id': 22137758, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14617822, 'last_updated_at': datetime.datetime(2025, 4, 8, 8, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 8, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 8, 34, 59)}, 'cartonnette': {'main_port_id': 22137741, 'sub_port_id': 22137759, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14617823, 'last_updated_at': datetime.datetime(2025, 4, 8, 8, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 8, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 8, 34, 59)}, 'Carton_brun': {'main_port_id': 22137741, 'sub_port_id': 22137760, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14617824, 'last_updated_at': datetime.datetime(2025, 4, 8, 8, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 8, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 8, 34, 59)}, 'Carton_gris': {'main_port_id': 22137741, 'sub_port_id': 22137761, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14617825, 'last_updated_at': datetime.datetime(2025, 4, 8, 8, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 8, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 8, 34, 59)}, 'flou': {'main_port_id': 22137741, 'sub_port_id': 22137762, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14617826, 'last_updated_at': datetime.datetime(2025, 4, 8, 8, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 8, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 8, 34, 59)}, 'kraft': {'main_port_id': 22137741, 'sub_port_id': 22137763, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14617827, 'last_updated_at': datetime.datetime(2025, 4, 8, 8, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 8, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 8, 34, 59)}, 'autre_refus': {'main_port_id': 22137741, 'sub_port_id': 22137764, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14617828, 'last_updated_at': datetime.datetime(2025, 4, 8, 8, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 8, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 8, 34, 59)}, 'papier': {'main_port_id': 22137741, 'sub_port_id': 22137765, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14617829, 'last_updated_at': datetime.datetime(2025, 4, 8, 8, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 8, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 8, 34, 59)}, 'mal_croppe': {'main_port_id': 22137741, 'sub_port_id': 22137766, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14617830, 'last_updated_at': datetime.datetime(2025, 4, 8, 8, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 8, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 8, 34, 59)}, 'environnement': {'main_port_id': 22137741, 'sub_port_id': 22137767, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14617831, 'last_updated_at': datetime.datetime(2025, 4, 8, 8, 44, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 8, 44, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 8, 34, 59)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22137756,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22137744 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22137757,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22137745 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22137758,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22137746 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22137759,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22137747 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22137760,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22137748 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22137761,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22137749 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22137762,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22137750 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22137763,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22137751 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22137764,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22137752 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22137765,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22137753 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22137766,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22137754 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22137767,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22137755 lien utilise dans velours : https://www.fotonower.com/velours/22137756,22137757,22137758,22137759,22137760,22137761,22137762,22137763,22137764,22137765,22137766,22137767?tags=Teint_Dans_La_Masse,metal,plastique,cartonnette,Carton_brun,Carton_gris,flou,kraft,autre_refus,papier,mal_croppe,environnement After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22137741]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1350559393, 1350559389, 1350559384, 1350559374, 1350559372, 1350559341] map_info['map_portfolio_photo'] : {22137741: [1350559393, 1350559389, 1350559384, 1350559374, 1350559372, 1350559341, 1350559195, 1350559191, 1350559187, 1350559183, 1350559040, 1350559038, 1350559034, 1350559030, 1350558970, 1350558963, 1350558917, 1350558756, 1350558393, 1350558361, 1350558356, 1350558351, 1350558331, 1350558260, 1350558140, 1350558135, 1350558127, 1350558121, 1350558019, 1350558015, 1350557999, 1350557985, 1350557940, 1350557931, 1350557828, 1350557825, 1350557820, 1350557817, 1350557813, 1350557808, 1350557697, 1350557690, 1350557668, 1350557340, 1350557270, 1350557200, 1350557190, 1350557184, 1350557123, 1350557117, 1350557106, 1350557072]} final : False mtd_id 4302 list_pids : [1350559393, 1350559389, 1350559384, 1350559374, 1350559372, 1350559341] Looping around the photos to save general results len do output : 1 /22137741. 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, '2731844') ('4302', '22137741', '1350559393', None, None, None, None, None, '2731844') ('4302', None, None, None, None, None, None, None, '2731844') ('4302', '22137741', '1350559389', None, None, None, None, None, '2731844') ('4302', None, None, None, None, None, None, None, '2731844') ('4302', '22137741', '1350559384', None, None, None, None, None, '2731844') ('4302', None, None, None, None, None, None, None, '2731844') ('4302', '22137741', '1350559374', None, None, None, None, None, '2731844') ('4302', None, None, None, None, None, None, None, '2731844') ('4302', '22137741', '1350559372', None, None, None, None, None, '2731844') ('4302', None, None, None, None, None, None, None, '2731844') ('4302', '22137741', '1350559341', None, None, None, None, None, '2731844') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 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, '22137741', "{'Teint_Dans_La_Masse': 22137744, 'metal': 22137745, 'plastique': 22137746, 'cartonnette': 22137747, 'Carton_brun': 22137748, 'Carton_gris': 22137749, 'flou': 22137750, 'kraft': 22137751, 'autre_refus': 22137752, 'papier': 22137753, 'mal_croppe': 22137754, 'environnement': 22137755}", None, None, None, None, '2731844'), ('4302', '22137741', '1350559393', None, None, None, None, None, '2731844'), ('4302', '22137741', '1350559389', None, None, None, None, None, '2731844'), ('4302', '22137741', '1350559384', None, None, None, None, None, '2731844'), ('4302', '22137741', '1350559374', None, None, None, None, None, '2731844'), ('4302', '22137741', '1350559372', None, None, None, None, None, '2731844'), ('4302', '22137741', '1350559341', None, None, None, None, None, '2731844')] time used for this insertion : 0.01312875747680664 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.6583085060119629 time spend to save output : 0.013413190841674805 total time spend for step 1 : 0.6717216968536377 step2:final Tue Apr 8 08:46: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 (22137741) 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 22137741 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1350557123,1350557117,1350557106,1350557072,1350557340,1350557270,1350557200,1350557190,1350557184,1350557697,1350557690,1350557668,1350557828,1350557825,1350557820,1350557817,1350557813,1350557808,1350558019,1350558015,1350557999,1350557985,1350557940,1350557931,1350558140,1350558135,1350558127,1350558121,1350558361,1350558356,1350558351,1350558260,1350558331,1350558393,1350558756,1350558917,1350558970,1350558963,1350559040,1350559038,1350559034,1350559030,1350559195,1350559191,1350559187,1350559183,1350559393,1350559389,1350559384,1350559374,1350559372,1350559341); 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([22137741]) Inside saveOutput : final : False verbose : True original output for save of step final : {1350559393: ('0.032200891427552544',), 1350559389: ('0.032200891427552544',), 1350559384: ('0.032200891427552544',), 1350559374: ('0.032200891427552544',), 1350559372: ('0.032200891427552544',), 1350559341: ('0.032200891427552544',)} new output for save of step final : {1350559393: ('0.032200891427552544',), 1350559389: ('0.032200891427552544',), 1350559384: ('0.032200891427552544',), 1350559374: ('0.032200891427552544',), 1350559372: ('0.032200891427552544',), 1350559341: ('0.032200891427552544',)} [1350559393, 1350559389, 1350559384, 1350559374, 1350559372, 1350559341] map_info['map_portfolio_photo'] : {22137741: [1350559393, 1350559389, 1350559384, 1350559374, 1350559372, 1350559341, 1350559195, 1350559191, 1350559187, 1350559183, 1350559040, 1350559038, 1350559034, 1350559030, 1350558970, 1350558963, 1350558917, 1350558756, 1350558393, 1350558361, 1350558356, 1350558351, 1350558331, 1350558260, 1350558140, 1350558135, 1350558127, 1350558121, 1350558019, 1350558015, 1350557999, 1350557985, 1350557940, 1350557931, 1350557828, 1350557825, 1350557820, 1350557817, 1350557813, 1350557808, 1350557697, 1350557690, 1350557668, 1350557340, 1350557270, 1350557200, 1350557190, 1350557184, 1350557123, 1350557117, 1350557106, 1350557072]} final : False mtd_id 4302 list_pids : [1350559393, 1350559389, 1350559384, 1350559374, 1350559372, 1350559341] Looping around the photos to save general results len do output : 6 /1350559393.Didn't retrieve data . /1350559389.Didn't retrieve data . /1350559384.Didn't retrieve data . /1350559374.Didn't retrieve data . /1350559372.Didn't retrieve data . /1350559341.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, '2731844') ('4302', '22137741', '1350559393', None, None, None, None, None, '2731844') ('4302', None, None, None, None, None, None, None, '2731844') ('4302', '22137741', '1350559389', None, None, None, None, None, '2731844') ('4302', None, None, None, None, None, None, None, '2731844') ('4302', '22137741', '1350559384', None, None, None, None, None, '2731844') ('4302', None, None, None, None, None, None, None, '2731844') ('4302', '22137741', '1350559374', None, None, None, None, None, '2731844') ('4302', None, None, None, None, None, None, None, '2731844') ('4302', '22137741', '1350559372', None, None, None, None, None, '2731844') ('4302', None, None, None, None, None, None, None, '2731844') ('4302', '22137741', '1350559341', None, None, None, None, None, '2731844') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 18 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', '22137741', '1350559393', '0.032200891427552544', None, None, None, None, '2731844'), ('4302', '22137741', '1350559389', '0.032200891427552544', None, None, None, None, '2731844'), ('4302', '22137741', '1350559384', '0.032200891427552544', None, None, None, None, '2731844'), ('4302', '22137741', '1350559374', '0.032200891427552544', None, None, None, None, '2731844'), ('4302', '22137741', '1350559372', '0.032200891427552544', None, None, None, None, '2731844'), ('4302', '22137741', '1350559341', '0.032200891427552544', None, None, None, None, '2731844')] time used for this insertion : 0.011708498001098633 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.0644235610961914 time spend to save output : 0.011994361877441406 total time spend for step 2 : 0.07641792297363281 step3:velours_tree Tue Apr 8 08:46:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {22137741: [{'Teint_Dans_La_Masse': 22137744, 'metal': 22137745, 'plastique': 22137746, 'cartonnette': 22137747, 'Carton_brun': 22137748, 'Carton_gris': 22137749, 'flou': 22137750, 'kraft': 22137751, 'autre_refus': 22137752, 'papier': 22137753, 'mal_croppe': 22137754, 'environnement': 22137755}]} input_args_next_step : {22137741: ()} output_args : {22137741: [{'Teint_Dans_La_Masse': 22137744, 'metal': 22137745, 'plastique': 22137746, 'cartonnette': 22137747, 'Carton_brun': 22137748, 'Carton_gris': 22137749, 'flou': 22137750, 'kraft': 22137751, 'autre_refus': 22137752, 'papier': 22137753, 'mal_croppe': 22137754, 'environnement': 22137755}]} args : 22137741 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'Teint_Dans_La_Masse': 22137744, 'metal': 22137745, 'plastique': 22137746, 'cartonnette': 22137747, 'Carton_brun': 22137748, 'Carton_gris': 22137749, 'flou': 22137750, 'kraft': 22137751, 'autre_refus': 22137752, 'papier': 22137753, 'mal_croppe': 22137754, 'environnement': 22137755},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22137741) 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([22137741]) 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.2843320369720459 time spend to save output : 4.9114227294921875e-05 total time spend for step 3 : 0.2843811511993408 step4:send_mail_cod Tue Apr 8 08:46:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1350559393: ('0.032200891427552544',), 1350559389: ('0.032200891427552544',), 1350559384: ('0.032200891427552544',), 1350559374: ('0.032200891427552544',), 1350559372: ('0.032200891427552544',), 1350559341: ('0.032200891427552544',)} input_args_next_step : {1350559393: ()} output_args : {1350559393: ('0.032200891427552544',), 1350559389: ('0.032200891427552544',), 1350559384: ('0.032200891427552544',), 1350559374: ('0.032200891427552544',), 1350559372: ('0.032200891427552544',), 1350559341: ('0.032200891427552544',)} args : 1350559393 depend.output_id : 0 input_args_next_step : {1350559393: ('0.032200891427552544',), 1350559389: ()} output_args : {1350559393: ('0.032200891427552544',), 1350559389: ('0.032200891427552544',), 1350559384: ('0.032200891427552544',), 1350559374: ('0.032200891427552544',), 1350559372: ('0.032200891427552544',), 1350559341: ('0.032200891427552544',)} args : 1350559389 depend.output_id : 0 input_args_next_step : {1350559393: ('0.032200891427552544',), 1350559389: ('0.032200891427552544',), 1350559384: ()} output_args : {1350559393: ('0.032200891427552544',), 1350559389: ('0.032200891427552544',), 1350559384: ('0.032200891427552544',), 1350559374: ('0.032200891427552544',), 1350559372: ('0.032200891427552544',), 1350559341: ('0.032200891427552544',)} args : 1350559384 depend.output_id : 0 input_args_next_step : {1350559393: ('0.032200891427552544',), 1350559389: ('0.032200891427552544',), 1350559384: ('0.032200891427552544',), 1350559374: ()} output_args : {1350559393: ('0.032200891427552544',), 1350559389: ('0.032200891427552544',), 1350559384: ('0.032200891427552544',), 1350559374: ('0.032200891427552544',), 1350559372: ('0.032200891427552544',), 1350559341: ('0.032200891427552544',)} args : 1350559374 depend.output_id : 0 input_args_next_step : {1350559393: ('0.032200891427552544',), 1350559389: ('0.032200891427552544',), 1350559384: ('0.032200891427552544',), 1350559374: ('0.032200891427552544',), 1350559372: ()} output_args : {1350559393: ('0.032200891427552544',), 1350559389: ('0.032200891427552544',), 1350559384: ('0.032200891427552544',), 1350559374: ('0.032200891427552544',), 1350559372: ('0.032200891427552544',), 1350559341: ('0.032200891427552544',)} args : 1350559372 depend.output_id : 0 input_args_next_step : {1350559393: ('0.032200891427552544',), 1350559389: ('0.032200891427552544',), 1350559384: ('0.032200891427552544',), 1350559374: ('0.032200891427552544',), 1350559372: ('0.032200891427552544',), 1350559341: ()} output_args : {1350559393: ('0.032200891427552544',), 1350559389: ('0.032200891427552544',), 1350559384: ('0.032200891427552544',), 1350559374: ('0.032200891427552544',), 1350559372: ('0.032200891427552544',), 1350559341: ('0.032200891427552544',)} args : 1350559341 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 : {22137741: [{'Teint_Dans_La_Masse': 22137744, 'metal': 22137745, 'plastique': 22137746, 'cartonnette': 22137747, 'Carton_brun': 22137748, 'Carton_gris': 22137749, 'flou': 22137750, 'kraft': 22137751, 'autre_refus': 22137752, 'papier': 22137753, 'mal_croppe': 22137754, 'environnement': 22137755}]} input_args_next_step : {1350559393: ('0.032200891427552544',), 1350559389: ('0.032200891427552544',), 1350559384: ('0.032200891427552544',), 1350559374: ('0.032200891427552544',), 1350559372: ('0.032200891427552544',), 1350559341: ('0.032200891427552544',), 22137741: ()} output_args : {22137741: [{'Teint_Dans_La_Masse': 22137744, 'metal': 22137745, 'plastique': 22137746, 'cartonnette': 22137747, 'Carton_brun': 22137748, 'Carton_gris': 22137749, 'flou': 22137750, 'kraft': 22137751, 'autre_refus': 22137752, 'papier': 22137753, 'mal_croppe': 22137754, 'environnement': 22137755}]} args : 22137741 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 :7, first value : ('0.032200891427552544',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22137741) 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 (1350559393,1350559389,1350559384,1350559374,1350559372,1350559341) Found this number of photos: 6 ##### Call download_photos : nb_thread : 5 begin to download photo : 1350559341 begin to download photo : 1350559374 begin to download photo : 1350559389 download finish for photo 1350559389 begin to download photo : 1350559393 download finish for photo 1350559341 begin to download photo : 1350559372 download finish for photo 1350559374 begin to download photo : 1350559384 download finish for photo 1350559372 download finish for photo 1350559393 download finish for photo 1350559384 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette221377451744094819/ length of list_filenames : 6 ; length of list_pids : 6 ; length of list_args : 6 results_Auto_P22137741_08-04-2025_08_46_59.pdf 22137745 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=22137745 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221377451744094819 22137746 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=22137746 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350558134: '1744094131_1941977_1350557270_98e500cd234b92f091a341c5ddf75e26_rle_crop_3750459629_0.png', 1350558418: '1744094246_1769090_1350557985_b716f0b5254bc629464f764b3a8982fd_rle_crop_3750462035_0.png', 1350558427: '1744094232_1943052_1350557817_07e0df5e9dcfb51350b51c9f11ca9ad9_rle_crop_3750462064_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/f26d81d1dfef6a6d4ec478fb9335b63f_83828998.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/4be65c536571f2cbffcebeedb1582752_83094228.png change filename to text .imagette221377461744094819/ imagette221377461744094819/1744094246_1769090_1350557985_b716f0b5254bc629464f764b3a8982fd_rle_crop_3750462035_0.png.png imagette221377461744094819/1744094131_1941977_1350557270_98e500cd234b92f091a341c5ddf75e26_rle_crop_3750459629_0.png.png imagette221377461744094819/1744094232_1943052_1350557817_07e0df5e9dcfb51350b51c9f11ca9ad9_rle_crop_3750462064_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/74a665574d7a367c75b7451178905e17_25562782.png imagette221377461744094819 22137747 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=22137747 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350558132: '1744094131_1941977_1350557270_98e500cd234b92f091a341c5ddf75e26_rle_crop_3750459625_0.png', 1350558413: '1744094232_1943052_1350557820_af636f42f69281db5db947e49425b24c_rle_crop_3750461984_0.png', 1350558414: '1744094232_1943052_1350557820_af636f42f69281db5db947e49425b24c_rle_crop_3750461989_0.png', 1350558415: '1744094232_1943052_1350557817_07e0df5e9dcfb51350b51c9f11ca9ad9_rle_crop_3750462058_0.png', 1350558713: '1744094357_1944010_1350558127_09ebe577ac801e9b59d78b73c6aa6a8c_rle_crop_3750462610_0.png', 1350558734: '1744094366_1713358_1350558393_ec12b34916d4348c11f347416cb2ac7d_rle_crop_3750462618_0.png', 1350558735: '1744094366_1713358_1350558351_e3a62a48d8d83ceafa3f24dd2c05f9ef_rle_crop_3750462665_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/f0bc74b528cdd023854d3b15148f8eca_29357724.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/a72ce22135c6320b30e02d4d2f863218_6521550.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/8b908fd8d850180dfd437839fb5e7921_62505668.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/744ebe13338675a741580a74a1a395dd_66359529.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/53b9c5d89fc70d1b25d2e3affb56b538_33406854.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/f3d708e8f4eaf1f606da4b0b9b3f2b22_99986961.png change filename to text .imagette221377471744094819/ imagette221377471744094819/1744094366_1713358_1350558393_ec12b34916d4348c11f347416cb2ac7d_rle_crop_3750462618_0.png.png imagette221377471744094819/1744094366_1713358_1350558351_e3a62a48d8d83ceafa3f24dd2c05f9ef_rle_crop_3750462665_0.png.png imagette221377471744094819/1744094232_1943052_1350557817_07e0df5e9dcfb51350b51c9f11ca9ad9_rle_crop_3750462058_0.png.png imagette221377471744094819/1744094232_1943052_1350557820_af636f42f69281db5db947e49425b24c_rle_crop_3750461984_0.png.png imagette221377471744094819/1744094131_1941977_1350557270_98e500cd234b92f091a341c5ddf75e26_rle_crop_3750459625_0.png.png imagette221377471744094819/1744094357_1944010_1350558127_09ebe577ac801e9b59d78b73c6aa6a8c_rle_crop_3750462610_0.png.png imagette221377471744094819/1744094232_1943052_1350557820_af636f42f69281db5db947e49425b24c_rle_crop_3750461989_0.png.png imagette221377501744094820/ wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/f6996a3b73cb327ce9aed2b51c4f5308_67772555.png imagette221377471744094819 22137750 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=22137750 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221377501744094820 22137751 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=22137751 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350559426: '1744094731_1947374_1350558963_26240b76953cd51091c9a6bd4c4e3aec_rle_crop_3750466481_0.png'} change filename to text .imagette221377511744094820/ imagette221377511744094820/1744094731_1947374_1350558963_26240b76953cd51091c9a6bd4c4e3aec_rle_crop_3750466481_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/9ce31b8ea03f2598ac63f5a831dc5503_82684267.png imagette221377511744094820 22137752 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=22137752 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350557829: '1744093994_1940141_1350557117_7b056287ca69d6eae2ad5d0655737fc3_rle_crop_3750459001_0.png', 1350557830: '1744093994_1940141_1350557106_f026efb805a5ebede66b929236c6cc2d_rle_crop_3750459015_0.png', 1350558130: '1744094131_1941977_1350557697_0297b06f544146abc9798a691ba532a5_rle_crop_3750459619_0.png', 1350558131: '1744094131_1941977_1350557184_1b5a40ceed7f67fcdd15949691a157ad_rle_crop_3750459668_0.png', 1350559425: '1744094731_1947374_1350558963_26240b76953cd51091c9a6bd4c4e3aec_rle_crop_3750466485_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/3cf2333ee495351de56ac82c76ad4e57_61058668.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/924296954ee742da6aa3747d26de9152_34027140.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/ba8386ce12f2d548601cafe20f64b453_74093845.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/a5158dcd6ef2d98051afb72be66cdabf_52741900.png change filename to text .imagette221377521744094820/ imagette221377521744094820/1744094731_1947374_1350558963_26240b76953cd51091c9a6bd4c4e3aec_rle_crop_3750466485_0.png.png imagette221377521744094820/1744093994_1940141_1350557117_7b056287ca69d6eae2ad5d0655737fc3_rle_crop_3750459001_0.png.png imagette221377521744094820/1744094131_1941977_1350557184_1b5a40ceed7f67fcdd15949691a157ad_rle_crop_3750459668_0.png.png imagette221377521744094820/1744093994_1940141_1350557106_f026efb805a5ebede66b929236c6cc2d_rle_crop_3750459015_0.png.png imagette221377521744094820/1744094131_1941977_1350557697_0297b06f544146abc9798a691ba532a5_rle_crop_3750459619_0.png.png imagette221377541744094820/ wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/77f309ff2e8ae4cb1dfd2d79151750e1_81616707.png imagette221377521744094820 22137754 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=22137754 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221377541744094820 22137744 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=22137744 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350557826: '1744093994_1940141_1350557123_4c973db4a9b7517730f6ab9fb3eba02b_rle_crop_3750458968_0.png', 1350558099: '1744094112_1941689_1350557668_5d8268e89ee563f0b3cb073897eab5cc_rle_crop_3750459494_0.png', 1350558100: '1744094112_1941689_1350557668_5d8268e89ee563f0b3cb073897eab5cc_rle_crop_3750459495_0.png', 1350558405: '1744094246_1769090_1350557999_e81f3bf1db1eb7a05991c118387ce56c_rle_crop_3750461022_0.png', 1350558406: '1744094232_1943052_1350558019_b2d91823ad07d79fbc62dc5a81778c81_rle_crop_3750460478_0.png', 1350558407: '1744094232_1943052_1350557825_1ffcdc5732a43dad095a8595be1ddcef_rle_crop_3750460504_0.png', 1350558408: '1744094232_1943052_1350557808_6bdbfe8ad63b14bec91d3e05572781a6_rle_crop_3750462128_0.png', 1350558707: '1744094357_1944010_1350558127_09ebe577ac801e9b59d78b73c6aa6a8c_rle_crop_3750462612_0.png', 1350559431: '1744094712_1946988_1350559183_13f23a97c4949285a528726fa4068a44_rle_crop_3750466941_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/b55979a3075b161fc36e526c480e11b9_40779739.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/541ac0cb85f3ef8296412e5c3f1e38a1_91804702.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/67c946a76460c764be54d161cbd2c419_30849384.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/0a146baca8b926a41e61cace62d4ec6a_77795848.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/741e5dd8de61fb72548c2fa8bbcfe78b_5972420.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/dcc2c3fa042f37c4d718b0fbb77c14b7_99661690.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/c6e01ab5d5120f4707d66f8baddc38b2_1527158.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/2d9b3aafb306d7f3255a81568a3c70f1_59559183.png change filename to text .imagette221377441744094820/ imagette221377441744094820/1744094357_1944010_1350558127_09ebe577ac801e9b59d78b73c6aa6a8c_rle_crop_3750462612_0.png.png imagette221377441744094820/1744094232_1943052_1350557808_6bdbfe8ad63b14bec91d3e05572781a6_rle_crop_3750462128_0.png.png imagette221377441744094820/1744094112_1941689_1350557668_5d8268e89ee563f0b3cb073897eab5cc_rle_crop_3750459494_0.png.png imagette221377441744094820/1744094112_1941689_1350557668_5d8268e89ee563f0b3cb073897eab5cc_rle_crop_3750459495_0.png.png imagette221377441744094820/1744094232_1943052_1350558019_b2d91823ad07d79fbc62dc5a81778c81_rle_crop_3750460478_0.png.png imagette221377441744094820/1744093994_1940141_1350557123_4c973db4a9b7517730f6ab9fb3eba02b_rle_crop_3750458968_0.png.png imagette221377441744094820/1744094712_1946988_1350559183_13f23a97c4949285a528726fa4068a44_rle_crop_3750466941_0.png.png imagette221377441744094820/1744094246_1769090_1350557999_e81f3bf1db1eb7a05991c118387ce56c_rle_crop_3750461022_0.png.png imagette221377441744094820/1744094232_1943052_1350557825_1ffcdc5732a43dad095a8595be1ddcef_rle_crop_3750460504_0.png.png wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/b70180765de0735f3ef7a74e1bf8318d_91501058.png imagette221377441744094820 22137748 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=22137748 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350558102: '1744094112_1941689_1350557668_5d8268e89ee563f0b3cb073897eab5cc_rle_crop_3750459490_0.png', 1350558416: '1744094246_1769090_1350557940_aa28c27ee32d95c14903b01797ddc69c_rle_crop_3750462045_0.png', 1350558421: '1744094232_1943052_1350557825_1ffcdc5732a43dad095a8595be1ddcef_rle_crop_3750460503_0.png', 1350558422: '1744094232_1943052_1350557820_af636f42f69281db5db947e49425b24c_rle_crop_3750461986_0.png', 1350558423: '1744094232_1943052_1350557820_af636f42f69281db5db947e49425b24c_rle_crop_3750461983_0.png', 1350558424: '1744094232_1943052_1350557817_07e0df5e9dcfb51350b51c9f11ca9ad9_rle_crop_3750462059_0.png', 1350558425: '1744094232_1943052_1350557817_07e0df5e9dcfb51350b51c9f11ca9ad9_rle_crop_3750462062_0.png', 1350558426: '1744094232_1943052_1350557813_7c8516e51e62e00d50fd0e311b6cb339_rle_crop_3750462115_0.png', 1350558723: '1744094357_1944010_1350558127_09ebe577ac801e9b59d78b73c6aa6a8c_rle_crop_3750462609_0.png', 1350558724: '1744094357_1944010_1350558121_0ea1484a8616ab0e0cfcefe3d5e07a28_rle_crop_3750462634_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/6904c6a86b260dbb423d2923136c8e2b_40588768.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/c2ca9ed149dc3a55fd4e2831b9940dc7_94083462.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/b8b4b086391dc74a5c46bac8f0713106_36044992.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/e8fae5ccde9a8705e5e5cdd6776a4d7c_7590653.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/6827897d8f705fcd787c5a21f9499d52_17158367.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/3636200535b851ea6584bbcccec99dd8_96561935.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/3399b1a09a5619c36ee8c633215a6ba2_68232115.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/e72a223d17cab56d9ce237b6e7740b76_82735607.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/14c3c07151b092603645b80cb44d4ee9_5397657.png change filename to text .imagette221377481744094820/ imagette221377481744094820/1744094112_1941689_1350557668_5d8268e89ee563f0b3cb073897eab5cc_rle_crop_3750459490_0.png.png imagette221377481744094820/1744094357_1944010_1350558127_09ebe577ac801e9b59d78b73c6aa6a8c_rle_crop_3750462609_0.png.png imagette221377481744094820/1744094246_1769090_1350557940_aa28c27ee32d95c14903b01797ddc69c_rle_crop_3750462045_0.png.png imagette221377481744094820/1744094232_1943052_1350557813_7c8516e51e62e00d50fd0e311b6cb339_rle_crop_3750462115_0.png.png imagette221377481744094820/1744094232_1943052_1350557825_1ffcdc5732a43dad095a8595be1ddcef_rle_crop_3750460503_0.png.png imagette221377481744094820/1744094232_1943052_1350557817_07e0df5e9dcfb51350b51c9f11ca9ad9_rle_crop_3750462062_0.png.png imagette221377481744094820/1744094357_1944010_1350558121_0ea1484a8616ab0e0cfcefe3d5e07a28_rle_crop_3750462634_0.png.png imagette221377481744094820/1744094232_1943052_1350557820_af636f42f69281db5db947e49425b24c_rle_crop_3750461983_0.png.png imagette221377481744094820/1744094232_1943052_1350557820_af636f42f69281db5db947e49425b24c_rle_crop_3750461986_0.png.png imagette221377481744094820/1744094232_1943052_1350557817_07e0df5e9dcfb51350b51c9f11ca9ad9_rle_crop_3750462059_0.png.png wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/a244b1324577a6b24f48bc22ec7f5a3f_32847103.png imagette221377481744094820 22137749 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=22137749 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350557832: '1744093994_1940141_1350557123_4c973db4a9b7517730f6ab9fb3eba02b_rle_crop_3750458964_0.png', 1350557833: '1744093994_1940141_1350557117_7b056287ca69d6eae2ad5d0655737fc3_rle_crop_3750458998_0.png', 1350557834: '1744093994_1940141_1350557106_f026efb805a5ebede66b929236c6cc2d_rle_crop_3750459016_0.png', 1350558410: '1744094246_1769090_1350557985_b716f0b5254bc629464f764b3a8982fd_rle_crop_3750462028_0.png', 1350558411: '1744094246_1769090_1350557940_aa28c27ee32d95c14903b01797ddc69c_rle_crop_3750462044_0.png', 1350558732: '1744094366_1713358_1350558260_463fa50237b8656bdbb480149a31e8e4_rle_crop_3750462693_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/a02f724a89bd430b8ec8680345bb62ed_71571030.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/d8a42e41ddd41bb678b1ac89c3883d6f_24727569.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/640767f459b71ebe51410a3c0cd19858_63456734.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/ed5ab095f4a460817cba973daee08fa2_13886875.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/6520e7f5c7eeb60e5938f17e852bac6c_37104907.png change filename to text .imagette221377491744094821/ imagette221377491744094821/1744094246_1769090_1350557985_b716f0b5254bc629464f764b3a8982fd_rle_crop_3750462028_0.png.png imagette221377491744094821/1744093994_1940141_1350557117_7b056287ca69d6eae2ad5d0655737fc3_rle_crop_3750458998_0.png.png imagette221377491744094821/1744093994_1940141_1350557123_4c973db4a9b7517730f6ab9fb3eba02b_rle_crop_3750458964_0.png.png imagette221377491744094821/1744094366_1713358_1350558260_463fa50237b8656bdbb480149a31e8e4_rle_crop_3750462693_0.png.png imagette221377491744094821/1744094246_1769090_1350557940_aa28c27ee32d95c14903b01797ddc69c_rle_crop_3750462044_0.png.png imagette221377491744094821/1744093994_1940141_1350557106_f026efb805a5ebede66b929236c6cc2d_rle_crop_3750459016_0.png.png wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/46816bde2d440dd08fbf5ba6aadcef3f_76557972.png imagette221377491744094821 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22137741 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22137756,22137757,22137758,22137759,22137760,22137761,22137762,22137763,22137764,22137765,22137766,22137767?tags=Teint_Dans_La_Masse,metal,plastique,cartonnette,Carton_brun,Carton_gris,flou,kraft,autre_refus,papier,mal_croppe,environnement your option no_mail is active, we will not send the real mail to your client args[1350559393] : ('0.032200891427552544',) no score found for photo 1350559393 We are sending mail with results at report@fotonower.com args[1350559389] : ('0.032200891427552544',) no score found for photo 1350559389 We are sending mail with results at report@fotonower.com args[1350559384] : ('0.032200891427552544',) no score found for photo 1350559384 We are sending mail with results at report@fotonower.com args[1350559374] : ('0.032200891427552544',) no score found for photo 1350559374 We are sending mail with results at report@fotonower.com args[1350559372] : ('0.032200891427552544',) no score found for photo 1350559372 We are sending mail with results at report@fotonower.com args[1350559341] : ('0.032200891427552544',) no score found for photo 1350559341 We are sending mail with results at report@fotonower.com refus_total : 0.032200891427552544 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=22137741 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_P22137741_08-04-2025_08_46_59.pdf results_Auto_P22137741_08-04-2025_08_46_59.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22137741_08-04-2025_08_46_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','22137741','results_Auto_P22137741_08-04-2025_08_46_59.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22137741_08-04-2025_08_46_59.pdf','pdf','','0.17','0.032200891427552544') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22137741]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1350559393, 1350559389, 1350559384, 1350559374, 1350559372, 1350559341] map_info['map_portfolio_photo'] : {22137741: [1350559393, 1350559389, 1350559384, 1350559374, 1350559372, 1350559341, 1350559195, 1350559191, 1350559187, 1350559183, 1350559040, 1350559038, 1350559034, 1350559030, 1350558970, 1350558963, 1350558917, 1350558756, 1350558393, 1350558361, 1350558356, 1350558351, 1350558331, 1350558260, 1350558140, 1350558135, 1350558127, 1350558121, 1350558019, 1350558015, 1350557999, 1350557985, 1350557940, 1350557931, 1350557828, 1350557825, 1350557820, 1350557817, 1350557813, 1350557808, 1350557697, 1350557690, 1350557668, 1350557340, 1350557270, 1350557200, 1350557190, 1350557184, 1350557123, 1350557117, 1350557106, 1350557072]} final : False mtd_id 4302 list_pids : [1350559393, 1350559389, 1350559384, 1350559374, 1350559372, 1350559341] 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, '2731844') ('4302', '22137741', '1350559393', None, None, None, None, None, '2731844') ('4302', None, None, None, None, None, None, None, '2731844') ('4302', '22137741', '1350559389', None, None, None, None, None, '2731844') ('4302', None, None, None, None, None, None, None, '2731844') ('4302', '22137741', '1350559384', None, None, None, None, None, '2731844') ('4302', None, None, None, None, None, None, None, '2731844') ('4302', '22137741', '1350559374', None, None, None, None, None, '2731844') ('4302', None, None, None, None, None, None, None, '2731844') ('4302', '22137741', '1350559372', None, None, None, None, None, '2731844') ('4302', None, None, None, None, None, None, None, '2731844') ('4302', '22137741', '1350559341', None, None, None, None, None, '2731844') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '22137741', '1350559393', None, None, None, None, None, '2731844'), ('4302', '22137741', '1350559389', None, None, None, None, None, '2731844'), ('4302', '22137741', '1350559384', None, None, None, None, None, '2731844'), ('4302', '22137741', '1350559374', None, None, None, None, None, '2731844'), ('4302', '22137741', '1350559372', None, None, None, None, None, '2731844'), ('4302', '22137741', '1350559341', None, None, None, None, None, '2731844')] time used for this insertion : 0.017801761627197266 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.4849772453308105 time spend to save output : 0.018062829971313477 total time spend for step 4 : 3.503040075302124 step5:split_time_score Tue Apr 8 08:47:02 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 : ['22137741'] 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 : [('22137741',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22137741) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1350559341: {'path': 'temp/1744094819_414475_1350559341_8c00d4ac0c372d9ee6094539d47a19ae.jpg', 'extension': 'jpg'}, 1350559372: {'path': 'temp/1744094819_414475_1350559372_e6bb0e34e7bfd5e771e29329c4685898.jpg', 'extension': 'jpg'}, 1350559389: {'path': 'temp/1744094819_414475_1350559389_16dcb273effefcc1b381e45f621df6df.jpg', 'extension': 'jpg'}, 1350559393: {'path': 'temp/1744094819_414475_1350559393_b14185463ef2e8c6e17da4438a42cfdc.jpg', 'extension': 'jpg'}, 1350559374: {'path': 'temp/1744094819_414475_1350559374_3c25ce6c88d7ec2d75ae8fa3acd268d7.jpg', 'extension': 'jpg'}, 1350559384: {'path': 'temp/1744094819_414475_1350559384_a8b0e0260dee9c2ba234e55b5dba0396.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 = 22137741; (('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 = 22137741 group by h (('08', 52),) 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=22137741 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 (22137741) 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 (22137741) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 08042025 22137741 Nombre de photos uploadées : 52 / 23040 (0%) 08042025 22137741 Nombre de photos taguées (types de déchets): 0 / 52 (0%) 08042025 22137741 Nombre de photos taguées (volume) : 0 / 52 (0%) [{'photo_id': 1350557123, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/4c973db4a9b7517730f6ab9fb3eba02b.jpg', 'username': None, 'uploaded_at': 1744093867, 'text': 'image_08042025_08_30_05_10141.jpg'}, {'photo_id': 1350557117, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/7b056287ca69d6eae2ad5d0655737fc3.jpg', 'username': None, 'uploaded_at': 1744093867, 'text': 'image_08042025_08_30_14_9126.jpg'}, {'photo_id': 1350557106, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/f026efb805a5ebede66b929236c6cc2d.jpg', 'username': None, 'uploaded_at': 1744093867, 'text': 'image_08042025_08_30_24_10134.jpg'}, {'photo_id': 1350557072, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/d9b758a15471814f0e3fdd01f93cede7.jpg', 'username': None, 'uploaded_at': 1744093867, 'text': 'image_08042025_08_30_34_10144.jpg'}] 0 [] elapsed_time : load_data_split_time_score 4.291534423828125e-06 elapsed_time : order_list_meta_photo_and_scores 1.2874603271484375e-05 ???????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.003186941146850586 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 22137741, '2025-04-08' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1722494,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.02571868896484375 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= 1722494 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1722494, 'dashboard_run_id': 1731287, 'mtr_portfolio_id': 22136534, 'dashboard_result_id': 9928750, '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_P22136534_08-04-2025_08_17_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22136536, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22136537, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22136538, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22136539, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22136540, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22136541, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22136542, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22136543, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22136544, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22136545, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22136546, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22136547, 'pht': 3726}}"}, {'dashboat_entry_day': 1722494, 'dashboard_run_id': 1731287, 'mtr_portfolio_id': 22137237, 'dashboard_result_id': 9928751, '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_P22137237_08-04-2025_08_33_01.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22137274, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22137275, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22137276, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22137277, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22137278, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22137279, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22137280, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22137281, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22137282, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22137283, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22137284, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22137285, 'pht': 3726}}"}, {'dashboat_entry_day': 1722494, 'dashboard_run_id': 1731287, 'mtr_portfolio_id': 22137741, 'dashboard_result_id': 9928752, '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_P22137741_08-04-2025_08_45_01.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22137744, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22137745, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22137746, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22137747, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22137748, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22137749, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22137750, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22137751, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22137752, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22137753, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22137754, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22137755, '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 = 22136534 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': 2731751, 'mtr_portfolio_id': 22136534, 'created_at': datetime.datetime(2025, 4, 8, 8, 17, 1), 'result': '0.10032748638546446', 'result_long': None, 'result_double': None}] Qualite : 0.10032748638546446 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22136534 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22136534_08-04-2025_08_17_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22136534 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_P22136534_08-04-2025_08_17_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22136536, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22136537, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22136538, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22136539, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22136540, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22136541, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22136542, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22136543, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22136544, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22136545, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22136546, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22136547, 'pht': 3726}}" where mtr_portfolio_id = 22136534 and dashboard_run_id = 1731287 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`=22136534 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9928750, 0.10032748638546446, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22136534_08-04-2025_08_17_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22136536, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22136537, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22136538, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22136539, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22136540, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22136541, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22136542, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22136543, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22136544, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22136545, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22136546, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22136547, '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 = 22137237 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': 2731792, 'mtr_portfolio_id': 22137237, 'created_at': datetime.datetime(2025, 4, 8, 8, 33, 1), 'result': '0.047853802070531186', 'result_long': None, 'result_double': None}] Qualite : 0.047853802070531186 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22137237 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22137237_08-04-2025_08_33_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22137237 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_P22137237_08-04-2025_08_33_01.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22137274, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22137275, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22137276, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22137277, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22137278, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22137279, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22137280, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22137281, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22137282, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22137283, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22137284, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22137285, 'pht': 3726}}" where mtr_portfolio_id = 22137237 and dashboard_run_id = 1731287 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`=22137237 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9928751, 0.047853802070531186, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22137237_08-04-2025_08_33_01.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22137274, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22137275, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22137276, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22137277, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22137278, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22137279, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22137280, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22137281, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22137282, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22137283, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22137284, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22137285, '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 = 22137741 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': 2731844, 'mtr_portfolio_id': 22137741, 'created_at': datetime.datetime(2025, 4, 8, 8, 46, 59), 'result': '0.032200891427552544', 'result_long': None, 'result_double': None}] Qualite : 0.032200891427552544 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22137741 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22137741_08-04-2025_08_46_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22137741 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_P22137741_08-04-2025_08_46_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22137744, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22137745, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22137746, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22137747, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22137748, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22137749, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22137750, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22137751, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22137752, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22137753, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22137754, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22137755, 'pht': 3726}}" where mtr_portfolio_id = 22137741 and dashboard_run_id = 1731287 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`=22137741 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9928752, 0.032200891427552544, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22137741_08-04-2025_08_46_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22137744, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22137745, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22137746, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22137747, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22137748, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22137749, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22137750, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22137751, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22137752, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22137753, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22137754, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22137755, '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 (22136534,22137237,22137741) result : ((1350551193,), (1350551235,), (1350551271,), (1350551914,), (1350551971,), (1350552017,), (1350552085,), (1350553228,), (1350553241,), (1350553319,), (1350553324,), (1350553391,), (1350553408,), (1350553564,), (1350553588,), (1350553603,), (1350553626,), (1350553736,), (1350553775,), (1350553808,), (1350553812,), (1350553814,), (1350553980,), (1350553988,), (1350554096,), (1350554099,), (1350554103,), (1350554109,), (1350554139,), (1350554194,), (1350554197,), (1350554488,), (1350554978,), (1350554973,), (1350555666,), (1350555676,), (1350555689,), (1350555692,), (1350555695,), (1350555774,), (1350555777,), (1350555787,), (1350555836,), (1350556062,), (1350556064,), (1350556072,), (1350556096,), (1350556119,), (1350556216,), (1350556218,), (1350556222,), (1350556285,), (1350556296,), (1350556304,), (1350556313,), (1350556319,), (1350556330,), (1350556357,), (1350556362,), (1350556365,), (1350556368,), (1350556372,), (1350556398,), (1350556407,), (1350556412,), (1350556417,), (1350556462,), (1350556469,), (1350556474,), (1350556478,), (1350556482,), (1350556511,), (1350556518,), (1350556521,), (1350556604,), (1350556608,), (1350556612,), (1350556616,), (1350556620,), (1350556624,), (1350556773,), (1350556974,), (1350556978,), (1350557127,), (1350557072,), (1350557106,), (1350557117,), (1350557123,), (1350557184,), (1350557190,), (1350557200,), (1350557270,), (1350557340,), (1350557668,), (1350557690,), (1350557697,), (1350557808,), (1350557813,), (1350557817,), (1350557820,), (1350557825,), (1350557828,), (1350557931,), (1350557940,), (1350557985,), (1350557999,), (1350558015,), (1350558019,), (1350558121,), (1350558127,), (1350558135,), (1350558140,), (1350558260,), (1350558331,), (1350558351,), (1350558356,), (1350558361,), (1350558393,), (1350558756,), (1350558917,), (1350558963,), (1350558970,), (1350559030,), (1350559034,), (1350559038,), (1350559040,), (1350559183,), (1350559187,), (1350559191,), (1350559195,), (1350559341,), (1350559372,), (1350559374,), (1350559384,), (1350559389,), (1350559393,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'08042025': {'nb_upload': 52, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22137741]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1350559393, 1350559389, 1350559384, 1350559374, 1350559372, 1350559341] map_info['map_portfolio_photo'] : {22137741: [1350559393, 1350559389, 1350559384, 1350559374, 1350559372, 1350559341, 1350559195, 1350559191, 1350559187, 1350559183, 1350559040, 1350559038, 1350559034, 1350559030, 1350558970, 1350558963, 1350558917, 1350558756, 1350558393, 1350558361, 1350558356, 1350558351, 1350558331, 1350558260, 1350558140, 1350558135, 1350558127, 1350558121, 1350558019, 1350558015, 1350557999, 1350557985, 1350557940, 1350557931, 1350557828, 1350557825, 1350557820, 1350557817, 1350557813, 1350557808, 1350557697, 1350557690, 1350557668, 1350557340, 1350557270, 1350557200, 1350557190, 1350557184, 1350557123, 1350557117, 1350557106, 1350557072]} final : True mtd_id 4302 list_pids : [1350559393, 1350559389, 1350559384, 1350559374, 1350559372, 1350559341] Looping around the photos to save general results len do output : 1 /22137741Didn'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, '2731844') ('4302', '22137741', '1350559393', None, None, None, None, None, '2731844') ('4302', None, None, None, None, None, None, None, '2731844') ('4302', '22137741', '1350559389', None, None, None, None, None, '2731844') ('4302', None, None, None, None, None, None, None, '2731844') ('4302', '22137741', '1350559384', None, None, None, None, None, '2731844') ('4302', None, None, None, None, None, None, None, '2731844') ('4302', '22137741', '1350559374', None, None, None, None, None, '2731844') ('4302', None, None, None, None, None, None, None, '2731844') ('4302', '22137741', '1350559372', None, None, None, None, None, '2731844') ('4302', None, None, None, None, None, None, None, '2731844') ('4302', '22137741', '1350559341', None, None, None, None, None, '2731844') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 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, '22137741', 'None', None, None, None, None, '2731844'), ('4302', '22137741', '1350559393', None, None, None, None, None, '2731844'), ('4302', '22137741', '1350559389', None, None, None, None, None, '2731844'), ('4302', '22137741', '1350559384', None, None, None, None, None, '2731844'), ('4302', '22137741', '1350559374', None, None, None, None, None, '2731844'), ('4302', '22137741', '1350559372', None, None, None, None, None, '2731844'), ('4302', '22137741', '1350559341', None, None, None, None, None, '2731844')] time used for this insertion : 0.01323699951171875 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.2945253849029541 time spend to save output : 0.01352548599243164 total time spend for step 5 : 0.30805087089538574 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 (2731844) 2.16user 2.38system 0:08.52elapsed 53%CPU (0avgtext+0avgdata 158084maxresident)k 1480inputs+8408outputs (28major+63803minor)pagefaults 0swaps