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 : 4076022 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 (4281826) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (4281826) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29760415 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['4281826'] with mtr_portfolio_ids : ['29760415'] and first list_photo_ids : [] new path : /proc/4076022/ Name: python3 Umask: 0002 State: R (running) Tgid: 4076022 Ngid: 0 Pid: 4076022 PPid: 4076021 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 4076022 NSpid: 4076022 NSpgid: 4074733 NSsid: 4074733 VmPeak: 1113360 kB VmSize: 1113360 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 104672 kB VmRSS: 104672 kB RssAnon: 66312 kB RssFile: 38360 kB RssShmem: 0 kB VmData: 872088 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130476 kB VmPTE: 628 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63019 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: 43 nonvoluntary_ctxt_switches: 94 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '4076022', 'Ngid': '0', 'Pid': '4076022', 'PPid': '4076021', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '4076022', 'NSpid': '4076022', 'NSpgid': '4074733', 'NSsid': '4074733', 'VmPeak': '1113360 kB', 'VmSize': '1113360 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '104672 kB', 'VmRSS': '104672 kB', 'RssAnon': '66312 kB', 'RssFile': '38360 kB', 'RssShmem': '0 kB', 'VmData': '872088 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130476 kB', 'VmPTE': '628 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63019', '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': '43', 'nonvoluntary_ctxt_switches': '94'} ('datou_batch_current', '4076022', '1113360', '0', '1113360', '872088', '104672', b'', 'marlene', '4281826') 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_view ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (29760415) 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 (4281826 ) ) 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 (29760415) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1401478768, 'portfolio_id': 29760415}, {'photo_id': 1401478765, 'portfolio_id': 29760415}, {'photo_id': 1401478763, 'portfolio_id': 29760415}, {'photo_id': 1401478761, 'portfolio_id': 29760415}, {'photo_id': 1401478759, 'portfolio_id': 29760415}, {'photo_id': 1401478748, 'portfolio_id': 29760415}, {'photo_id': 1401478745, 'portfolio_id': 29760415}, {'photo_id': 1401478743, 'portfolio_id': 29760415}, {'photo_id': 1401478742, 'portfolio_id': 29760415}, {'photo_id': 1401478740, 'portfolio_id': 29760415}, {'photo_id': 1401478717, 'portfolio_id': 29760415}, {'photo_id': 1401478716, 'portfolio_id': 29760415}, {'photo_id': 1401478715, 'portfolio_id': 29760415}, {'photo_id': 1401478714, 'portfolio_id': 29760415}, {'photo_id': 1401478700, 'portfolio_id': 29760415}, {'photo_id': 1401478697, 'portfolio_id': 29760415}, {'photo_id': 1401478695, 'portfolio_id': 29760415}, {'photo_id': 1401478693, 'portfolio_id': 29760415}, {'photo_id': 1401478691, 'portfolio_id': 29760415}, {'photo_id': 1401478646, 'portfolio_id': 29760415}, {'photo_id': 1401478643, 'portfolio_id': 29760415}, {'photo_id': 1401478641, 'portfolio_id': 29760415}, {'photo_id': 1401478640, 'portfolio_id': 29760415}, {'photo_id': 1401478639, 'portfolio_id': 29760415}, {'photo_id': 1401478628, 'portfolio_id': 29760415}, {'photo_id': 1401478627, 'portfolio_id': 29760415}, {'photo_id': 1401478626, 'portfolio_id': 29760415}, {'photo_id': 1401478624, 'portfolio_id': 29760415}, {'photo_id': 1401478600, 'portfolio_id': 29760415}, {'photo_id': 1401478599, 'portfolio_id': 29760415}, {'photo_id': 1401478598, 'portfolio_id': 29760415}, {'photo_id': 1401478596, 'portfolio_id': 29760415}, {'photo_id': 1401478588, 'portfolio_id': 29760415}, {'photo_id': 1401478585, 'portfolio_id': 29760415}, {'photo_id': 1401478583, 'portfolio_id': 29760415}, {'photo_id': 1401478581, 'portfolio_id': 29760415}, {'photo_id': 1401478579, 'portfolio_id': 29760415}, {'photo_id': 1401478578, 'portfolio_id': 29760415}, {'photo_id': 1401478571, 'portfolio_id': 29760415}, {'photo_id': 1401478569, 'portfolio_id': 29760415}, {'photo_id': 1401478568, 'portfolio_id': 29760415}, {'photo_id': 1401478561, 'portfolio_id': 29760415}, {'photo_id': 1401478552, 'portfolio_id': 29760415}, {'photo_id': 1401478549, 'portfolio_id': 29760415}, {'photo_id': 1401478546, 'portfolio_id': 29760415}, {'photo_id': 1401478543, 'portfolio_id': 29760415}, {'photo_id': 1401478541, 'portfolio_id': 29760415}, {'photo_id': 1401478525, 'portfolio_id': 29760415}, {'photo_id': 1401478522, 'portfolio_id': 29760415}, {'photo_id': 1401478520, 'portfolio_id': 29760415}, {'photo_id': 1401478518, 'portfolio_id': 29760415}, {'photo_id': 1401478517, 'portfolio_id': 29760415}, {'photo_id': 1401478514, 'portfolio_id': 29760415}, {'photo_id': 1401478495, 'portfolio_id': 29760415}, {'photo_id': 1401478494, 'portfolio_id': 29760415}, {'photo_id': 1401478493, 'portfolio_id': 29760415}] map_portfolio_id_photo_id: {29760415: [1401478768, 1401478765, 1401478763, 1401478761, 1401478759, 1401478748, 1401478745, 1401478743, 1401478742, 1401478740, 1401478717, 1401478716, 1401478715, 1401478714, 1401478700, 1401478697, 1401478695, 1401478693, 1401478691, 1401478646, 1401478643, 1401478641, 1401478640, 1401478639, 1401478628, 1401478627, 1401478626, 1401478624, 1401478600, 1401478599, 1401478598, 1401478596, 1401478588, 1401478585, 1401478583, 1401478581, 1401478579, 1401478578, 1401478571, 1401478569, 1401478568, 1401478561, 1401478552, 1401478549, 1401478546, 1401478543, 1401478541, 1401478525, 1401478522, 1401478520, 1401478518, 1401478517, 1401478514, 1401478495, 1401478494, 1401478493]} ##### 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.018411636352539062 #### 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 Mon Dec 29 05:42: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 (29760415) 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 : 29760415 get user id for portfolio 29760415 get sub ptf for main ptf 29760415, type 3726 and hashtags ['Teint_Dans_La_Masse', 'Carton_brun', 'mal_croppe', 'autre_refus', 'papier', 'environnement', 'Carton_gris', 'kraft', 'cartonnette', 'plastique', 'metal', 'flou'] 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`=29760415 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','Carton_brun','mal_croppe','autre_refus','papier','environnement','Carton_gris','kraft','cartonnette','plastique','metal','flou')) 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`=29760415 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','Carton_brun','mal_croppe','autre_refus','papier','environnement','Carton_gris','kraft','cartonnette','plastique','metal','flou')) AND mptpi.`min_score`=0.5 To do returned map {'cartonnette': {'main_port_id': 29760415, 'sub_port_id': 29760420, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342419, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 27)}, 'autre_refus': {'main_port_id': 29760415, 'sub_port_id': 29760421, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342420, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 27)}, 'Carton_brun': {'main_port_id': 29760415, 'sub_port_id': 29760422, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342421, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 27)}, 'kraft': {'main_port_id': 29760415, 'sub_port_id': 29760423, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342422, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 27)}, 'environnement': {'main_port_id': 29760415, 'sub_port_id': 29760424, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342423, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 27)}, 'Teint_Dans_La_Masse': {'main_port_id': 29760415, 'sub_port_id': 29760425, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342424, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 27)}, 'papier': {'main_port_id': 29760415, 'sub_port_id': 29760426, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342425, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 27)}, 'plastique': {'main_port_id': 29760415, 'sub_port_id': 29760427, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342426, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 27)}, 'metal': {'main_port_id': 29760415, 'sub_port_id': 29760428, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342427, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 27)}, 'flou': {'main_port_id': 29760415, 'sub_port_id': 29760429, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342428, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 27)}, 'Carton_gris': {'main_port_id': 29760415, 'sub_port_id': 29760430, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342429, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 27)}, 'mal_croppe': {'main_port_id': 29760415, 'sub_port_id': 29760431, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342430, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 27)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 29760420 , 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=29760415 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 (29760420) result : ((1401478617,), (1401478618,), (1401478681,), (1401478723,), (1401478771,), (1401478772,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29760415) result : ((1401478493,), (1401478494,), (1401478495,), (1401478514,), (1401478517,), (1401478518,), (1401478520,), (1401478522,), (1401478525,), (1401478541,), (1401478543,), (1401478546,), (1401478549,), (1401478552,), (1401478561,), (1401478568,), (1401478569,), (1401478571,), (1401478578,), (1401478579,), (1401478581,), (1401478583,), (1401478585,), (1401478588,), (1401478596,), (1401478598,), (1401478599,), (1401478600,), (1401478624,), (1401478626,), (1401478627,), (1401478628,), (1401478639,), (1401478640,), (1401478641,), (1401478643,), (1401478646,), (1401478691,), (1401478693,), (1401478695,), (1401478697,), (1401478700,), (1401478714,), (1401478715,), (1401478716,), (1401478717,), (1401478740,), (1401478742,), (1401478743,), (1401478745,), (1401478748,), (1401478759,), (1401478761,), (1401478763,), (1401478765,), (1401478768,)) 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 (1401478700,1401478600) 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 29760421 , 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=29760415 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 (29760421) result : ((1401478615,), (1401478721,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29760415) result : ((1401478493,), (1401478494,), (1401478495,), (1401478514,), (1401478517,), (1401478518,), (1401478520,), (1401478522,), (1401478525,), (1401478541,), (1401478543,), (1401478546,), (1401478549,), (1401478552,), (1401478561,), (1401478568,), (1401478569,), (1401478571,), (1401478578,), (1401478579,), (1401478581,), (1401478583,), (1401478585,), (1401478588,), (1401478596,), (1401478598,), (1401478599,), (1401478600,), (1401478624,), (1401478626,), (1401478627,), (1401478628,), (1401478639,), (1401478640,), (1401478641,), (1401478643,), (1401478646,), (1401478691,), (1401478693,), (1401478695,), (1401478697,), (1401478700,), (1401478714,), (1401478715,), (1401478716,), (1401478717,), (1401478740,), (1401478742,), (1401478743,), (1401478745,), (1401478748,), (1401478759,), (1401478761,), (1401478763,), (1401478765,), (1401478768,)) 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 (1401478700,1401478600) 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 29760422 , 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=29760415 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 (29760422) result : ((1401478620,), (1401478684,), (1401478685,), (1401478686,), (1401478687,), (1401478736,), (1401478737,), (1401478773,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29760415) result : ((1401478493,), (1401478494,), (1401478495,), (1401478514,), (1401478517,), (1401478518,), (1401478520,), (1401478522,), (1401478525,), (1401478541,), (1401478543,), (1401478546,), (1401478549,), (1401478552,), (1401478561,), (1401478568,), (1401478569,), (1401478571,), (1401478578,), (1401478579,), (1401478581,), (1401478583,), (1401478585,), (1401478588,), (1401478596,), (1401478598,), (1401478599,), (1401478600,), (1401478624,), (1401478626,), (1401478627,), (1401478628,), (1401478639,), (1401478640,), (1401478641,), (1401478643,), (1401478646,), (1401478691,), (1401478693,), (1401478695,), (1401478697,), (1401478700,), (1401478714,), (1401478715,), (1401478716,), (1401478717,), (1401478740,), (1401478742,), (1401478743,), (1401478745,), (1401478748,), (1401478759,), (1401478761,), (1401478763,), (1401478765,), (1401478768,)) 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 (1401478700,1401478600) 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 29760423 , 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=29760415 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 (29760423) result : ((1401478689,), (1401478690,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29760415) result : ((1401478493,), (1401478494,), (1401478495,), (1401478514,), (1401478517,), (1401478518,), (1401478520,), (1401478522,), (1401478525,), (1401478541,), (1401478543,), (1401478546,), (1401478549,), (1401478552,), (1401478561,), (1401478568,), (1401478569,), (1401478571,), (1401478578,), (1401478579,), (1401478581,), (1401478583,), (1401478585,), (1401478588,), (1401478596,), (1401478598,), (1401478599,), (1401478600,), (1401478624,), (1401478626,), (1401478627,), (1401478628,), (1401478639,), (1401478640,), (1401478641,), (1401478643,), (1401478646,), (1401478691,), (1401478693,), (1401478695,), (1401478697,), (1401478700,), (1401478714,), (1401478715,), (1401478716,), (1401478717,), (1401478740,), (1401478742,), (1401478743,), (1401478745,), (1401478748,), (1401478759,), (1401478761,), (1401478763,), (1401478765,), (1401478768,)) 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 (1401478700,1401478600) 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 29760424 , 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=29760415 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 (29760424) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29760415) result : ((1401478493,), (1401478494,), (1401478495,), (1401478514,), (1401478517,), (1401478518,), (1401478520,), (1401478522,), (1401478525,), (1401478541,), (1401478543,), (1401478546,), (1401478549,), (1401478552,), (1401478561,), (1401478568,), (1401478569,), (1401478571,), (1401478578,), (1401478579,), (1401478581,), (1401478583,), (1401478585,), (1401478588,), (1401478596,), (1401478598,), (1401478599,), (1401478600,), (1401478624,), (1401478626,), (1401478627,), (1401478628,), (1401478639,), (1401478640,), (1401478641,), (1401478643,), (1401478646,), (1401478691,), (1401478693,), (1401478695,), (1401478697,), (1401478700,), (1401478714,), (1401478715,), (1401478716,), (1401478717,), (1401478740,), (1401478742,), (1401478743,), (1401478745,), (1401478748,), (1401478759,), (1401478761,), (1401478763,), (1401478765,), (1401478768,)) 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 (1401478700,1401478600) 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 29760425 , 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=29760415 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 (29760425) result : ((1401478656,), (1401478657,), (1401478658,), (1401478659,), (1401478660,), (1401478661,), (1401478732,), (1401478733,), (1401478734,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29760415) result : ((1401478493,), (1401478494,), (1401478495,), (1401478514,), (1401478517,), (1401478518,), (1401478520,), (1401478522,), (1401478525,), (1401478541,), (1401478543,), (1401478546,), (1401478549,), (1401478552,), (1401478561,), (1401478568,), (1401478569,), (1401478571,), (1401478578,), (1401478579,), (1401478581,), (1401478583,), (1401478585,), (1401478588,), (1401478596,), (1401478598,), (1401478599,), (1401478600,), (1401478624,), (1401478626,), (1401478627,), (1401478628,), (1401478639,), (1401478640,), (1401478641,), (1401478643,), (1401478646,), (1401478691,), (1401478693,), (1401478695,), (1401478697,), (1401478700,), (1401478714,), (1401478715,), (1401478716,), (1401478717,), (1401478740,), (1401478742,), (1401478743,), (1401478745,), (1401478748,), (1401478759,), (1401478761,), (1401478763,), (1401478765,), (1401478768,)) 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 (1401478700,1401478600) 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 29760426 , 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=29760415 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 (29760426) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29760415) result : ((1401478493,), (1401478494,), (1401478495,), (1401478514,), (1401478517,), (1401478518,), (1401478520,), (1401478522,), (1401478525,), (1401478541,), (1401478543,), (1401478546,), (1401478549,), (1401478552,), (1401478561,), (1401478568,), (1401478569,), (1401478571,), (1401478578,), (1401478579,), (1401478581,), (1401478583,), (1401478585,), (1401478588,), (1401478596,), (1401478598,), (1401478599,), (1401478600,), (1401478624,), (1401478626,), (1401478627,), (1401478628,), (1401478639,), (1401478640,), (1401478641,), (1401478643,), (1401478646,), (1401478691,), (1401478693,), (1401478695,), (1401478697,), (1401478700,), (1401478714,), (1401478715,), (1401478716,), (1401478717,), (1401478740,), (1401478742,), (1401478743,), (1401478745,), (1401478748,), (1401478759,), (1401478761,), (1401478763,), (1401478765,), (1401478768,)) 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 (1401478700,1401478600) 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 29760427 , 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=29760415 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 (29760427) result : ((1401478567,), (1401478621,), (1401478738,), (1401478774,), (1401478775,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29760415) result : ((1401478493,), (1401478494,), (1401478495,), (1401478514,), (1401478517,), (1401478518,), (1401478520,), (1401478522,), (1401478525,), (1401478541,), (1401478543,), (1401478546,), (1401478549,), (1401478552,), (1401478561,), (1401478568,), (1401478569,), (1401478571,), (1401478578,), (1401478579,), (1401478581,), (1401478583,), (1401478585,), (1401478588,), (1401478596,), (1401478598,), (1401478599,), (1401478600,), (1401478624,), (1401478626,), (1401478627,), (1401478628,), (1401478639,), (1401478640,), (1401478641,), (1401478643,), (1401478646,), (1401478691,), (1401478693,), (1401478695,), (1401478697,), (1401478700,), (1401478714,), (1401478715,), (1401478716,), (1401478717,), (1401478740,), (1401478742,), (1401478743,), (1401478745,), (1401478748,), (1401478759,), (1401478761,), (1401478763,), (1401478765,), (1401478768,)) 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 (1401478700,1401478600) 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 29760428 , 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=29760415 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 (29760428) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29760415) result : ((1401478493,), (1401478494,), (1401478495,), (1401478514,), (1401478517,), (1401478518,), (1401478520,), (1401478522,), (1401478525,), (1401478541,), (1401478543,), (1401478546,), (1401478549,), (1401478552,), (1401478561,), (1401478568,), (1401478569,), (1401478571,), (1401478578,), (1401478579,), (1401478581,), (1401478583,), (1401478585,), (1401478588,), (1401478596,), (1401478598,), (1401478599,), (1401478600,), (1401478624,), (1401478626,), (1401478627,), (1401478628,), (1401478639,), (1401478640,), (1401478641,), (1401478643,), (1401478646,), (1401478691,), (1401478693,), (1401478695,), (1401478697,), (1401478700,), (1401478714,), (1401478715,), (1401478716,), (1401478717,), (1401478740,), (1401478742,), (1401478743,), (1401478745,), (1401478748,), (1401478759,), (1401478761,), (1401478763,), (1401478765,), (1401478768,)) 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 (1401478700,1401478600) 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 29760429 , 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=29760415 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 (29760429) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29760415) result : ((1401478493,), (1401478494,), (1401478495,), (1401478514,), (1401478517,), (1401478518,), (1401478520,), (1401478522,), (1401478525,), (1401478541,), (1401478543,), (1401478546,), (1401478549,), (1401478552,), (1401478561,), (1401478568,), (1401478569,), (1401478571,), (1401478578,), (1401478579,), (1401478581,), (1401478583,), (1401478585,), (1401478588,), (1401478596,), (1401478598,), (1401478599,), (1401478600,), (1401478624,), (1401478626,), (1401478627,), (1401478628,), (1401478639,), (1401478640,), (1401478641,), (1401478643,), (1401478646,), (1401478691,), (1401478693,), (1401478695,), (1401478697,), (1401478700,), (1401478714,), (1401478715,), (1401478716,), (1401478717,), (1401478740,), (1401478742,), (1401478743,), (1401478745,), (1401478748,), (1401478759,), (1401478761,), (1401478763,), (1401478765,), (1401478768,)) 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 (1401478700,1401478600) 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 29760430 , 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=29760415 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 (29760430) result : ((1401478565,), (1401478566,), (1401478616,), (1401478666,), (1401478667,), (1401478668,), (1401478669,), (1401478671,), (1401478673,), (1401478675,), (1401478676,), (1401478677,), (1401478678,), (1401478735,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29760415) result : ((1401478493,), (1401478494,), (1401478495,), (1401478514,), (1401478517,), (1401478518,), (1401478520,), (1401478522,), (1401478525,), (1401478541,), (1401478543,), (1401478546,), (1401478549,), (1401478552,), (1401478561,), (1401478568,), (1401478569,), (1401478571,), (1401478578,), (1401478579,), (1401478581,), (1401478583,), (1401478585,), (1401478588,), (1401478596,), (1401478598,), (1401478599,), (1401478600,), (1401478624,), (1401478626,), (1401478627,), (1401478628,), (1401478639,), (1401478640,), (1401478641,), (1401478643,), (1401478646,), (1401478691,), (1401478693,), (1401478695,), (1401478697,), (1401478700,), (1401478714,), (1401478715,), (1401478716,), (1401478717,), (1401478740,), (1401478742,), (1401478743,), (1401478745,), (1401478748,), (1401478759,), (1401478761,), (1401478763,), (1401478765,), (1401478768,)) 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 (1401478700,1401478600) 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 29760431 , 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=29760415 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 (29760431) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29760415) result : ((1401478493,), (1401478494,), (1401478495,), (1401478514,), (1401478517,), (1401478518,), (1401478520,), (1401478522,), (1401478525,), (1401478541,), (1401478543,), (1401478546,), (1401478549,), (1401478552,), (1401478561,), (1401478568,), (1401478569,), (1401478571,), (1401478578,), (1401478579,), (1401478581,), (1401478583,), (1401478585,), (1401478588,), (1401478596,), (1401478598,), (1401478599,), (1401478600,), (1401478624,), (1401478626,), (1401478627,), (1401478628,), (1401478639,), (1401478640,), (1401478641,), (1401478643,), (1401478646,), (1401478691,), (1401478693,), (1401478695,), (1401478697,), (1401478700,), (1401478714,), (1401478715,), (1401478716,), (1401478717,), (1401478740,), (1401478742,), (1401478743,), (1401478745,), (1401478748,), (1401478759,), (1401478761,), (1401478763,), (1401478765,), (1401478768,)) 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 (1401478700,1401478600) 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`=29760415 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','Carton_brun','mal_croppe','autre_refus','papier','environnement','Carton_gris','kraft','cartonnette','plastique','metal','flou')) 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`=29760415 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','Carton_brun','mal_croppe','autre_refus','papier','environnement','Carton_gris','kraft','cartonnette','plastique','metal','flou')) AND mptpi.`min_score`=0.5 To do returned map {'cartonnette': {'main_port_id': 29760415, 'sub_port_id': 29760432, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342431, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 29)}, 'autre_refus': {'main_port_id': 29760415, 'sub_port_id': 29760433, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342432, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 29)}, 'Carton_brun': {'main_port_id': 29760415, 'sub_port_id': 29760434, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342433, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 29)}, 'kraft': {'main_port_id': 29760415, 'sub_port_id': 29760435, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342434, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 29)}, 'environnement': {'main_port_id': 29760415, 'sub_port_id': 29760436, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342435, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 29)}, 'Teint_Dans_La_Masse': {'main_port_id': 29760415, 'sub_port_id': 29760437, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342436, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 29)}, 'papier': {'main_port_id': 29760415, 'sub_port_id': 29760438, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342437, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 29)}, 'plastique': {'main_port_id': 29760415, 'sub_port_id': 29760439, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342438, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 29)}, 'metal': {'main_port_id': 29760415, 'sub_port_id': 29760440, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342439, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 29)}, 'flou': {'main_port_id': 29760415, 'sub_port_id': 29760441, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342440, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 29)}, 'Carton_gris': {'main_port_id': 29760415, 'sub_port_id': 29760442, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342441, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 29)}, 'mal_croppe': {'main_port_id': 29760415, 'sub_port_id': 29760443, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342442, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 29)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29760432,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29760420 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29760433,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29760421 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29760434,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29760422 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29760435,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29760423 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29760436,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29760424 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29760437,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29760425 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29760438,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29760426 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29760439,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29760427 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29760440,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29760428 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29760441,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29760429 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29760442,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29760430 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29760443,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29760431 lien utilise dans velours : https://marlene.fotonower.com/velours/29760432,29760433,29760434,29760435,29760436,29760437,29760438,29760439,29760440,29760441,29760442,29760443?tags=cartonnette,autre_refus,Carton_brun,kraft,environnement,Teint_Dans_La_Masse,papier,plastique,metal,flou,Carton_gris,mal_croppe After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29760415]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1401478768, 1401478765, 1401478763, 1401478761, 1401478759] map_info['map_portfolio_photo'] : {29760415: [1401478768, 1401478765, 1401478763, 1401478761, 1401478759, 1401478748, 1401478745, 1401478743, 1401478742, 1401478740, 1401478717, 1401478716, 1401478715, 1401478714, 1401478700, 1401478697, 1401478695, 1401478693, 1401478691, 1401478646, 1401478643, 1401478641, 1401478640, 1401478639, 1401478628, 1401478627, 1401478626, 1401478624, 1401478600, 1401478599, 1401478598, 1401478596, 1401478588, 1401478585, 1401478583, 1401478581, 1401478579, 1401478578, 1401478571, 1401478569, 1401478568, 1401478561, 1401478552, 1401478549, 1401478546, 1401478543, 1401478541, 1401478525, 1401478522, 1401478520, 1401478518, 1401478517, 1401478514, 1401478495, 1401478494, 1401478493]} final : False mtd_id 4302 list_pids : [1401478768, 1401478765, 1401478763, 1401478761, 1401478759] Looping around the photos to save general results len do output : 1 /29760415. 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, '4281826') ('4302', '29760415', '1401478768', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478765', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478763', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478761', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478759', None, None, None, None, None, '4281826') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '29760415', "{'cartonnette': 29760420, 'autre_refus': 29760421, 'Carton_brun': 29760422, 'kraft': 29760423, 'environnement': 29760424, 'Teint_Dans_La_Masse': 29760425, 'papier': 29760426, 'plastique': 29760427, 'metal': 29760428, 'flou': 29760429, 'Carton_gris': 29760430, 'mal_croppe': 29760431}", None, None, None, None, '4281826'), ('4302', '29760415', '1401478768', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478765', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478763', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478761', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478759', None, None, None, None, None, '4281826')] time used for this insertion : 0.013794660568237305 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.5274059772491455 time spend to save output : 0.014051437377929688 total time spend for step 1 : 0.5414574146270752 step2:final Mon Dec 29 05:42: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 (29760415) 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 29760415 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1401478495,1401478494,1401478493,1401478571,1401478525,1401478569,1401478522,1401478568,1401478520,1401478518,1401478561,1401478552,1401478517,1401478514,1401478549,1401478546,1401478543,1401478541,1401478588,1401478585,1401478583,1401478581,1401478579,1401478578,1401478600,1401478599,1401478598,1401478596,1401478628,1401478627,1401478626,1401478624,1401478646,1401478643,1401478641,1401478640,1401478639,1401478700,1401478697,1401478695,1401478693,1401478691,1401478717,1401478716,1401478715,1401478714,1401478748,1401478745,1401478743,1401478742,1401478740,1401478768,1401478765,1401478763,1401478761,1401478759); 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([29760415]) Inside saveOutput : final : False verbose : True original output for save of step final : {1401478768: ('0.06712800389176588',), 1401478765: ('0.06712800389176588',), 1401478763: ('0.06712800389176588',), 1401478761: ('0.06712800389176588',), 1401478759: ('0.06712800389176588',)} new output for save of step final : {1401478768: ('0.06712800389176588',), 1401478765: ('0.06712800389176588',), 1401478763: ('0.06712800389176588',), 1401478761: ('0.06712800389176588',), 1401478759: ('0.06712800389176588',)} [1401478768, 1401478765, 1401478763, 1401478761, 1401478759] map_info['map_portfolio_photo'] : {29760415: [1401478768, 1401478765, 1401478763, 1401478761, 1401478759, 1401478748, 1401478745, 1401478743, 1401478742, 1401478740, 1401478717, 1401478716, 1401478715, 1401478714, 1401478700, 1401478697, 1401478695, 1401478693, 1401478691, 1401478646, 1401478643, 1401478641, 1401478640, 1401478639, 1401478628, 1401478627, 1401478626, 1401478624, 1401478600, 1401478599, 1401478598, 1401478596, 1401478588, 1401478585, 1401478583, 1401478581, 1401478579, 1401478578, 1401478571, 1401478569, 1401478568, 1401478561, 1401478552, 1401478549, 1401478546, 1401478543, 1401478541, 1401478525, 1401478522, 1401478520, 1401478518, 1401478517, 1401478514, 1401478495, 1401478494, 1401478493]} final : False mtd_id 4302 list_pids : [1401478768, 1401478765, 1401478763, 1401478761, 1401478759] Looping around the photos to save general results len do output : 5 /1401478768.Didn't retrieve data . /1401478765.Didn't retrieve data . /1401478763.Didn't retrieve data . /1401478761.Didn't retrieve data . /1401478759.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, '4281826') ('4302', '29760415', '1401478768', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478765', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478763', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478761', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478759', None, None, None, None, None, '4281826') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '29760415', '1401478768', '0.06712800389176588', None, None, None, None, '4281826'), ('4302', '29760415', '1401478765', '0.06712800389176588', None, None, None, None, '4281826'), ('4302', '29760415', '1401478763', '0.06712800389176588', None, None, None, None, '4281826'), ('4302', '29760415', '1401478761', '0.06712800389176588', None, None, None, None, '4281826'), ('4302', '29760415', '1401478759', '0.06712800389176588', None, None, None, None, '4281826')] time used for this insertion : 0.014608144760131836 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.07998132705688477 time spend to save output : 0.014911413192749023 total time spend for step 2 : 0.09489274024963379 step3:velours_tree Mon Dec 29 05:42:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {29760415: [{'cartonnette': 29760420, 'autre_refus': 29760421, 'Carton_brun': 29760422, 'kraft': 29760423, 'environnement': 29760424, 'Teint_Dans_La_Masse': 29760425, 'papier': 29760426, 'plastique': 29760427, 'metal': 29760428, 'flou': 29760429, 'Carton_gris': 29760430, 'mal_croppe': 29760431}]} input_args_next_step : {29760415: ()} output_args : {29760415: [{'cartonnette': 29760420, 'autre_refus': 29760421, 'Carton_brun': 29760422, 'kraft': 29760423, 'environnement': 29760424, 'Teint_Dans_La_Masse': 29760425, 'papier': 29760426, 'plastique': 29760427, 'metal': 29760428, 'flou': 29760429, 'Carton_gris': 29760430, 'mal_croppe': 29760431}]} args : 29760415 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 : ({'cartonnette': 29760420, 'autre_refus': 29760421, 'Carton_brun': 29760422, 'kraft': 29760423, 'environnement': 29760424, 'Teint_Dans_La_Masse': 29760425, 'papier': 29760426, 'plastique': 29760427, 'metal': 29760428, 'flou': 29760429, 'Carton_gris': 29760430, 'mal_croppe': 29760431},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29760415) 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([29760415]) 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.23891139030456543 time spend to save output : 5.030632019042969e-05 total time spend for step 3 : 0.23896169662475586 step4:send_mail_cod Mon Dec 29 05:42:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1401478768: ('0.06712800389176588',), 1401478765: ('0.06712800389176588',), 1401478763: ('0.06712800389176588',), 1401478761: ('0.06712800389176588',), 1401478759: ('0.06712800389176588',)} input_args_next_step : {1401478768: ()} output_args : {1401478768: ('0.06712800389176588',), 1401478765: ('0.06712800389176588',), 1401478763: ('0.06712800389176588',), 1401478761: ('0.06712800389176588',), 1401478759: ('0.06712800389176588',)} args : 1401478768 depend.output_id : 0 input_args_next_step : {1401478768: ('0.06712800389176588',), 1401478765: ()} output_args : {1401478768: ('0.06712800389176588',), 1401478765: ('0.06712800389176588',), 1401478763: ('0.06712800389176588',), 1401478761: ('0.06712800389176588',), 1401478759: ('0.06712800389176588',)} args : 1401478765 depend.output_id : 0 input_args_next_step : {1401478768: ('0.06712800389176588',), 1401478765: ('0.06712800389176588',), 1401478763: ()} output_args : {1401478768: ('0.06712800389176588',), 1401478765: ('0.06712800389176588',), 1401478763: ('0.06712800389176588',), 1401478761: ('0.06712800389176588',), 1401478759: ('0.06712800389176588',)} args : 1401478763 depend.output_id : 0 input_args_next_step : {1401478768: ('0.06712800389176588',), 1401478765: ('0.06712800389176588',), 1401478763: ('0.06712800389176588',), 1401478761: ()} output_args : {1401478768: ('0.06712800389176588',), 1401478765: ('0.06712800389176588',), 1401478763: ('0.06712800389176588',), 1401478761: ('0.06712800389176588',), 1401478759: ('0.06712800389176588',)} args : 1401478761 depend.output_id : 0 input_args_next_step : {1401478768: ('0.06712800389176588',), 1401478765: ('0.06712800389176588',), 1401478763: ('0.06712800389176588',), 1401478761: ('0.06712800389176588',), 1401478759: ()} output_args : {1401478768: ('0.06712800389176588',), 1401478765: ('0.06712800389176588',), 1401478763: ('0.06712800389176588',), 1401478761: ('0.06712800389176588',), 1401478759: ('0.06712800389176588',)} args : 1401478759 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 : {29760415: [{'cartonnette': 29760420, 'autre_refus': 29760421, 'Carton_brun': 29760422, 'kraft': 29760423, 'environnement': 29760424, 'Teint_Dans_La_Masse': 29760425, 'papier': 29760426, 'plastique': 29760427, 'metal': 29760428, 'flou': 29760429, 'Carton_gris': 29760430, 'mal_croppe': 29760431}]} input_args_next_step : {1401478768: ('0.06712800389176588',), 1401478765: ('0.06712800389176588',), 1401478763: ('0.06712800389176588',), 1401478761: ('0.06712800389176588',), 1401478759: ('0.06712800389176588',), 29760415: ()} output_args : {29760415: [{'cartonnette': 29760420, 'autre_refus': 29760421, 'Carton_brun': 29760422, 'kraft': 29760423, 'environnement': 29760424, 'Teint_Dans_La_Masse': 29760425, 'papier': 29760426, 'plastique': 29760427, 'metal': 29760428, 'flou': 29760429, 'Carton_gris': 29760430, 'mal_croppe': 29760431}]} args : 29760415 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :6, first value : ('0.06712800389176588',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29760415) 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_view ph WHERE photo_id IN (1401478768,1401478765,1401478763,1401478761,1401478759) Found this number of photos: 5 ##### Call download_photos : nb_thread : 5 begin to download photo : 1401478759 begin to download photo : 1401478763 begin to download photo : 1401478768 download finish for photo 1401478759 begin to download photo : 1401478761 download finish for photo 1401478763 begin to download photo : 1401478765 download finish for photo 1401478768 download finish for photo 1401478761 download finish for photo 1401478765 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos length of list_filenames : 5 ; length of list_pids : 5 ; length of list_args : 5 results_Auto_P29760415_29-12-2025_05_42_59.pdf 29760420 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29760420 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1401478617: '1766982927_2650130_1401478546_0635cfb9de501414e14f85ccc14848da_rle_crop_4084253308_0.png', 1401478618: '1766982927_2650130_1401478546_0635cfb9de501414e14f85ccc14848da_rle_crop_4084253309_0.png', 1401478681: '1766983027_2656136_1401478549_ea43fe0a5315b2914fdae3734524c605_rle_crop_4084253875_0.png', 1401478723: '1766983146_2661401_1401478626_79d503452fac32d0d7408ae82c1e7873_rle_crop_4084254120_0.png', 1401478771: '1766983268_2667085_1401478599_f8852e3e12cf7ccd72eb1f1e1c9e671c_rle_crop_4084254425_0.png', 1401478772: '1766983268_2667085_1401478598_8833c66f139b41f62ed8ba26c1be6657_rle_crop_4084254440_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/df78fc45b46cdbfaa77e9a13b5c2ba1a_53452567.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/60da47be0625ea165305165126691612_74649658.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/694d181cf4c24fa0641c8b0f87638c3a_31357.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/650faa6b712d990881f5dcd2c356c206_45547149.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/99b8066f8783b287b079faadc231f942_5542167.png change filename to text .imagette297604201766983379/ imagette297604201766983379/1766983027_2656136_1401478549_ea43fe0a5315b2914fdae3734524c605_rle_crop_4084253875_0.png.png imagette297604201766983379/1766983146_2661401_1401478626_79d503452fac32d0d7408ae82c1e7873_rle_crop_4084254120_0.png.png imagette297604201766983379/1766982927_2650130_1401478546_0635cfb9de501414e14f85ccc14848da_rle_crop_4084253309_0.png.png imagette297604201766983379/1766983268_2667085_1401478598_8833c66f139b41f62ed8ba26c1be6657_rle_crop_4084254440_0.png.png imagette297604201766983379/1766983268_2667085_1401478599_f8852e3e12cf7ccd72eb1f1e1c9e671c_rle_crop_4084254425_0.png.png imagette297604201766983379/1766982927_2650130_1401478546_0635cfb9de501414e14f85ccc14848da_rle_crop_4084253308_0.png.png wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/42692ecba3a759811480ffe672eb771a_86017607.png imagette297604201766983379 29760421 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29760421 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1401478615: '1766982927_2650130_1401478546_0635cfb9de501414e14f85ccc14848da_rle_crop_4084253306_0.png', 1401478721: '1766983146_2661401_1401478626_79d503452fac32d0d7408ae82c1e7873_rle_crop_4084254114_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/5e1d62d7e7f16c83a25f08b640e6a709_86055860.png change filename to text .imagette297604211766983379/ imagette297604211766983379/1766982927_2650130_1401478546_0635cfb9de501414e14f85ccc14848da_rle_crop_4084253306_0.png.png imagette297604211766983379/1766983146_2661401_1401478626_79d503452fac32d0d7408ae82c1e7873_rle_crop_4084254114_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/8f863620ee3d3d88e70fbc4789065d50_37834364.png imagette297604211766983379 29760423 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29760423 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1401478689: '1766983027_2656136_1401478552_8f0b20c5e7ca22cd63442941739262af_rle_crop_4084253867_0.png', 1401478690: '1766983027_2656136_1401478517_f4ba201d9edb76387d86fe333b40078e_rle_crop_4084253967_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/6224c28dfb1024afcdced134f720cb1c_77106696.png change filename to text .imagette297604231766983379/ imagette297604231766983379/1766983027_2656136_1401478552_8f0b20c5e7ca22cd63442941739262af_rle_crop_4084253867_0.png.png imagette297604231766983379/1766983027_2656136_1401478517_f4ba201d9edb76387d86fe333b40078e_rle_crop_4084253967_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/6224c28dfb1024afcdced134f720cb1c_6519499.png imagette297604231766983379 29760427 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29760427 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1401478567: '1766982805_2644486_1401478493_422c28e3f476776b7e95d81f5dd63681_rle_crop_4084253228_0.png', 1401478621: '1766982927_2650130_1401478543_79c2e8d3e588c61e0c7a82e478862534_rle_crop_4084253320_0.png', 1401478738: '1766983167_2661800_1401478643_19b22d167143f490953d9cffc4bab22b_rle_crop_4084254236_0.png', 1401478774: '1766983268_2667085_1401478599_f8852e3e12cf7ccd72eb1f1e1c9e671c_rle_crop_4084254428_0.png', 1401478775: '1766983268_2667085_1401478598_8833c66f139b41f62ed8ba26c1be6657_rle_crop_4084254443_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/6a9a198688b0f6041e2bd714447bf580_62869455.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/894c6dc15d066e02d8486aa5c6260804_73047359.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/f0370ca675bbfafcd4a9be4a87eecd10_56077003.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/9156168d5347d9c857fdb217acfdad65_54636778.png change filename to text .imagette297604271766983379/ imagette297604271766983379/1766983268_2667085_1401478598_8833c66f139b41f62ed8ba26c1be6657_rle_crop_4084254443_0.png.png imagette297604271766983379/1766982805_2644486_1401478493_422c28e3f476776b7e95d81f5dd63681_rle_crop_4084253228_0.png.png imagette297604271766983379/1766983167_2661800_1401478643_19b22d167143f490953d9cffc4bab22b_rle_crop_4084254236_0.png.png imagette297604271766983379/1766983268_2667085_1401478599_f8852e3e12cf7ccd72eb1f1e1c9e671c_rle_crop_4084254428_0.png.png imagette297604271766983379/1766982927_2650130_1401478543_79c2e8d3e588c61e0c7a82e478862534_rle_crop_4084253320_0.png.png imagette297604281766983380/ imagette297604291766983380/ imagette297604311766983380/ wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/8846ef49e2d24bd16772528983f44e71_94168162.png imagette297604271766983379 29760428 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29760428 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette297604281766983380 29760429 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29760429 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette297604291766983380 29760431 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29760431 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette297604311766983380 29760422 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29760422 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1401478620: '1766982927_2650130_1401478541_f39d3a2053e818d392baea81494e8faa_rle_crop_4084253334_0.png', 1401478684: '1766983027_2656136_1401478561_778c57e7470455e72154fb4ee41d6252_rle_crop_4084253843_0.png', 1401478685: '1766983027_2656136_1401478552_8f0b20c5e7ca22cd63442941739262af_rle_crop_4084253866_0.png', 1401478686: '1766983027_2656136_1401478518_a9d396ca1339181b4688e751ef26e6dc_rle_crop_4084253926_0.png', 1401478687: '1766983027_2656136_1401478517_f4ba201d9edb76387d86fe333b40078e_rle_crop_4084253966_0.png', 1401478736: '1766983167_2661800_1401478641_a3d436bcd6b69e7643a48a1668342c98_rle_crop_4084254247_0.png', 1401478737: '1766983167_2661800_1401478639_45968fc5fd68556955739a6f24a00dad_rle_crop_4084254269_0.png', 1401478773: '1766983268_2667085_1401478596_3158eaf5925d48ac07a1b3c21abed1c2_rle_crop_4084254461_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/c4b30862e34b82f1625afe9ee7e46681_95858900.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/09037fe363239a339b9c667c933e29f2_82985159.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/f12645e3eb92c663ad793259b424d319_6529628.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/09037fe363239a339b9c667c933e29f2_97590656.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/f12645e3eb92c663ad793259b424d319_68831424.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/f076b91af0215efb62771f0f12efd626_61093147.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/d9bb33d0e21ab30b158c6e44d2071df1_39308799.png change filename to text .imagette297604221766983380/ imagette297604221766983380/1766983268_2667085_1401478596_3158eaf5925d48ac07a1b3c21abed1c2_rle_crop_4084254461_0.png.png imagette297604221766983380/1766983167_2661800_1401478639_45968fc5fd68556955739a6f24a00dad_rle_crop_4084254269_0.png.png imagette297604221766983380/1766983027_2656136_1401478561_778c57e7470455e72154fb4ee41d6252_rle_crop_4084253843_0.png.png imagette297604221766983380/1766983027_2656136_1401478552_8f0b20c5e7ca22cd63442941739262af_rle_crop_4084253866_0.png.png imagette297604221766983380/1766983167_2661800_1401478641_a3d436bcd6b69e7643a48a1668342c98_rle_crop_4084254247_0.png.png imagette297604221766983380/1766983027_2656136_1401478518_a9d396ca1339181b4688e751ef26e6dc_rle_crop_4084253926_0.png.png imagette297604221766983380/1766983027_2656136_1401478517_f4ba201d9edb76387d86fe333b40078e_rle_crop_4084253966_0.png.png imagette297604221766983380/1766982927_2650130_1401478541_f39d3a2053e818d392baea81494e8faa_rle_crop_4084253334_0.png.png wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/0a3f7bc6ec82ceb132e1ff3a54bb0dca_40201551.png imagette297604221766983380 29760425 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29760425 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1401478656: '1766983027_2656136_1401478568_c87fcf12cadd4406f8044320b299c2dc_rle_crop_4084253834_0.png', 1401478657: '1766983027_2656136_1401478568_c87fcf12cadd4406f8044320b299c2dc_rle_crop_4084253830_0.png', 1401478658: '1766983027_2656136_1401478561_778c57e7470455e72154fb4ee41d6252_rle_crop_4084253851_0.png', 1401478659: '1766983027_2656136_1401478520_caa0c986121a768946c88d896fe4b409_rle_crop_4084253914_0.png', 1401478660: '1766983027_2656136_1401478520_caa0c986121a768946c88d896fe4b409_rle_crop_4084253910_0.png', 1401478661: '1766983027_2656136_1401478518_a9d396ca1339181b4688e751ef26e6dc_rle_crop_4084253934_0.png', 1401478732: '1766983167_2661800_1401478640_d7e4b90a0583c0f3405bae2568ad7ee8_rle_crop_4084254259_0.png', 1401478733: '1766983167_2661800_1401478639_45968fc5fd68556955739a6f24a00dad_rle_crop_4084254271_0.png', 1401478734: '1766983167_2661800_1401478639_45968fc5fd68556955739a6f24a00dad_rle_crop_4084254268_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/e9d33954a2ab1de80f00e46252851ee3_99220591.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/b5b345d8714c5bf615b0102ab8f615bd_48510895.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/fa505ede65f73b1e06a215f305334e82_42907169.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/e9d33954a2ab1de80f00e46252851ee3_61870997.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/b5b345d8714c5bf615b0102ab8f615bd_87876304.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/fa505ede65f73b1e06a215f305334e82_62696750.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/936c9e0fbb8a9cb6b6feb4d5260c7574_67621421.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/0069cc282ef700704e7ca414924baa55_2968878.png change filename to text .imagette297604251766983380/ imagette297604251766983380/1766983167_2661800_1401478639_45968fc5fd68556955739a6f24a00dad_rle_crop_4084254271_0.png.png imagette297604251766983380/1766983027_2656136_1401478520_caa0c986121a768946c88d896fe4b409_rle_crop_4084253910_0.png.png imagette297604251766983380/1766983027_2656136_1401478568_c87fcf12cadd4406f8044320b299c2dc_rle_crop_4084253830_0.png.png imagette297604251766983380/1766983167_2661800_1401478639_45968fc5fd68556955739a6f24a00dad_rle_crop_4084254268_0.png.png imagette297604251766983380/1766983027_2656136_1401478520_caa0c986121a768946c88d896fe4b409_rle_crop_4084253914_0.png.png imagette297604251766983380/1766983027_2656136_1401478561_778c57e7470455e72154fb4ee41d6252_rle_crop_4084253851_0.png.png imagette297604251766983380/1766983027_2656136_1401478518_a9d396ca1339181b4688e751ef26e6dc_rle_crop_4084253934_0.png.png imagette297604251766983380/1766983027_2656136_1401478568_c87fcf12cadd4406f8044320b299c2dc_rle_crop_4084253834_0.png.png imagette297604251766983380/1766983167_2661800_1401478640_d7e4b90a0583c0f3405bae2568ad7ee8_rle_crop_4084254259_0.png.png wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/275b73a055d28561fd86be6f2dff84fe_38263704.png imagette297604251766983380 29760430 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29760430 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1401478565: '1766982805_2644486_1401478494_2fc4863acef26caaf13c9fd8636dd498_rle_crop_4084253215_0.png', 1401478566: '1766982805_2644486_1401478494_2fc4863acef26caaf13c9fd8636dd498_rle_crop_4084253213_0.png', 1401478616: '1766982927_2650130_1401478546_0635cfb9de501414e14f85ccc14848da_rle_crop_4084253312_0.png', 1401478666: '1766983027_2656136_1401478568_c87fcf12cadd4406f8044320b299c2dc_rle_crop_4084253824_0.png', 1401478667: '1766983027_2656136_1401478552_8f0b20c5e7ca22cd63442941739262af_rle_crop_4084253861_0.png', 1401478668: '1766983027_2656136_1401478552_8f0b20c5e7ca22cd63442941739262af_rle_crop_4084253863_0.png', 1401478669: '1766983027_2656136_1401478549_ea43fe0a5315b2914fdae3734524c605_rle_crop_4084253881_0.png', 1401478671: '1766983027_2656136_1401478549_ea43fe0a5315b2914fdae3734524c605_rle_crop_4084253871_0.png', 1401478673: '1766983027_2656136_1401478520_caa0c986121a768946c88d896fe4b409_rle_crop_4084253904_0.png', 1401478675: '1766983027_2656136_1401478517_f4ba201d9edb76387d86fe333b40078e_rle_crop_4084253961_0.png', 1401478676: '1766983027_2656136_1401478517_f4ba201d9edb76387d86fe333b40078e_rle_crop_4084253963_0.png', 1401478677: '1766983027_2656136_1401478514_f1f0f78f54d954d484c2951c45730249_rle_crop_4084253985_0.png', 1401478678: '1766983027_2656136_1401478514_f1f0f78f54d954d484c2951c45730249_rle_crop_4084253989_0.png', 1401478735: '1766983167_2661800_1401478640_d7e4b90a0583c0f3405bae2568ad7ee8_rle_crop_4084254255_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/45e7ed6bc5ba3fa3fc51dfc95b566cf3_45886978.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/5a5249a218243a3eb2f7e59b13879935_25538983.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/c28f53f466217598b20f89311f972d67_97990490.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/c0139d6618f91374add686f0c849225f_66391534.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/7846a8424eb41b8a7eb557723d5ad0f0_50590357.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/b7e5ede7ffc9278b7c944d9f0ba7d5f1_37176251.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/5ef3810a0d4e2da0bc0a6171e713806e_9133904.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/e068893b49417059095b3c4cccf86d60_35651386.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/c0139d6618f91374add686f0c849225f_71181445.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/7846a8424eb41b8a7eb557723d5ad0f0_53929215.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/b7e5ede7ffc9278b7c944d9f0ba7d5f1_68927769.png change filename to text .wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/2bc176aa5bd2535ca20059d272aaef9c_21423321.png change filename to text .wget -O 13.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/dfd86d7ea920f99a1fa3f730af9db07d_42864573.png change filename to text .imagette297604301766983381/ imagette297604301766983381/1766982805_2644486_1401478494_2fc4863acef26caaf13c9fd8636dd498_rle_crop_4084253215_0.png.png imagette297604301766983381/1766983027_2656136_1401478549_ea43fe0a5315b2914fdae3734524c605_rle_crop_4084253881_0.png.png imagette297604301766983381/1766982927_2650130_1401478546_0635cfb9de501414e14f85ccc14848da_rle_crop_4084253312_0.png.png imagette297604301766983381/1766983027_2656136_1401478514_f1f0f78f54d954d484c2951c45730249_rle_crop_4084253985_0.png.png imagette297604301766983381/1766983027_2656136_1401478517_f4ba201d9edb76387d86fe333b40078e_rle_crop_4084253963_0.png.png imagette297604301766983381/1766983027_2656136_1401478568_c87fcf12cadd4406f8044320b299c2dc_rle_crop_4084253824_0.png.png imagette297604301766983381/1766983027_2656136_1401478552_8f0b20c5e7ca22cd63442941739262af_rle_crop_4084253863_0.png.png imagette297604301766983381/1766983027_2656136_1401478552_8f0b20c5e7ca22cd63442941739262af_rle_crop_4084253861_0.png.png imagette297604301766983381/1766983027_2656136_1401478514_f1f0f78f54d954d484c2951c45730249_rle_crop_4084253989_0.png.png imagette297604301766983381/1766983027_2656136_1401478520_caa0c986121a768946c88d896fe4b409_rle_crop_4084253904_0.png.png imagette297604301766983381/1766983027_2656136_1401478517_f4ba201d9edb76387d86fe333b40078e_rle_crop_4084253961_0.png.png imagette297604301766983381/1766982805_2644486_1401478494_2fc4863acef26caaf13c9fd8636dd498_rle_crop_4084253213_0.png.png imagette297604301766983381/1766983167_2661800_1401478640_d7e4b90a0583c0f3405bae2568ad7ee8_rle_crop_4084254255_0.png.png imagette297604301766983381/1766983027_2656136_1401478549_ea43fe0a5315b2914fdae3734524c605_rle_crop_4084253871_0.png.png wget -O 14.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/0d040daa5d3004edc223f39c58328316_45806440.png imagette297604301766983381 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=29760415 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/29760432,29760433,29760434,29760435,29760436,29760437,29760438,29760439,29760440,29760441,29760442,29760443?tags=cartonnette,autre_refus,Carton_brun,kraft,environnement,Teint_Dans_La_Masse,papier,plastique,metal,flou,Carton_gris,mal_croppe your option no_mail is active, we will not send the real mail to your client args[1401478768] : ('0.06712800389176588',) no score found for photo 1401478768 We are sending mail with results at report@fotonower.com args[1401478765] : ('0.06712800389176588',) no score found for photo 1401478765 We are sending mail with results at report@fotonower.com args[1401478763] : ('0.06712800389176588',) no score found for photo 1401478763 We are sending mail with results at report@fotonower.com args[1401478761] : ('0.06712800389176588',) no score found for photo 1401478761 We are sending mail with results at report@fotonower.com args[1401478759] : ('0.06712800389176588',) no score found for photo 1401478759 We are sending mail with results at report@fotonower.com refus_total : 0.06712800389176588 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29760415 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_P29760415_29-12-2025_05_42_59.pdf results_Auto_P29760415_29-12-2025_05_42_59.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29760415_29-12-2025_05_42_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','29760415','results_Auto_P29760415_29-12-2025_05_42_59.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29760415_29-12-2025_05_42_59.pdf','pdf','','0.16','0.06712800389176588') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29760415]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1401478768, 1401478765, 1401478763, 1401478761, 1401478759] map_info['map_portfolio_photo'] : {29760415: [1401478768, 1401478765, 1401478763, 1401478761, 1401478759, 1401478748, 1401478745, 1401478743, 1401478742, 1401478740, 1401478717, 1401478716, 1401478715, 1401478714, 1401478700, 1401478697, 1401478695, 1401478693, 1401478691, 1401478646, 1401478643, 1401478641, 1401478640, 1401478639, 1401478628, 1401478627, 1401478626, 1401478624, 1401478600, 1401478599, 1401478598, 1401478596, 1401478588, 1401478585, 1401478583, 1401478581, 1401478579, 1401478578, 1401478571, 1401478569, 1401478568, 1401478561, 1401478552, 1401478549, 1401478546, 1401478543, 1401478541, 1401478525, 1401478522, 1401478520, 1401478518, 1401478517, 1401478514, 1401478495, 1401478494, 1401478493]} final : False mtd_id 4302 list_pids : [1401478768, 1401478765, 1401478763, 1401478761, 1401478759] 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, '4281826') ('4302', '29760415', '1401478768', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478765', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478763', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478761', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478759', None, None, None, None, None, '4281826') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 5 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '29760415', '1401478768', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478765', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478763', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478761', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478759', None, None, None, None, None, '4281826')] time used for this insertion : 0.014006614685058594 save_final save missing photos in datou_result : time spend for datou_step_exec : 4.834017992019653 time spend to save output : 0.014193296432495117 total time spend for step 4 : 4.848211288452148 step5:split_time_score Mon Dec 29 05:43:03 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['29760415'] 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 : [('29760415',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29760415) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1401478768: {'path': 'temp/1766983378_4076022_1401478768_d9e511f0796dee953d08145a359ae799.jpg', 'extension': 'jpg'}, 1401478759: {'path': 'temp/1766983378_4076022_1401478759_777136b90290c63105cf461c6b33900b.jpg', 'extension': 'jpg'}, 1401478761: {'path': 'temp/1766983378_4076022_1401478761_866d7015871e16fabc171cf3589198dd.jpg', 'extension': 'jpg'}, 1401478763: {'path': 'temp/1766983378_4076022_1401478763_42f0c869cb9321fe4c7bee746b9f4796.jpg', 'extension': 'jpg'}, 1401478765: {'path': 'temp/1766983378_4076022_1401478765_443ef0a652087362aa5933879b53f69e.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 = 29760415; (('arc_en_ciel_jrm_live',),) 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_view ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 29760415 group by h (('05', 56),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29760415 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 (29760415) 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 (29760415) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 29122025 29760415 Nombre de photos uploadées : 56 / 23040 (0%) 29122025 29760415 Nombre de photos taguées (types de déchets): 0 / 56 (0%) 29122025 29760415 Nombre de photos taguées (volume) : 0 / 56 (0%) [{'photo_id': 1401478495, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/23f93d6e1787f10f20353863f93ba9bc.jpg', 'username': None, 'uploaded_at': 1766982667, 'text': 'image_29122025_05_30_24_010132m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1401478494, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/2fc4863acef26caaf13c9fd8636dd498.jpg', 'username': None, 'uploaded_at': 1766982667, 'text': 'image_29122025_05_30_34_010144m0.jpg 2e-05 for time 1, id_amount 3 this amount prod time diff : 1e-05'}, {'photo_id': 1401478493, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/422c28e3f476776b7e95d81f5dd63681.jpg', 'username': None, 'uploaded_at': 1766982667, 'text': 'image_29122025_05_30_44_010136m0.jpg 3.0000000000000004e-05 for time 1, id_amount 3 this amount prod time diff : 1e-05'}, {'photo_id': 1401478571, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/3af26795b22b2ed276b59e69a0479af7.jpg', 'username': None, 'uploaded_at': 1766982838, 'text': 'image_29122025_05_30_55_10134.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.430511474609375e-06 elapsed_time : order_list_meta_photo_and_scores 4.76837158203125e-06 ???????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0024793148040771484 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 218, 29760415, '2025-12-29' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 218 and date = '2025-12-29' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2803952,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.2372441291809082 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= 2803952 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2803952, 'dashboard_run_id': 2810672, 'mtr_portfolio_id': 29759841, 'dashboard_result_id': 18782228, '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_P29759841_29-12-2025_05_19_30.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29759843, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29759844, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29759845, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29759846, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29759847, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29759848, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29759849, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29759850, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29759851, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29759852, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29759853, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29759854, 'pht': 3726}}"}, {'dashboat_entry_day': 2803952, 'dashboard_run_id': 2810672, 'mtr_portfolio_id': 29760025, 'dashboard_result_id': 18782229, '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_P29760025_29-12-2025_05_33_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29760029, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29760030, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29760031, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29760032, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29760033, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29760034, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29760035, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29760036, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29760037, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29760038, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29760039, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29760040, 'pht': 3726}}"}, {'dashboat_entry_day': 2803952, 'dashboard_run_id': 2810672, 'mtr_portfolio_id': 29760415, 'dashboard_result_id': 18782230, '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_P29760415_29-12-2025_05_40_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29760420, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29760421, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29760422, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29760423, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29760424, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29760425, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29760426, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29760427, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29760428, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29760429, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29760430, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29760431, '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 = 29759841 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': 4281749, 'mtr_portfolio_id': 29759841, 'created_at': datetime.datetime(2025, 12, 29, 5, 19, 29), 'result': '0.061001476454854056', 'result_long': None, 'result_double': None}] Qualite : 0.061001476454854056 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29759841 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29759841_29-12-2025_05_19_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29759841 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_P29759841_29-12-2025_05_19_30.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29759843, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29759844, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29759845, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29759846, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29759847, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29759848, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29759849, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29759850, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29759851, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29759852, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29759853, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29759854, 'pht': 3726}}" where mtr_portfolio_id = 29759841 and dashboard_run_id = 2810672 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`=29759841 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18782228, 0.061001476454854056, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29759841_29-12-2025_05_19_30.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29759843, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29759844, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29759845, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29759846, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29759847, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29759848, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29759849, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29759850, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29759851, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29759852, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29759853, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29759854, '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 = 29760025 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': 4281775, 'mtr_portfolio_id': 29760025, 'created_at': datetime.datetime(2025, 12, 29, 5, 33), 'result': '0.07076046805816123', 'result_long': None, 'result_double': None}] Qualite : 0.07076046805816123 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29760025 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29760025_29-12-2025_05_33_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29760025 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_P29760025_29-12-2025_05_33_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29760029, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29760030, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29760031, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29760032, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29760033, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29760034, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29760035, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29760036, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29760037, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29760038, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29760039, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29760040, 'pht': 3726}}" where mtr_portfolio_id = 29760025 and dashboard_run_id = 2810672 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`=29760025 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18782229, 0.07076046805816123, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29760025_29-12-2025_05_33_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29760029, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29760030, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29760031, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29760032, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29760033, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29760034, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29760035, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29760036, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29760037, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29760038, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29760039, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29760040, '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 = 29760415 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': 4281826, 'mtr_portfolio_id': 29760415, 'created_at': datetime.datetime(2025, 12, 29, 5, 42, 58), 'result': '0.06712800389176588', 'result_long': None, 'result_double': None}] Qualite : 0.06712800389176588 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29760415 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29760415_29-12-2025_05_42_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29760415 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_P29760415_29-12-2025_05_42_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29760420, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29760421, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29760422, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29760423, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29760424, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29760425, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29760426, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29760427, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29760428, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29760429, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29760430, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29760431, 'pht': 3726}}" where mtr_portfolio_id = 29760415 and dashboard_run_id = 2810672 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`=29760415 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18782230, 0.06712800389176588, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29760415_29-12-2025_05_42_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29760420, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29760421, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29760422, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29760423, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29760424, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29760425, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29760426, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29760427, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29760428, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29760429, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29760430, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29760431, '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 (29759841,29760025,29760415) result : ((1401477787,), (1401477791,), (1401477793,), (1401477855,), (1401477873,), (1401477875,), (1401477887,), (1401477888,), (1401477889,), (1401477891,), (1401477894,), (1401477905,), (1401477907,), (1401477922,), (1401477923,), (1401477924,), (1401477925,), (1401477927,), (1401477947,), (1401477950,), (1401477952,), (1401477955,), (1401477965,), (1401477967,), (1401477969,), (1401477971,), (1401477975,), (1401477977,), (1401478008,), (1401478009,), (1401478015,), (1401478019,), (1401478021,), (1401478023,), (1401478026,), (1401478001,), (1401478003,), (1401478005,), (1401478007,), (1401478031,), (1401478032,), (1401478033,), (1401478047,), (1401478049,), (1401478051,), (1401478054,), (1401478056,), (1401478067,), (1401478070,), (1401478073,), (1401478076,), (1401478079,), (1401478108,), (1401478111,), (1401478112,), (1401478113,), (1401478114,), (1401478125,), (1401478126,), (1401478128,), (1401478162,), (1401478164,), (1401478168,), (1401478170,), (1401478173,), (1401478175,), (1401478198,), (1401478202,), (1401478206,), (1401478208,), (1401478215,), (1401478218,), (1401478248,), (1401478252,), (1401478255,), (1401478267,), (1401478270,), (1401478278,), (1401478281,), (1401478283,), (1401478286,), (1401478294,), (1401478296,), (1401478298,), (1401478301,), (1401478304,), (1401478306,), (1401478339,), (1401478352,), (1401478369,), (1401478372,), (1401478373,), (1401478375,), (1401478376,), (1401478396,), (1401478402,), (1401478404,), (1401478406,), (1401478417,), (1401478420,), (1401478422,), (1401478424,), (1401478427,), (1401478429,), (1401478444,), (1401478447,), (1401478448,), (1401478496,), (1401478493,), (1401478494,), (1401478495,), (1401478514,), (1401478517,), (1401478518,), (1401478520,), (1401478522,), (1401478525,), (1401478541,), (1401478543,), (1401478546,), (1401478549,), (1401478552,), (1401478561,), (1401478568,), (1401478569,), (1401478571,), (1401478578,), (1401478579,), (1401478581,), (1401478583,), (1401478585,), (1401478588,), (1401478596,), (1401478598,), (1401478599,), (1401478600,), (1401478624,), (1401478626,), (1401478627,), (1401478628,), (1401478639,), (1401478640,), (1401478641,), (1401478643,), (1401478646,), (1401478691,), (1401478693,), (1401478695,), (1401478697,), (1401478700,), (1401478714,), (1401478715,), (1401478716,), (1401478717,), (1401478740,), (1401478742,), (1401478743,), (1401478745,), (1401478748,), (1401478759,), (1401478761,), (1401478763,), (1401478765,), (1401478768,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'29122025': {'nb_upload': 56, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29760415]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1401478768, 1401478765, 1401478763, 1401478761, 1401478759] map_info['map_portfolio_photo'] : {29760415: [1401478768, 1401478765, 1401478763, 1401478761, 1401478759, 1401478748, 1401478745, 1401478743, 1401478742, 1401478740, 1401478717, 1401478716, 1401478715, 1401478714, 1401478700, 1401478697, 1401478695, 1401478693, 1401478691, 1401478646, 1401478643, 1401478641, 1401478640, 1401478639, 1401478628, 1401478627, 1401478626, 1401478624, 1401478600, 1401478599, 1401478598, 1401478596, 1401478588, 1401478585, 1401478583, 1401478581, 1401478579, 1401478578, 1401478571, 1401478569, 1401478568, 1401478561, 1401478552, 1401478549, 1401478546, 1401478543, 1401478541, 1401478525, 1401478522, 1401478520, 1401478518, 1401478517, 1401478514, 1401478495, 1401478494, 1401478493]} final : True mtd_id 4302 list_pids : [1401478768, 1401478765, 1401478763, 1401478761, 1401478759] Looping around the photos to save general results len do output : 1 /29760415Didn'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, '4281826') ('4302', '29760415', '1401478768', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478765', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478763', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478761', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478759', None, None, None, None, None, '4281826') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '29760415', 'None', None, None, None, None, '4281826'), ('4302', '29760415', '1401478768', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478765', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478763', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478761', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478759', None, None, None, None, None, '4281826')] time used for this insertion : 0.014404058456420898 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.7142586708068848 time spend to save output : 0.014592647552490234 total time spend for step 5 : 0.728851318359375 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 (4281826) 1.92user 2.42system 0:09.37elapsed 46%CPU (0avgtext+0avgdata 163952maxresident)k 136inputs+9552outputs (10major+67002minor)pagefaults 0swaps