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 : 4112071 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 (4278405) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (4278405) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29738285 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['4278405'] with mtr_portfolio_ids : ['29738285'] and first list_photo_ids : [] new path : /proc/4112071/ Name: python3 Umask: 0002 State: R (running) Tgid: 4112071 Ngid: 0 Pid: 4112071 PPid: 4112043 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 4112071 NSpid: 4112071 NSpgid: 4111220 NSsid: 4111220 VmPeak: 1113364 kB VmSize: 1113364 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 106120 kB VmRSS: 106120 kB RssAnon: 66300 kB RssFile: 39820 kB RssShmem: 0 kB VmData: 872092 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130476 kB VmPTE: 580 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: 44 nonvoluntary_ctxt_switches: 172 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '4112071', 'Ngid': '0', 'Pid': '4112071', 'PPid': '4112043', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '4112071', 'NSpid': '4112071', 'NSpgid': '4111220', 'NSsid': '4111220', 'VmPeak': '1113364 kB', 'VmSize': '1113364 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '106120 kB', 'VmRSS': '106120 kB', 'RssAnon': '66300 kB', 'RssFile': '39820 kB', 'RssShmem': '0 kB', 'VmData': '872092 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130476 kB', 'VmPTE': '580 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': '44', 'nonvoluntary_ctxt_switches': '172'} ('datou_batch_current', '4112071', '1113364', '0', '1113364', '872092', '106120', b'', 'marlene', '4278405') 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 (29738285) 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 (4278405 ) ) 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 (29738285) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1401204529, 'portfolio_id': 29738285}, {'photo_id': 1401204526, 'portfolio_id': 29738285}, {'photo_id': 1401204523, 'portfolio_id': 29738285}, {'photo_id': 1401204520, 'portfolio_id': 29738285}, {'photo_id': 1401204510, 'portfolio_id': 29738285}, {'photo_id': 1401204507, 'portfolio_id': 29738285}, {'photo_id': 1401204503, 'portfolio_id': 29738285}, {'photo_id': 1401204500, 'portfolio_id': 29738285}, {'photo_id': 1401204498, 'portfolio_id': 29738285}, {'photo_id': 1401204497, 'portfolio_id': 29738285}, {'photo_id': 1401204470, 'portfolio_id': 29738285}, {'photo_id': 1401204468, 'portfolio_id': 29738285}, {'photo_id': 1401204467, 'portfolio_id': 29738285}, {'photo_id': 1401204465, 'portfolio_id': 29738285}, {'photo_id': 1401204444, 'portfolio_id': 29738285}, {'photo_id': 1401204441, 'portfolio_id': 29738285}, {'photo_id': 1401204438, 'portfolio_id': 29738285}] map_portfolio_id_photo_id: {29738285: [1401204529, 1401204526, 1401204523, 1401204520, 1401204510, 1401204507, 1401204503, 1401204500, 1401204498, 1401204497, 1401204470, 1401204468, 1401204467, 1401204465, 1401204444, 1401204441, 1401204438]} ##### 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.018148183822631836 #### 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 Sat Dec 27 01:50:29 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 (29738285) 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 : 29738285 get user id for portfolio 29738285 get sub ptf for main ptf 29738285, type 3726 and hashtags ['metal', 'plastique', 'papier', 'Carton_brun', 'cartonnette', 'Carton_gris', 'Teint_Dans_La_Masse', 'mal_croppe', 'flou', 'kraft', 'autre_refus', 'environnement'] 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`=29738285 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','plastique','papier','Carton_brun','cartonnette','Carton_gris','Teint_Dans_La_Masse','mal_croppe','flou','kraft','autre_refus','environnement')) 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`=29738285 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','plastique','papier','Carton_brun','cartonnette','Carton_gris','Teint_Dans_La_Masse','mal_croppe','flou','kraft','autre_refus','environnement')) AND mptpi.`min_score`=0.5 To do returned map {'autre_refus': {'main_port_id': 29738285, 'sub_port_id': 29738293, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20323490, 'last_updated_at': datetime.datetime(2025, 12, 27, 1, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 12, 27, 1, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 12, 27, 1, 49, 26)}, 'Teint_Dans_La_Masse': {'main_port_id': 29738285, 'sub_port_id': 29738294, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20323491, 'last_updated_at': datetime.datetime(2025, 12, 27, 1, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 12, 27, 1, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 12, 27, 1, 49, 26)}, 'Carton_gris': {'main_port_id': 29738285, 'sub_port_id': 29738295, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20323492, 'last_updated_at': datetime.datetime(2025, 12, 27, 1, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 12, 27, 1, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 12, 27, 1, 49, 26)}, 'plastique': {'main_port_id': 29738285, 'sub_port_id': 29738296, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20323493, 'last_updated_at': datetime.datetime(2025, 12, 27, 1, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 12, 27, 1, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 12, 27, 1, 49, 26)}, 'Carton_brun': {'main_port_id': 29738285, 'sub_port_id': 29738297, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20323494, 'last_updated_at': datetime.datetime(2025, 12, 27, 1, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 12, 27, 1, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 12, 27, 1, 49, 26)}, 'metal': {'main_port_id': 29738285, 'sub_port_id': 29738298, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20323495, 'last_updated_at': datetime.datetime(2025, 12, 27, 1, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 12, 27, 1, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 12, 27, 1, 49, 26)}, 'cartonnette': {'main_port_id': 29738285, 'sub_port_id': 29738299, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20323496, 'last_updated_at': datetime.datetime(2025, 12, 27, 1, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 12, 27, 1, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 12, 27, 1, 49, 26)}, 'environnement': {'main_port_id': 29738285, 'sub_port_id': 29738300, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20323497, 'last_updated_at': datetime.datetime(2025, 12, 27, 1, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 12, 27, 1, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 12, 27, 1, 49, 26)}, 'mal_croppe': {'main_port_id': 29738285, 'sub_port_id': 29738301, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20323498, 'last_updated_at': datetime.datetime(2025, 12, 27, 1, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 12, 27, 1, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 12, 27, 1, 49, 26)}, 'flou': {'main_port_id': 29738285, 'sub_port_id': 29738302, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20323499, 'last_updated_at': datetime.datetime(2025, 12, 27, 1, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 12, 27, 1, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 12, 27, 1, 49, 26)}, 'kraft': {'main_port_id': 29738285, 'sub_port_id': 29738303, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20323500, 'last_updated_at': datetime.datetime(2025, 12, 27, 1, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 12, 27, 1, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 12, 27, 1, 49, 26)}, 'papier': {'main_port_id': 29738285, 'sub_port_id': 29738304, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20323501, 'last_updated_at': datetime.datetime(2025, 12, 27, 1, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 12, 27, 1, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 12, 27, 1, 49, 26)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 29738293 , 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=29738285 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 (29738293) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29738285) result : ((1401204438,), (1401204441,), (1401204444,), (1401204465,), (1401204467,), (1401204468,), (1401204470,), (1401204497,), (1401204498,), (1401204500,), (1401204503,), (1401204507,), (1401204510,), (1401204520,), (1401204523,), (1401204526,), (1401204529,)) 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 (1401204500) 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 29738294 , 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=29738285 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 (29738294) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29738285) result : ((1401204438,), (1401204441,), (1401204444,), (1401204465,), (1401204467,), (1401204468,), (1401204470,), (1401204497,), (1401204498,), (1401204500,), (1401204503,), (1401204507,), (1401204510,), (1401204520,), (1401204523,), (1401204526,), (1401204529,)) 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 (1401204500) 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 29738295 , 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=29738285 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 (29738295) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29738285) result : ((1401204438,), (1401204441,), (1401204444,), (1401204465,), (1401204467,), (1401204468,), (1401204470,), (1401204497,), (1401204498,), (1401204500,), (1401204503,), (1401204507,), (1401204510,), (1401204520,), (1401204523,), (1401204526,), (1401204529,)) 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 (1401204500) 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 29738296 , 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=29738285 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 (29738296) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29738285) result : ((1401204438,), (1401204441,), (1401204444,), (1401204465,), (1401204467,), (1401204468,), (1401204470,), (1401204497,), (1401204498,), (1401204500,), (1401204503,), (1401204507,), (1401204510,), (1401204520,), (1401204523,), (1401204526,), (1401204529,)) 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 (1401204500) 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 29738297 , 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=29738285 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 (29738297) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29738285) result : ((1401204438,), (1401204441,), (1401204444,), (1401204465,), (1401204467,), (1401204468,), (1401204470,), (1401204497,), (1401204498,), (1401204500,), (1401204503,), (1401204507,), (1401204510,), (1401204520,), (1401204523,), (1401204526,), (1401204529,)) 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 (1401204500) 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 29738298 , 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=29738285 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 (29738298) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29738285) result : ((1401204438,), (1401204441,), (1401204444,), (1401204465,), (1401204467,), (1401204468,), (1401204470,), (1401204497,), (1401204498,), (1401204500,), (1401204503,), (1401204507,), (1401204510,), (1401204520,), (1401204523,), (1401204526,), (1401204529,)) 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 (1401204500) 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 29738299 , 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=29738285 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 (29738299) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29738285) result : ((1401204438,), (1401204441,), (1401204444,), (1401204465,), (1401204467,), (1401204468,), (1401204470,), (1401204497,), (1401204498,), (1401204500,), (1401204503,), (1401204507,), (1401204510,), (1401204520,), (1401204523,), (1401204526,), (1401204529,)) 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 (1401204500) 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 29738300 , 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=29738285 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 (29738300) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29738285) result : ((1401204438,), (1401204441,), (1401204444,), (1401204465,), (1401204467,), (1401204468,), (1401204470,), (1401204497,), (1401204498,), (1401204500,), (1401204503,), (1401204507,), (1401204510,), (1401204520,), (1401204523,), (1401204526,), (1401204529,)) 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 (1401204500) 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 29738301 , 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=29738285 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 (29738301) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29738285) result : ((1401204438,), (1401204441,), (1401204444,), (1401204465,), (1401204467,), (1401204468,), (1401204470,), (1401204497,), (1401204498,), (1401204500,), (1401204503,), (1401204507,), (1401204510,), (1401204520,), (1401204523,), (1401204526,), (1401204529,)) 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 (1401204500) 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 29738302 , 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=29738285 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 (29738302) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29738285) result : ((1401204438,), (1401204441,), (1401204444,), (1401204465,), (1401204467,), (1401204468,), (1401204470,), (1401204497,), (1401204498,), (1401204500,), (1401204503,), (1401204507,), (1401204510,), (1401204520,), (1401204523,), (1401204526,), (1401204529,)) 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 (1401204500) 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 29738303 , 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=29738285 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 (29738303) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29738285) result : ((1401204438,), (1401204441,), (1401204444,), (1401204465,), (1401204467,), (1401204468,), (1401204470,), (1401204497,), (1401204498,), (1401204500,), (1401204503,), (1401204507,), (1401204510,), (1401204520,), (1401204523,), (1401204526,), (1401204529,)) 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 (1401204500) 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 29738304 , 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=29738285 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 (29738304) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29738285) result : ((1401204438,), (1401204441,), (1401204444,), (1401204465,), (1401204467,), (1401204468,), (1401204470,), (1401204497,), (1401204498,), (1401204500,), (1401204503,), (1401204507,), (1401204510,), (1401204520,), (1401204523,), (1401204526,), (1401204529,)) 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 (1401204500) 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`=29738285 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','plastique','papier','Carton_brun','cartonnette','Carton_gris','Teint_Dans_La_Masse','mal_croppe','flou','kraft','autre_refus','environnement')) 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`=29738285 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','plastique','papier','Carton_brun','cartonnette','Carton_gris','Teint_Dans_La_Masse','mal_croppe','flou','kraft','autre_refus','environnement')) AND mptpi.`min_score`=0.5 To do returned map {'autre_refus': {'main_port_id': 29738285, 'sub_port_id': 29738306, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20323502, 'last_updated_at': datetime.datetime(2025, 12, 27, 1, 49, 33), 'last_updated_at_desc': datetime.datetime(2025, 12, 27, 1, 49, 33), 'last_updated_at_asc': datetime.datetime(2025, 12, 27, 1, 49, 33)}, 'Teint_Dans_La_Masse': {'main_port_id': 29738285, 'sub_port_id': 29738307, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20323503, 'last_updated_at': datetime.datetime(2025, 12, 27, 1, 49, 33), 'last_updated_at_desc': datetime.datetime(2025, 12, 27, 1, 49, 33), 'last_updated_at_asc': datetime.datetime(2025, 12, 27, 1, 49, 33)}, 'Carton_gris': {'main_port_id': 29738285, 'sub_port_id': 29738308, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20323504, 'last_updated_at': datetime.datetime(2025, 12, 27, 1, 49, 33), 'last_updated_at_desc': datetime.datetime(2025, 12, 27, 1, 49, 33), 'last_updated_at_asc': datetime.datetime(2025, 12, 27, 1, 49, 33)}, 'plastique': {'main_port_id': 29738285, 'sub_port_id': 29738309, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20323505, 'last_updated_at': datetime.datetime(2025, 12, 27, 1, 49, 33), 'last_updated_at_desc': datetime.datetime(2025, 12, 27, 1, 49, 33), 'last_updated_at_asc': datetime.datetime(2025, 12, 27, 1, 49, 33)}, 'Carton_brun': {'main_port_id': 29738285, 'sub_port_id': 29738310, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20323506, 'last_updated_at': datetime.datetime(2025, 12, 27, 1, 49, 33), 'last_updated_at_desc': datetime.datetime(2025, 12, 27, 1, 49, 33), 'last_updated_at_asc': datetime.datetime(2025, 12, 27, 1, 49, 33)}, 'metal': {'main_port_id': 29738285, 'sub_port_id': 29738311, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20323507, 'last_updated_at': datetime.datetime(2025, 12, 27, 1, 49, 33), 'last_updated_at_desc': datetime.datetime(2025, 12, 27, 1, 49, 33), 'last_updated_at_asc': datetime.datetime(2025, 12, 27, 1, 49, 33)}, 'cartonnette': {'main_port_id': 29738285, 'sub_port_id': 29738312, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20323508, 'last_updated_at': datetime.datetime(2025, 12, 27, 1, 49, 33), 'last_updated_at_desc': datetime.datetime(2025, 12, 27, 1, 49, 33), 'last_updated_at_asc': datetime.datetime(2025, 12, 27, 1, 49, 33)}, 'environnement': {'main_port_id': 29738285, 'sub_port_id': 29738313, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20323509, 'last_updated_at': datetime.datetime(2025, 12, 27, 1, 49, 33), 'last_updated_at_desc': datetime.datetime(2025, 12, 27, 1, 49, 33), 'last_updated_at_asc': datetime.datetime(2025, 12, 27, 1, 49, 33)}, 'mal_croppe': {'main_port_id': 29738285, 'sub_port_id': 29738314, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20323510, 'last_updated_at': datetime.datetime(2025, 12, 27, 1, 49, 33), 'last_updated_at_desc': datetime.datetime(2025, 12, 27, 1, 49, 33), 'last_updated_at_asc': datetime.datetime(2025, 12, 27, 1, 49, 33)}, 'flou': {'main_port_id': 29738285, 'sub_port_id': 29738315, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20323511, 'last_updated_at': datetime.datetime(2025, 12, 27, 1, 49, 33), 'last_updated_at_desc': datetime.datetime(2025, 12, 27, 1, 49, 33), 'last_updated_at_asc': datetime.datetime(2025, 12, 27, 1, 49, 33)}, 'kraft': {'main_port_id': 29738285, 'sub_port_id': 29738316, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20323512, 'last_updated_at': datetime.datetime(2025, 12, 27, 1, 49, 33), 'last_updated_at_desc': datetime.datetime(2025, 12, 27, 1, 49, 33), 'last_updated_at_asc': datetime.datetime(2025, 12, 27, 1, 49, 33)}, 'papier': {'main_port_id': 29738285, 'sub_port_id': 29738317, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20323513, 'last_updated_at': datetime.datetime(2025, 12, 27, 1, 49, 33), 'last_updated_at_desc': datetime.datetime(2025, 12, 27, 1, 49, 33), 'last_updated_at_asc': datetime.datetime(2025, 12, 27, 1, 49, 33)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29738306,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29738293 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29738307,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29738294 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29738308,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29738295 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29738309,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29738296 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29738310,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29738297 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29738311,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29738298 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29738312,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29738299 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29738313,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29738300 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29738314,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29738301 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29738315,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29738302 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29738316,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29738303 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29738317,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29738304 lien utilise dans velours : https://marlene.fotonower.com/velours/29738306,29738307,29738308,29738309,29738310,29738311,29738312,29738313,29738314,29738315,29738316,29738317?tags=autre_refus,Teint_Dans_La_Masse,Carton_gris,plastique,Carton_brun,metal,cartonnette,environnement,mal_croppe,flou,kraft,papier After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29738285]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1401204529, 1401204526, 1401204523, 1401204520, 1401204510, 1401204507, 1401204503, 1401204500, 1401204498, 1401204497] map_info['map_portfolio_photo'] : {29738285: [1401204529, 1401204526, 1401204523, 1401204520, 1401204510, 1401204507, 1401204503, 1401204500, 1401204498, 1401204497, 1401204470, 1401204468, 1401204467, 1401204465, 1401204444, 1401204441, 1401204438]} final : False mtd_id 4302 list_pids : [1401204529, 1401204526, 1401204523, 1401204520, 1401204510, 1401204507, 1401204503, 1401204500, 1401204498, 1401204497] Looping around the photos to save general results len do output : 1 /29738285. 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, '4278405') ('4302', '29738285', '1401204529', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204526', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204523', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204520', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204510', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204507', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204503', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204500', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204498', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204497', None, None, None, None, None, '4278405') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '29738285', "{'autre_refus': 29738293, 'Teint_Dans_La_Masse': 29738294, 'Carton_gris': 29738295, 'plastique': 29738296, 'Carton_brun': 29738297, 'metal': 29738298, 'cartonnette': 29738299, 'environnement': 29738300, 'mal_croppe': 29738301, 'flou': 29738302, 'kraft': 29738303, 'papier': 29738304}", None, None, None, None, '4278405'), ('4302', '29738285', '1401204529', None, None, None, None, None, '4278405'), ('4302', '29738285', '1401204526', None, None, None, None, None, '4278405'), ('4302', '29738285', '1401204523', None, None, None, None, None, '4278405'), ('4302', '29738285', '1401204520', None, None, None, None, None, '4278405'), ('4302', '29738285', '1401204510', None, None, None, None, None, '4278405'), ('4302', '29738285', '1401204507', None, None, None, None, None, '4278405'), ('4302', '29738285', '1401204503', None, None, None, None, None, '4278405'), ('4302', '29738285', '1401204500', None, None, None, None, None, '4278405'), ('4302', '29738285', '1401204498', None, None, None, None, None, '4278405'), ('4302', '29738285', '1401204497', None, None, None, None, None, '4278405')] time used for this insertion : 0.019652366638183594 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.5165185928344727 time spend to save output : 0.020044803619384766 total time spend for step 1 : 0.5365633964538574 step2:final Sat Dec 27 01:50:29 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 (29738285) 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 29738285 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1401204444,1401204441,1401204438,1401204470,1401204468,1401204467,1401204465,1401204510,1401204507,1401204503,1401204500,1401204498,1401204497,1401204529,1401204526,1401204523,1401204520); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29738285]) Inside saveOutput : final : False verbose : True original output for save of step final : {1401204529: ('0.0',), 1401204526: ('0.0',), 1401204523: ('0.0',), 1401204520: ('0.0',), 1401204510: ('0.0',), 1401204507: ('0.0',), 1401204503: ('0.0',), 1401204500: ('0.0',), 1401204498: ('0.0',), 1401204497: ('0.0',)} new output for save of step final : {1401204529: ('0.0',), 1401204526: ('0.0',), 1401204523: ('0.0',), 1401204520: ('0.0',), 1401204510: ('0.0',), 1401204507: ('0.0',), 1401204503: ('0.0',), 1401204500: ('0.0',), 1401204498: ('0.0',), 1401204497: ('0.0',)} [1401204529, 1401204526, 1401204523, 1401204520, 1401204510, 1401204507, 1401204503, 1401204500, 1401204498, 1401204497] map_info['map_portfolio_photo'] : {29738285: [1401204529, 1401204526, 1401204523, 1401204520, 1401204510, 1401204507, 1401204503, 1401204500, 1401204498, 1401204497, 1401204470, 1401204468, 1401204467, 1401204465, 1401204444, 1401204441, 1401204438]} final : False mtd_id 4302 list_pids : [1401204529, 1401204526, 1401204523, 1401204520, 1401204510, 1401204507, 1401204503, 1401204500, 1401204498, 1401204497] Looping around the photos to save general results len do output : 10 /1401204529.Didn't retrieve data . /1401204526.Didn't retrieve data . /1401204523.Didn't retrieve data . /1401204520.Didn't retrieve data . /1401204510.Didn't retrieve data . /1401204507.Didn't retrieve data . /1401204503.Didn't retrieve data . /1401204500.Didn't retrieve data . /1401204498.Didn't retrieve data . /1401204497.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, '4278405') ('4302', '29738285', '1401204529', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204526', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204523', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204520', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204510', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204507', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204503', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204500', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204498', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204497', None, None, None, None, None, '4278405') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 30 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', '29738285', '1401204529', '0.0', None, None, None, None, '4278405'), ('4302', '29738285', '1401204526', '0.0', None, None, None, None, '4278405'), ('4302', '29738285', '1401204523', '0.0', None, None, None, None, '4278405'), ('4302', '29738285', '1401204520', '0.0', None, None, None, None, '4278405'), ('4302', '29738285', '1401204510', '0.0', None, None, None, None, '4278405'), ('4302', '29738285', '1401204507', '0.0', None, None, None, None, '4278405'), ('4302', '29738285', '1401204503', '0.0', None, None, None, None, '4278405'), ('4302', '29738285', '1401204500', '0.0', None, None, None, None, '4278405'), ('4302', '29738285', '1401204498', '0.0', None, None, None, None, '4278405'), ('4302', '29738285', '1401204497', '0.0', None, None, None, None, '4278405')] time used for this insertion : 0.01788926124572754 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.07013154029846191 time spend to save output : 0.018285751342773438 total time spend for step 2 : 0.08841729164123535 step3:velours_tree Sat Dec 27 01:50:29 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 : {29738285: [{'autre_refus': 29738293, 'Teint_Dans_La_Masse': 29738294, 'Carton_gris': 29738295, 'plastique': 29738296, 'Carton_brun': 29738297, 'metal': 29738298, 'cartonnette': 29738299, 'environnement': 29738300, 'mal_croppe': 29738301, 'flou': 29738302, 'kraft': 29738303, 'papier': 29738304}]} input_args_next_step : {29738285: ()} output_args : {29738285: [{'autre_refus': 29738293, 'Teint_Dans_La_Masse': 29738294, 'Carton_gris': 29738295, 'plastique': 29738296, 'Carton_brun': 29738297, 'metal': 29738298, 'cartonnette': 29738299, 'environnement': 29738300, 'mal_croppe': 29738301, 'flou': 29738302, 'kraft': 29738303, 'papier': 29738304}]} args : 29738285 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 : ({'autre_refus': 29738293, 'Teint_Dans_La_Masse': 29738294, 'Carton_gris': 29738295, 'plastique': 29738296, 'Carton_brun': 29738297, 'metal': 29738298, 'cartonnette': 29738299, 'environnement': 29738300, 'mal_croppe': 29738301, 'flou': 29738302, 'kraft': 29738303, 'papier': 29738304},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29738285) 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([29738285]) 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.2714715003967285 time spend to save output : 4.1484832763671875e-05 total time spend for step 3 : 0.2715129852294922 step4:send_mail_cod Sat Dec 27 01:50:30 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 : {1401204529: ('0.0',), 1401204526: ('0.0',), 1401204523: ('0.0',), 1401204520: ('0.0',), 1401204510: ('0.0',), 1401204507: ('0.0',), 1401204503: ('0.0',), 1401204500: ('0.0',), 1401204498: ('0.0',), 1401204497: ('0.0',)} input_args_next_step : {1401204529: ()} output_args : {1401204529: ('0.0',), 1401204526: ('0.0',), 1401204523: ('0.0',), 1401204520: ('0.0',), 1401204510: ('0.0',), 1401204507: ('0.0',), 1401204503: ('0.0',), 1401204500: ('0.0',), 1401204498: ('0.0',), 1401204497: ('0.0',)} args : 1401204529 depend.output_id : 0 input_args_next_step : {1401204529: ('0.0',), 1401204526: ()} output_args : {1401204529: ('0.0',), 1401204526: ('0.0',), 1401204523: ('0.0',), 1401204520: ('0.0',), 1401204510: ('0.0',), 1401204507: ('0.0',), 1401204503: ('0.0',), 1401204500: ('0.0',), 1401204498: ('0.0',), 1401204497: ('0.0',)} args : 1401204526 depend.output_id : 0 input_args_next_step : {1401204529: ('0.0',), 1401204526: ('0.0',), 1401204523: ()} output_args : {1401204529: ('0.0',), 1401204526: ('0.0',), 1401204523: ('0.0',), 1401204520: ('0.0',), 1401204510: ('0.0',), 1401204507: ('0.0',), 1401204503: ('0.0',), 1401204500: ('0.0',), 1401204498: ('0.0',), 1401204497: ('0.0',)} args : 1401204523 depend.output_id : 0 input_args_next_step : {1401204529: ('0.0',), 1401204526: ('0.0',), 1401204523: ('0.0',), 1401204520: ()} output_args : {1401204529: ('0.0',), 1401204526: ('0.0',), 1401204523: ('0.0',), 1401204520: ('0.0',), 1401204510: ('0.0',), 1401204507: ('0.0',), 1401204503: ('0.0',), 1401204500: ('0.0',), 1401204498: ('0.0',), 1401204497: ('0.0',)} args : 1401204520 depend.output_id : 0 input_args_next_step : {1401204529: ('0.0',), 1401204526: ('0.0',), 1401204523: ('0.0',), 1401204520: ('0.0',), 1401204510: ()} output_args : {1401204529: ('0.0',), 1401204526: ('0.0',), 1401204523: ('0.0',), 1401204520: ('0.0',), 1401204510: ('0.0',), 1401204507: ('0.0',), 1401204503: ('0.0',), 1401204500: ('0.0',), 1401204498: ('0.0',), 1401204497: ('0.0',)} args : 1401204510 depend.output_id : 0 input_args_next_step : {1401204529: ('0.0',), 1401204526: ('0.0',), 1401204523: ('0.0',), 1401204520: ('0.0',), 1401204510: ('0.0',), 1401204507: ()} output_args : {1401204529: ('0.0',), 1401204526: ('0.0',), 1401204523: ('0.0',), 1401204520: ('0.0',), 1401204510: ('0.0',), 1401204507: ('0.0',), 1401204503: ('0.0',), 1401204500: ('0.0',), 1401204498: ('0.0',), 1401204497: ('0.0',)} args : 1401204507 depend.output_id : 0 input_args_next_step : {1401204529: ('0.0',), 1401204526: ('0.0',), 1401204523: ('0.0',), 1401204520: ('0.0',), 1401204510: ('0.0',), 1401204507: ('0.0',), 1401204503: ()} output_args : {1401204529: ('0.0',), 1401204526: ('0.0',), 1401204523: ('0.0',), 1401204520: ('0.0',), 1401204510: ('0.0',), 1401204507: ('0.0',), 1401204503: ('0.0',), 1401204500: ('0.0',), 1401204498: ('0.0',), 1401204497: ('0.0',)} args : 1401204503 depend.output_id : 0 input_args_next_step : {1401204529: ('0.0',), 1401204526: ('0.0',), 1401204523: ('0.0',), 1401204520: ('0.0',), 1401204510: ('0.0',), 1401204507: ('0.0',), 1401204503: ('0.0',), 1401204500: ()} output_args : {1401204529: ('0.0',), 1401204526: ('0.0',), 1401204523: ('0.0',), 1401204520: ('0.0',), 1401204510: ('0.0',), 1401204507: ('0.0',), 1401204503: ('0.0',), 1401204500: ('0.0',), 1401204498: ('0.0',), 1401204497: ('0.0',)} args : 1401204500 depend.output_id : 0 input_args_next_step : {1401204529: ('0.0',), 1401204526: ('0.0',), 1401204523: ('0.0',), 1401204520: ('0.0',), 1401204510: ('0.0',), 1401204507: ('0.0',), 1401204503: ('0.0',), 1401204500: ('0.0',), 1401204498: ()} output_args : {1401204529: ('0.0',), 1401204526: ('0.0',), 1401204523: ('0.0',), 1401204520: ('0.0',), 1401204510: ('0.0',), 1401204507: ('0.0',), 1401204503: ('0.0',), 1401204500: ('0.0',), 1401204498: ('0.0',), 1401204497: ('0.0',)} args : 1401204498 depend.output_id : 0 input_args_next_step : {1401204529: ('0.0',), 1401204526: ('0.0',), 1401204523: ('0.0',), 1401204520: ('0.0',), 1401204510: ('0.0',), 1401204507: ('0.0',), 1401204503: ('0.0',), 1401204500: ('0.0',), 1401204498: ('0.0',), 1401204497: ()} output_args : {1401204529: ('0.0',), 1401204526: ('0.0',), 1401204523: ('0.0',), 1401204520: ('0.0',), 1401204510: ('0.0',), 1401204507: ('0.0',), 1401204503: ('0.0',), 1401204500: ('0.0',), 1401204498: ('0.0',), 1401204497: ('0.0',)} args : 1401204497 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 : {29738285: [{'autre_refus': 29738293, 'Teint_Dans_La_Masse': 29738294, 'Carton_gris': 29738295, 'plastique': 29738296, 'Carton_brun': 29738297, 'metal': 29738298, 'cartonnette': 29738299, 'environnement': 29738300, 'mal_croppe': 29738301, 'flou': 29738302, 'kraft': 29738303, 'papier': 29738304}]} input_args_next_step : {1401204529: ('0.0',), 1401204526: ('0.0',), 1401204523: ('0.0',), 1401204520: ('0.0',), 1401204510: ('0.0',), 1401204507: ('0.0',), 1401204503: ('0.0',), 1401204500: ('0.0',), 1401204498: ('0.0',), 1401204497: ('0.0',), 29738285: ()} output_args : {29738285: [{'autre_refus': 29738293, 'Teint_Dans_La_Masse': 29738294, 'Carton_gris': 29738295, 'plastique': 29738296, 'Carton_brun': 29738297, 'metal': 29738298, 'cartonnette': 29738299, 'environnement': 29738300, 'mal_croppe': 29738301, 'flou': 29738302, 'kraft': 29738303, 'papier': 29738304}]} args : 29738285 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 :11, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29738285) 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 (1401204529,1401204526,1401204523,1401204520,1401204510,1401204507,1401204503,1401204500,1401204498,1401204497) Found this number of photos: 10 ##### Call download_photos : nb_thread : 5 begin to download photo : 1401204497 begin to download photo : 1401204503 begin to download photo : 1401204520 begin to download photo : 1401204529 download finish for photo 1401204529 download finish for photo 1401204503 begin to download photo : 1401204507 download finish for photo 1401204520 begin to download photo : 1401204523 download finish for photo 1401204497 begin to download photo : 1401204498 download finish for photo 1401204507 begin to download photo : 1401204510 download finish for photo 1401204498 begin to download photo : 1401204500 download finish for photo 1401204523 begin to download photo : 1401204526 download finish for photo 1401204510 download finish for photo 1401204526 download finish for photo 1401204500 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette297382931766796630/ imagette297382961766796630/ imagette297382981766796630/ imagette297382991766796630/ imagette297383011766796630/ imagette297383021766796630/ imagette297383031766796630/ imagette297382941766796630/ imagette297382951766796630/ imagette297382971766796630/ length of list_filenames : 10 ; length of list_pids : 10 ; length of list_args : 10 results_Auto_P29738285_27-12-2025_01_50_30.pdf 29738293 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=29738293 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette297382931766796630 29738296 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=29738296 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette297382961766796630 29738298 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=29738298 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette297382981766796630 29738299 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=29738299 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette297382991766796630 29738301 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=29738301 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette297383011766796630 29738302 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=29738302 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette297383021766796630 29738303 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=29738303 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette297383031766796630 29738294 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=29738294 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette297382941766796630 29738295 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=29738295 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette297382951766796630 29738297 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=29738297 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette297382971766796630 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=29738285 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/29738306,29738307,29738308,29738309,29738310,29738311,29738312,29738313,29738314,29738315,29738316,29738317?tags=autre_refus,Teint_Dans_La_Masse,Carton_gris,plastique,Carton_brun,metal,cartonnette,environnement,mal_croppe,flou,kraft,papier your option no_mail is active, we will not send the real mail to your client args[1401204529] : ('0.0',) no score found for photo 1401204529 We are sending mail with results at report@fotonower.com args[1401204526] : ('0.0',) no score found for photo 1401204526 We are sending mail with results at report@fotonower.com args[1401204523] : ('0.0',) no score found for photo 1401204523 We are sending mail with results at report@fotonower.com args[1401204520] : ('0.0',) no score found for photo 1401204520 We are sending mail with results at report@fotonower.com args[1401204510] : ('0.0',) no score found for photo 1401204510 We are sending mail with results at report@fotonower.com args[1401204507] : ('0.0',) no score found for photo 1401204507 We are sending mail with results at report@fotonower.com args[1401204503] : ('0.0',) no score found for photo 1401204503 We are sending mail with results at report@fotonower.com args[1401204500] : ('0.0',) no score found for photo 1401204500 We are sending mail with results at report@fotonower.com args[1401204498] : ('0.0',) no score found for photo 1401204498 We are sending mail with results at report@fotonower.com args[1401204497] : ('0.0',) no score found for photo 1401204497 We are sending mail with results at report@fotonower.com refus_total : 0.0 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29738285 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_P29738285_27-12-2025_01_50_30.pdf results_Auto_P29738285_27-12-2025_01_50_30.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29738285_27-12-2025_01_50_30.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','29738285','results_Auto_P29738285_27-12-2025_01_50_30.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29738285_27-12-2025_01_50_30.pdf','pdf','','0.1','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29738285]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1401204529, 1401204526, 1401204523, 1401204520, 1401204510, 1401204507, 1401204503, 1401204500, 1401204498, 1401204497] map_info['map_portfolio_photo'] : {29738285: [1401204529, 1401204526, 1401204523, 1401204520, 1401204510, 1401204507, 1401204503, 1401204500, 1401204498, 1401204497, 1401204470, 1401204468, 1401204467, 1401204465, 1401204444, 1401204441, 1401204438]} final : False mtd_id 4302 list_pids : [1401204529, 1401204526, 1401204523, 1401204520, 1401204510, 1401204507, 1401204503, 1401204500, 1401204498, 1401204497] 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, '4278405') ('4302', '29738285', '1401204529', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204526', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204523', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204520', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204510', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204507', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204503', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204500', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204498', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204497', None, None, None, None, None, '4278405') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '29738285', '1401204529', None, None, None, None, None, '4278405'), ('4302', '29738285', '1401204526', None, None, None, None, None, '4278405'), ('4302', '29738285', '1401204523', None, None, None, None, None, '4278405'), ('4302', '29738285', '1401204520', None, None, None, None, None, '4278405'), ('4302', '29738285', '1401204510', None, None, None, None, None, '4278405'), ('4302', '29738285', '1401204507', None, None, None, None, None, '4278405'), ('4302', '29738285', '1401204503', None, None, None, None, None, '4278405'), ('4302', '29738285', '1401204500', None, None, None, None, None, '4278405'), ('4302', '29738285', '1401204498', None, None, None, None, None, '4278405'), ('4302', '29738285', '1401204497', None, None, None, None, None, '4278405')] time used for this insertion : 0.015518665313720703 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.6704840660095215 time spend to save output : 0.015742778778076172 total time spend for step 4 : 1.6862268447875977 step5:split_time_score Sat Dec 27 01:50:31 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 : ['29738285'] 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 : [('29738285',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29738285) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1401204529: {'path': 'temp/1766796630_4112071_1401204529_ee31758013715374040e962a7aeb00f0.jpg', 'extension': 'jpg'}, 1401204503: {'path': 'temp/1766796630_4112071_1401204503_d9cfac77f477a40c81586275c9586c9b.jpg', 'extension': 'jpg'}, 1401204507: {'path': 'temp/1766796630_4112071_1401204507_b85a2e30a2bc1d22da5ff56b155b547b.jpg', 'extension': 'jpg'}, 1401204510: {'path': 'temp/1766796630_4112071_1401204510_03990094e7e22e4a8beee43eea4fc995.jpg', 'extension': 'jpg'}, 1401204520: {'path': 'temp/1766796630_4112071_1401204520_089c5e9cb50812b9821f7060a16aa4e7.jpg', 'extension': 'jpg'}, 1401204523: {'path': 'temp/1766796630_4112071_1401204523_d6a24a33aa9ade0743285cb1b48d5872.jpg', 'extension': 'jpg'}, 1401204526: {'path': 'temp/1766796630_4112071_1401204526_8da46ed3ddef873ed493ef56b8c5a3d6.jpg', 'extension': 'jpg'}, 1401204497: {'path': 'temp/1766796630_4112071_1401204497_825b45cce983949f32546c36abcc538c.jpg', 'extension': 'jpg'}, 1401204498: {'path': 'temp/1766796630_4112071_1401204498_1b45dca0519f1844a896bd4cdd73dbc5.jpg', 'extension': 'jpg'}, 1401204500: {'path': 'temp/1766796630_4112071_1401204500_a45d144c553ac74a17796f3c4002257b.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 = 29738285; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm',)) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos_view ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 29738285 group by h (('01', 17),) 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=29738285 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 (29738285) 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 (29738285) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 27122025 29738285 Nombre de photos uploadées : 17 / 23040 (0%) 27122025 29738285 Nombre de photos taguées (types de déchets): 0 / 17 (0%) 27122025 29738285 Nombre de photos taguées (volume) : 0 / 17 (0%) [{'photo_id': 1401204444, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/27/356140f036de112def2cf894b965c8ef.jpg', 'username': None, 'uploaded_at': 1766796367, 'text': 'image_27122025_01_45_04_10156.jpg'}, {'photo_id': 1401204441, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/27/79639e0d05c14ca29ede5af7996dd2dc.jpg', 'username': None, 'uploaded_at': 1766796367, 'text': 'image_27122025_01_45_13_9127.jpg'}, {'photo_id': 1401204438, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/27/cdf3df13c181775f39d03729dd18840d.jpg', 'username': None, 'uploaded_at': 1766796367, 'text': 'image_27122025_01_45_24_10207.jpg'}, {'photo_id': 1401204470, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/27/1206acc2a86f2c532427845bc3a97e9f.jpg', 'username': None, 'uploaded_at': 1766796427, 'text': 'image_27122025_01_45_34_10133.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.6689300537109375e-06 elapsed_time : order_list_meta_photo_and_scores 4.76837158203125e-06 ????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0007832050323486328 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 29738285, '2025-12-27' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2799542,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.23247313499450684 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= 2799542 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2799542, 'dashboard_run_id': 2806368, 'mtr_portfolio_id': 29734974, 'dashboard_result_id': 18764252, '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_P29734974_27-12-2025_00_21_14.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29734977, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29734978, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29734979, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29734980, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29734981, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29734982, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29734983, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29734984, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29734985, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29734986, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29734987, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29734988, 'pht': 3726}}"}, {'dashboat_entry_day': 2799542, 'dashboard_run_id': 2806368, 'mtr_portfolio_id': 29735551, 'dashboard_result_id': 18764253, '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_P29735551_27-12-2025_00_33_30.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29735552, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29735553, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29735554, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29735555, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29735556, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29735557, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29735558, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29735559, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29735560, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29735561, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29735562, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29735563, 'pht': 3726}}"}, {'dashboat_entry_day': 2799542, 'dashboard_run_id': 2806368, 'mtr_portfolio_id': 29736123, 'dashboard_result_id': 18764254, '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_P29736123_27-12-2025_00_48_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29736128, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29736129, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29736130, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29736131, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29736132, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29736133, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29736134, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29736135, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29736136, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29736137, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29736138, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29736139, 'pht': 3726}}"}, {'dashboat_entry_day': 2799542, 'dashboard_run_id': 2806368, 'mtr_portfolio_id': 29736757, 'dashboard_result_id': 18764255, '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_P29736757_27-12-2025_00_59_02.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29736768, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29736769, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29736770, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29736771, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29736772, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29736773, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29736774, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29736775, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29736776, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29736777, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29736778, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29736779, 'pht': 3726}}"}, {'dashboat_entry_day': 2799542, 'dashboard_run_id': 2806368, 'mtr_portfolio_id': 29738005, 'dashboard_result_id': 18764256, '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_P29738005_27-12-2025_01_49_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29738006, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29738007, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29738008, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29738009, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29738010, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29738011, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29738012, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29738013, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29738014, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29738015, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29738016, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29738017, 'pht': 3726}}"}, {'dashboat_entry_day': 2799542, 'dashboard_run_id': 2806368, 'mtr_portfolio_id': 29738285, 'dashboard_result_id': 18764257, '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_P29738285_27-12-2025_01_49_34.pdf'}"}] 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 = 29734974 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': 4278009, 'mtr_portfolio_id': 29734974, 'created_at': datetime.datetime(2025, 12, 27, 0, 21, 14), 'result': '0.06189372220972199', 'result_long': None, 'result_double': None}] Qualite : 0.06189372220972199 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29734974 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29734974_27-12-2025_00_21_14.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29734974 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_P29734974_27-12-2025_00_21_14.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29734977, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29734978, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29734979, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29734980, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29734981, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29734982, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29734983, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29734984, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29734985, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29734986, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29734987, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29734988, 'pht': 3726}}" where mtr_portfolio_id = 29734974 and dashboard_run_id = 2806368 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`=29734974 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18764252, 0.06189372220972199, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29734974_27-12-2025_00_21_14.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29734977, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29734978, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29734979, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29734980, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29734981, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29734982, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29734983, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29734984, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29734985, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29734986, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29734987, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29734988, '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 = 29735551 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': 4278057, 'mtr_portfolio_id': 29735551, 'created_at': datetime.datetime(2025, 12, 27, 0, 33, 30), 'result': '0.04343278286696159', 'result_long': None, 'result_double': None}] Qualite : 0.04343278286696159 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29735551 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29735551_27-12-2025_00_33_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29735551 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_P29735551_27-12-2025_00_33_30.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29735552, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29735553, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29735554, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29735555, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29735556, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29735557, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29735558, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29735559, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29735560, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29735561, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29735562, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29735563, 'pht': 3726}}" where mtr_portfolio_id = 29735551 and dashboard_run_id = 2806368 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`=29735551 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18764253, 0.04343278286696159, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29735551_27-12-2025_00_33_30.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29735552, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29735553, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29735554, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29735555, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29735556, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29735557, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29735558, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29735559, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29735560, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29735561, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29735562, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29735563, '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 = 29736123 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': 4278111, 'mtr_portfolio_id': 29736123, 'created_at': datetime.datetime(2025, 12, 27, 0, 48, 58), 'result': '0.03632032578658921', 'result_long': None, 'result_double': None}] Qualite : 0.03632032578658921 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29736123 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29736123_27-12-2025_00_48_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29736123 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_P29736123_27-12-2025_00_48_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29736128, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29736129, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29736130, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29736131, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29736132, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29736133, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29736134, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29736135, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29736136, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29736137, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29736138, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29736139, 'pht': 3726}}" where mtr_portfolio_id = 29736123 and dashboard_run_id = 2806368 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`=29736123 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18764254, 0.03632032578658921, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29736123_27-12-2025_00_48_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29736128, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29736129, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29736130, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29736131, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29736132, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29736133, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29736134, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29736135, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29736136, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29736137, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29736138, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29736139, '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 = 29736757 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': 4278168, 'mtr_portfolio_id': 29736757, 'created_at': datetime.datetime(2025, 12, 27, 1, 2, 57), 'result': '0.06441513042833627', 'result_long': None, 'result_double': None}] Qualite : 0.06441513042833627 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29736757 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29736757_27-12-2025_01_02_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29736757 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_P29736757_27-12-2025_01_02_58.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29736768, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29736769, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29736770, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29736771, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29736772, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29736773, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29736774, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29736775, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29736776, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29736777, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29736778, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29736779, 'pht': 3726}}" where mtr_portfolio_id = 29736757 and dashboard_run_id = 2806368 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`=29736757 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18764255, 0.06441513042833627, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29736757_27-12-2025_01_02_58.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29736768, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29736769, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29736770, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29736771, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29736772, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29736773, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29736774, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29736775, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29736776, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29736777, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29736778, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29736779, '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 = 29738005 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': 4278349, 'mtr_portfolio_id': 29738005, 'created_at': datetime.datetime(2025, 12, 27, 1, 49), 'result': '0.04821240604823577', 'result_long': None, 'result_double': None}] Qualite : 0.04821240604823577 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29738005 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29738005_27-12-2025_01_49_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29738005 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_P29738005_27-12-2025_01_49_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29738006, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29738007, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29738008, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29738009, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29738010, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29738011, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29738012, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29738013, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29738014, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29738015, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29738016, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29738017, 'pht': 3726}}" where mtr_portfolio_id = 29738005 and dashboard_run_id = 2806368 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`=29738005 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18764256, 0.04821240604823577, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29738005_27-12-2025_01_49_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29738006, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29738007, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29738008, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29738009, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29738010, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29738011, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29738012, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29738013, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29738014, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29738015, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29738016, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29738017, '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 = 29738285 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 29738285 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 29738285 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 29738285 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 29738285 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29738285 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29738285_27-12-2025_01_50_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29738285 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_P29738285_27-12-2025_01_50_30.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29738293, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29738294, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29738295, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29738296, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29738297, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29738298, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29738299, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29738300, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29738301, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29738302, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29738303, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29738304, 'pht': 3726}}" where mtr_portfolio_id = 29738285 and dashboard_run_id = 2806366 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29734974,29735551,29736123,29736757,29738005,29738285) result : ((1401181745,), (1401181747,), (1401182264,), (1401182330,), (1401182362,), (1401182394,), (1401182824,), (1401182856,), (1401182887,), (1401182921,), (1401182960,), (1401182992,), (1401183051,), (1401183056,), (1401183141,), (1401183175,), (1401183625,), (1401183659,), (1401183693,), (1401183726,), (1401183765,), (1401184168,), (1401184203,), (1401184270,), (1401184316,), (1401184913,), (1401184975,), (1401185051,), (1401185101,), (1401185146,), (1401185473,), (1401185504,), (1401185538,), (1401185572,), (1401185608,), (1401185660,), (1401185662,), (1401185665,), (1401185697,), (1401185736,), (1401186381,), (1401186429,), (1401186492,), (1401186756,), (1401186758,), (1401186761,), (1401186765,), (1401186768,), (1401186784,), (1401187014,), (1401187036,), (1401187059,), (1401187062,), (1401187133,), (1401187144,), (1401187148,), (1401187151,), (1401187162,), (1401187166,), (1401187168,), (1401187197,), (1401188289,), (1401187187,), (1401187190,), (1401187193,), (1401187195,), (1401187211,), (1401187214,), (1401187217,), (1401187225,), (1401187230,), (1401187233,), (1401187688,), (1401187771,), (1401187858,), (1401187957,), (1401188047,), (1401188143,), (1401188277,), (1401188278,), (1401188281,), (1401188284,), (1401188287,), (1401188327,), (1401188328,), (1401188412,), (1401188418,), (1401188500,), (1401188513,), (1401188628,), (1401188632,), (1401188634,), (1401189091,), (1401189303,), (1401189404,), (1401189444,), (1401189447,), (1401189451,), (1401189591,), (1401189648,), (1401189652,), (1401189675,), (1401189719,), (1401189744,), (1401189763,), (1401189766,), (1401189769,), (1401189772,), (1401189774,), (1401189775,), (1401189872,), (1401189907,), (1401189948,), (1401189983,), (1401190027,), (1401190168,), (1401190199,), (1401190231,), (1401190264,), (1401190490,), (1401190529,), (1401190561,), (1401190597,), (1401190635,), (1401190670,), (1401190863,), (1401190896,), (1401190928,), (1401190962,), (1401191576,), (1401191645,), (1401192066,), (1401192075,), (1401192077,), (1401192079,), (1401192082,), (1401192970,), (1401193080,), (1401193201,), (1401193292,), (1401193456,), (1401193562,), (1401193656,), (1401193670,), (1401193773,), (1401193777,), (1401193781,), (1401193785,), (1401193817,), (1401193770,), (1401194054,), (1401194128,), (1401194162,), (1401194197,), (1401194235,), (1401194464,), (1401194467,), (1401194470,), (1401194473,), (1401194685,), (1401194722,), (1401194726,), (1401194737,), (1401194773,), (1401194818,), (1401194969,), (1401195004,), (1401195137,), (1401195170,), (1401195205,), (1401195239,), (1401195272,), (1401195828,), (1401195915,), (1401196012,), (1401196589,), (1401196630,), (1401196633,), (1401196664,), (1401196669,), (1401196697,), (1401196735,), (1401196744,), (1401196747,), (1401196751,), (1401196755,), (1401196768,), (1401196770,), (1401196772,), (1401196807,), (1401196810,), (1401196813,), (1401196816,), (1401197175,), (1401197265,), (1401197349,), (1401197430,), (1401197495,), (1401197658,), (1401197755,), (1401197833,), (1401197838,), (1401197862,), (1401197906,), (1401197909,), (1401197911,), (1401197913,), (1401198207,), (1401198245,), (1401198279,), (1401198672,), (1401198675,), (1401198677,), (1401198680,), (1401198684,), (1401198689,), (1401198933,), (1401198887,), (1401198896,), (1401198922,), (1401198952,), (1401198955,), (1401198958,), (1401198961,), (1401198990,), (1401199002,), (1401199023,), (1401199024,), (1401199026,), (1401199029,), (1401199971,), (1401200063,), (1401200066,), (1401200342,), (1401200364,), (1401200402,), (1401200406,), (1401200414,), (1401200463,), (1401200489,), (1401200499,), (1401200501,), (1401200517,), (1401200518,), (1401200523,), (1401200526,), (1401200529,), (1401200579,), (1401200581,), (1401200583,), (1401200585,), (1401200587,), (1401200588,), (1401200596,), (1401200598,), (1401200600,), (1401200611,), (1401200613,), (1401200615,), (1401200618,), (1401200622,), (1401200636,), (1401200639,), (1401200642,), (1401200645,), (1401200649,), (1401200658,), (1401200664,), (1401200670,), (1401200674,), (1401200679,), (1401200683,), (1401200686,), (1401200690,), (1401200694,), (1401200698,), (1401200710,), (1401204078,), (1401204081,), (1401204103,), (1401204105,), (1401204107,), (1401204110,), (1401204114,), (1401204129,), (1401204131,), (1401204134,), (1401204151,), (1401204153,), (1401204155,), (1401204172,), (1401204174,), (1401204176,), (1401204179,), (1401204197,), (1401204200,), (1401204224,), (1401204226,), (1401204229,), (1401204233,), (1401204256,), (1401204258,), (1401204260,), (1401204263,), (1401204280,), (1401204283,), (1401204286,), (1401204289,), (1401204317,), (1401204318,), (1401204320,), (1401204323,), (1401204326,), (1401204328,), (1401204339,), (1401204342,), (1401204349,), (1401204351,), (1401204352,), (1401204354,), (1401204357,), (1401204387,), (1401204390,), (1401204392,), (1401204394,), (1401204397,), (1401204411,), (1401204414,), (1401204417,), (1401204419,), (1401204423,), (1401204447,), (1401204438,), (1401204441,), (1401204444,), (1401204465,), (1401204467,), (1401204468,), (1401204470,), (1401204497,), (1401204498,), (1401204500,), (1401204503,), (1401204507,), (1401204510,), (1401204520,), (1401204523,), (1401204526,), (1401204529,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'27122025': {'nb_upload': 17, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29738285]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1401204529, 1401204526, 1401204523, 1401204520, 1401204510, 1401204507, 1401204503, 1401204500, 1401204498, 1401204497] map_info['map_portfolio_photo'] : {29738285: [1401204529, 1401204526, 1401204523, 1401204520, 1401204510, 1401204507, 1401204503, 1401204500, 1401204498, 1401204497, 1401204470, 1401204468, 1401204467, 1401204465, 1401204444, 1401204441, 1401204438]} final : True mtd_id 4302 list_pids : [1401204529, 1401204526, 1401204523, 1401204520, 1401204510, 1401204507, 1401204503, 1401204500, 1401204498, 1401204497] Looping around the photos to save general results len do output : 1 /29738285Didn'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, '4278405') ('4302', '29738285', '1401204529', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204526', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204523', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204520', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204510', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204507', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204503', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204500', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204498', None, None, None, None, None, '4278405') ('4302', None, None, None, None, None, None, None, '4278405') ('4302', '29738285', '1401204497', None, None, None, None, None, '4278405') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '29738285', 'None', None, None, None, None, '4278405'), ('4302', '29738285', '1401204529', None, None, None, None, None, '4278405'), ('4302', '29738285', '1401204526', None, None, None, None, None, '4278405'), ('4302', '29738285', '1401204523', None, None, None, None, None, '4278405'), ('4302', '29738285', '1401204520', None, None, None, None, None, '4278405'), ('4302', '29738285', '1401204510', None, None, None, None, None, '4278405'), ('4302', '29738285', '1401204507', None, None, None, None, None, '4278405'), ('4302', '29738285', '1401204503', None, None, None, None, None, '4278405'), ('4302', '29738285', '1401204500', None, None, None, None, None, '4278405'), ('4302', '29738285', '1401204498', None, None, None, None, None, '4278405'), ('4302', '29738285', '1401204497', None, None, None, None, None, '4278405')] time used for this insertion : 0.014767885208129883 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.7080235481262207 time spend to save output : 0.014993429183959961 total time spend for step 5 : 0.7230169773101807 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 (4278405) 2.51user 2.00system 0:07.58elapsed 59%CPU (0avgtext+0avgdata 167968maxresident)k 176inputs+6448outputs (11major+83211minor)pagefaults 0swaps