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 : 2739119 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 (4232475) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (4232475) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29455589 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['4232475'] with mtr_portfolio_ids : ['29455589'] and first list_photo_ids : [] new path : /proc/2739119/ Name: python3 Umask: 0002 State: R (running) Tgid: 2739119 Ngid: 0 Pid: 2739119 PPid: 2739118 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 2739119 NSpid: 2739119 NSpgid: 2738747 NSsid: 2738747 VmPeak: 1113376 kB VmSize: 1113376 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 105036 kB VmRSS: 105036 kB RssAnon: 66308 kB RssFile: 38728 kB RssShmem: 0 kB VmData: 872104 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130476 kB VmPTE: 620 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: 54 nonvoluntary_ctxt_switches: 82 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '2739119', 'Ngid': '0', 'Pid': '2739119', 'PPid': '2739118', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '2739119', 'NSpid': '2739119', 'NSpgid': '2738747', 'NSsid': '2738747', 'VmPeak': '1113376 kB', 'VmSize': '1113376 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '105036 kB', 'VmRSS': '105036 kB', 'RssAnon': '66308 kB', 'RssFile': '38728 kB', 'RssShmem': '0 kB', 'VmData': '872104 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130476 kB', 'VmPTE': '620 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': '54', 'nonvoluntary_ctxt_switches': '82'} ('datou_batch_current', '2739119', '1113376', '0', '1113376', '872104', '105036', b'', 'marlene', '4232475') 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 (29455589) 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 (4232475 ) ) 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 (29455589) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1399586575, 'portfolio_id': 29455589}, {'photo_id': 1399586537, 'portfolio_id': 29455589}, {'photo_id': 1399586504, 'portfolio_id': 29455589}, {'photo_id': 1399586487, 'portfolio_id': 29455589}, {'photo_id': 1399586486, 'portfolio_id': 29455589}, {'photo_id': 1399586484, 'portfolio_id': 29455589}, {'photo_id': 1399586459, 'portfolio_id': 29455589}, {'photo_id': 1399586456, 'portfolio_id': 29455589}, {'photo_id': 1399586455, 'portfolio_id': 29455589}, {'photo_id': 1399586454, 'portfolio_id': 29455589}, {'photo_id': 1399586453, 'portfolio_id': 29455589}, {'photo_id': 1399586437, 'portfolio_id': 29455589}, {'photo_id': 1399586434, 'portfolio_id': 29455589}, {'photo_id': 1399586433, 'portfolio_id': 29455589}, {'photo_id': 1399586432, 'portfolio_id': 29455589}, {'photo_id': 1399586430, 'portfolio_id': 29455589}, {'photo_id': 1399586413, 'portfolio_id': 29455589}, {'photo_id': 1399586412, 'portfolio_id': 29455589}, {'photo_id': 1399586411, 'portfolio_id': 29455589}, {'photo_id': 1399586398, 'portfolio_id': 29455589}, {'photo_id': 1399586395, 'portfolio_id': 29455589}, {'photo_id': 1399586394, 'portfolio_id': 29455589}, {'photo_id': 1399586393, 'portfolio_id': 29455589}, {'photo_id': 1399586392, 'portfolio_id': 29455589}, {'photo_id': 1399586373, 'portfolio_id': 29455589}, {'photo_id': 1399586370, 'portfolio_id': 29455589}, {'photo_id': 1399586369, 'portfolio_id': 29455589}, {'photo_id': 1399586368, 'portfolio_id': 29455589}, {'photo_id': 1399586367, 'portfolio_id': 29455589}, {'photo_id': 1399586354, 'portfolio_id': 29455589}, {'photo_id': 1399586353, 'portfolio_id': 29455589}, {'photo_id': 1399586350, 'portfolio_id': 29455589}, {'photo_id': 1399586330, 'portfolio_id': 29455589}, {'photo_id': 1399586329, 'portfolio_id': 29455589}, {'photo_id': 1399586327, 'portfolio_id': 29455589}, {'photo_id': 1399586326, 'portfolio_id': 29455589}, {'photo_id': 1399586325, 'portfolio_id': 29455589}, {'photo_id': 1399586324, 'portfolio_id': 29455589}, {'photo_id': 1399586307, 'portfolio_id': 29455589}, {'photo_id': 1399586305, 'portfolio_id': 29455589}, {'photo_id': 1399586303, 'portfolio_id': 29455589}, {'photo_id': 1399586302, 'portfolio_id': 29455589}, {'photo_id': 1399586301, 'portfolio_id': 29455589}, {'photo_id': 1399586300, 'portfolio_id': 29455589}, {'photo_id': 1399586266, 'portfolio_id': 29455589}, {'photo_id': 1399586265, 'portfolio_id': 29455589}, {'photo_id': 1399586264, 'portfolio_id': 29455589}, {'photo_id': 1399586246, 'portfolio_id': 29455589}, {'photo_id': 1399586243, 'portfolio_id': 29455589}, {'photo_id': 1399586240, 'portfolio_id': 29455589}, {'photo_id': 1399586239, 'portfolio_id': 29455589}, {'photo_id': 1399586238, 'portfolio_id': 29455589}, {'photo_id': 1399586237, 'portfolio_id': 29455589}, {'photo_id': 1399586229, 'portfolio_id': 29455589}, {'photo_id': 1399586226, 'portfolio_id': 29455589}, {'photo_id': 1399586222, 'portfolio_id': 29455589}, {'photo_id': 1399586218, 'portfolio_id': 29455589}, {'photo_id': 1399586216, 'portfolio_id': 29455589}, {'photo_id': 1399586214, 'portfolio_id': 29455589}, {'photo_id': 1399586201, 'portfolio_id': 29455589}, {'photo_id': 1399586200, 'portfolio_id': 29455589}, {'photo_id': 1399586199, 'portfolio_id': 29455589}, {'photo_id': 1399586198, 'portfolio_id': 29455589}] map_portfolio_id_photo_id: {29455589: [1399586575, 1399586537, 1399586504, 1399586487, 1399586486, 1399586484, 1399586459, 1399586456, 1399586455, 1399586454, 1399586453, 1399586437, 1399586434, 1399586433, 1399586432, 1399586430, 1399586413, 1399586412, 1399586411, 1399586398, 1399586395, 1399586394, 1399586393, 1399586392, 1399586373, 1399586370, 1399586369, 1399586368, 1399586367, 1399586354, 1399586353, 1399586350, 1399586330, 1399586329, 1399586327, 1399586326, 1399586325, 1399586324, 1399586307, 1399586305, 1399586303, 1399586302, 1399586301, 1399586300, 1399586266, 1399586265, 1399586264, 1399586246, 1399586243, 1399586240, 1399586239, 1399586238, 1399586237, 1399586229, 1399586226, 1399586222, 1399586218, 1399586216, 1399586214, 1399586201, 1399586200, 1399586199, 1399586198]} ##### 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.020112991333007812 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Tue Dec 16 02:59:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29455589) 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 : 29455589 get user id for portfolio 29455589 get sub ptf for main ptf 29455589, type 3726 and hashtags ['plastique', 'autre_refus', 'kraft', 'mal_croppe', 'flou', 'Carton_gris', 'environnement', 'cartonnette', 'Teint_Dans_La_Masse', 'Carton_brun', 'papier', 'metal'] 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`=29455589 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','autre_refus','kraft','mal_croppe','flou','Carton_gris','environnement','cartonnette','Teint_Dans_La_Masse','Carton_brun','papier','metal')) 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`=29455589 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','autre_refus','kraft','mal_croppe','flou','Carton_gris','environnement','cartonnette','Teint_Dans_La_Masse','Carton_brun','papier','metal')) AND mptpi.`min_score`=0.5 To do returned map {'environnement': {'main_port_id': 29455589, 'sub_port_id': 29455597, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20078004, 'last_updated_at': datetime.datetime(2025, 12, 16, 2, 58, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 58, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 2, 47, 26)}, 'plastique': {'main_port_id': 29455589, 'sub_port_id': 29455598, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20078005, 'last_updated_at': datetime.datetime(2025, 12, 16, 2, 58, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 58, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 2, 47, 26)}, 'papier': {'main_port_id': 29455589, 'sub_port_id': 29455599, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20078006, 'last_updated_at': datetime.datetime(2025, 12, 16, 2, 58, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 58, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 2, 47, 26)}, 'metal': {'main_port_id': 29455589, 'sub_port_id': 29455600, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20078007, 'last_updated_at': datetime.datetime(2025, 12, 16, 2, 58, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 58, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 2, 47, 26)}, 'Carton_gris': {'main_port_id': 29455589, 'sub_port_id': 29455601, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20078008, 'last_updated_at': datetime.datetime(2025, 12, 16, 2, 58, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 58, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 2, 47, 26)}, 'Teint_Dans_La_Masse': {'main_port_id': 29455589, 'sub_port_id': 29455602, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20078009, 'last_updated_at': datetime.datetime(2025, 12, 16, 2, 58, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 58, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 2, 47, 26)}, 'flou': {'main_port_id': 29455589, 'sub_port_id': 29455603, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20078010, 'last_updated_at': datetime.datetime(2025, 12, 16, 2, 58, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 58, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 2, 47, 26)}, 'cartonnette': {'main_port_id': 29455589, 'sub_port_id': 29455604, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20078011, 'last_updated_at': datetime.datetime(2025, 12, 16, 2, 58, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 58, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 2, 47, 26)}, 'mal_croppe': {'main_port_id': 29455589, 'sub_port_id': 29455605, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20078012, 'last_updated_at': datetime.datetime(2025, 12, 16, 2, 58, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 58, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 2, 47, 26)}, 'kraft': {'main_port_id': 29455589, 'sub_port_id': 29455606, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20078013, 'last_updated_at': datetime.datetime(2025, 12, 16, 2, 58, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 58, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 2, 47, 26)}, 'autre_refus': {'main_port_id': 29455589, 'sub_port_id': 29455607, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20078014, 'last_updated_at': datetime.datetime(2025, 12, 16, 2, 58, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 58, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 2, 47, 26)}, 'Carton_brun': {'main_port_id': 29455589, 'sub_port_id': 29455608, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20078015, 'last_updated_at': datetime.datetime(2025, 12, 16, 2, 58, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 58, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 2, 47, 26)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 29455597 , 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=29455589 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 (29455597) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29455589) result : ((1399586198,), (1399586199,), (1399586200,), (1399586201,), (1399586214,), (1399586216,), (1399586218,), (1399586222,), (1399586226,), (1399586229,), (1399586237,), (1399586238,), (1399586239,), (1399586240,), (1399586243,), (1399586246,), (1399586264,), (1399586265,), (1399586266,), (1399586300,), (1399586301,), (1399586302,), (1399586303,), (1399586305,), (1399586307,), (1399586324,), (1399586325,), (1399586326,), (1399586327,), (1399586329,), (1399586330,), (1399586350,), (1399586353,), (1399586354,), (1399586367,), (1399586368,), (1399586369,), (1399586370,), (1399586373,), (1399586392,), (1399586393,), (1399586394,), (1399586395,), (1399586398,), (1399586411,), (1399586412,), (1399586413,), (1399586430,), (1399586432,), (1399586433,), (1399586434,), (1399586437,), (1399586453,), (1399586454,), (1399586455,), (1399586456,), (1399586459,), (1399586484,), (1399586486,), (1399586487,), (1399586504,), (1399586537,), (1399586575,)) 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 (1399586200,1399586300) 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 29455598 , 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=29455589 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 (29455598) result : ((1399586391,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29455589) result : ((1399586198,), (1399586199,), (1399586200,), (1399586201,), (1399586214,), (1399586216,), (1399586218,), (1399586222,), (1399586226,), (1399586229,), (1399586237,), (1399586238,), (1399586239,), (1399586240,), (1399586243,), (1399586246,), (1399586264,), (1399586265,), (1399586266,), (1399586300,), (1399586301,), (1399586302,), (1399586303,), (1399586305,), (1399586307,), (1399586324,), (1399586325,), (1399586326,), (1399586327,), (1399586329,), (1399586330,), (1399586350,), (1399586353,), (1399586354,), (1399586367,), (1399586368,), (1399586369,), (1399586370,), (1399586373,), (1399586392,), (1399586393,), (1399586394,), (1399586395,), (1399586398,), (1399586411,), (1399586412,), (1399586413,), (1399586430,), (1399586432,), (1399586433,), (1399586434,), (1399586437,), (1399586453,), (1399586454,), (1399586455,), (1399586456,), (1399586459,), (1399586484,), (1399586486,), (1399586487,), (1399586504,), (1399586537,), (1399586575,)) 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 (1399586200,1399586300) 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 29455599 , 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=29455589 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 (29455599) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29455589) result : ((1399586198,), (1399586199,), (1399586200,), (1399586201,), (1399586214,), (1399586216,), (1399586218,), (1399586222,), (1399586226,), (1399586229,), (1399586237,), (1399586238,), (1399586239,), (1399586240,), (1399586243,), (1399586246,), (1399586264,), (1399586265,), (1399586266,), (1399586300,), (1399586301,), (1399586302,), (1399586303,), (1399586305,), (1399586307,), (1399586324,), (1399586325,), (1399586326,), (1399586327,), (1399586329,), (1399586330,), (1399586350,), (1399586353,), (1399586354,), (1399586367,), (1399586368,), (1399586369,), (1399586370,), (1399586373,), (1399586392,), (1399586393,), (1399586394,), (1399586395,), (1399586398,), (1399586411,), (1399586412,), (1399586413,), (1399586430,), (1399586432,), (1399586433,), (1399586434,), (1399586437,), (1399586453,), (1399586454,), (1399586455,), (1399586456,), (1399586459,), (1399586484,), (1399586486,), (1399586487,), (1399586504,), (1399586537,), (1399586575,)) 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 (1399586200,1399586300) 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 29455600 , 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=29455589 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 (29455600) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29455589) result : ((1399586198,), (1399586199,), (1399586200,), (1399586201,), (1399586214,), (1399586216,), (1399586218,), (1399586222,), (1399586226,), (1399586229,), (1399586237,), (1399586238,), (1399586239,), (1399586240,), (1399586243,), (1399586246,), (1399586264,), (1399586265,), (1399586266,), (1399586300,), (1399586301,), (1399586302,), (1399586303,), (1399586305,), (1399586307,), (1399586324,), (1399586325,), (1399586326,), (1399586327,), (1399586329,), (1399586330,), (1399586350,), (1399586353,), (1399586354,), (1399586367,), (1399586368,), (1399586369,), (1399586370,), (1399586373,), (1399586392,), (1399586393,), (1399586394,), (1399586395,), (1399586398,), (1399586411,), (1399586412,), (1399586413,), (1399586430,), (1399586432,), (1399586433,), (1399586434,), (1399586437,), (1399586453,), (1399586454,), (1399586455,), (1399586456,), (1399586459,), (1399586484,), (1399586486,), (1399586487,), (1399586504,), (1399586537,), (1399586575,)) 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 (1399586200,1399586300) 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 29455601 , 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=29455589 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 (29455601) result : ((1399586388,), (1399586389,), (1399586417,), (1399586477,), (1399586478,), (1399586479,), (1399586738,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29455589) result : ((1399586198,), (1399586199,), (1399586200,), (1399586201,), (1399586214,), (1399586216,), (1399586218,), (1399586222,), (1399586226,), (1399586229,), (1399586237,), (1399586238,), (1399586239,), (1399586240,), (1399586243,), (1399586246,), (1399586264,), (1399586265,), (1399586266,), (1399586300,), (1399586301,), (1399586302,), (1399586303,), (1399586305,), (1399586307,), (1399586324,), (1399586325,), (1399586326,), (1399586327,), (1399586329,), (1399586330,), (1399586350,), (1399586353,), (1399586354,), (1399586367,), (1399586368,), (1399586369,), (1399586370,), (1399586373,), (1399586392,), (1399586393,), (1399586394,), (1399586395,), (1399586398,), (1399586411,), (1399586412,), (1399586413,), (1399586430,), (1399586432,), (1399586433,), (1399586434,), (1399586437,), (1399586453,), (1399586454,), (1399586455,), (1399586456,), (1399586459,), (1399586484,), (1399586486,), (1399586487,), (1399586504,), (1399586537,), (1399586575,)) 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 (1399586200,1399586300) 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 29455602 , 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=29455589 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 (29455602) result : ((1399586385,), (1399586386,), (1399586387,), (1399586415,), (1399586472,), (1399586473,), (1399586474,), (1399586708,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29455589) result : ((1399586198,), (1399586199,), (1399586200,), (1399586201,), (1399586214,), (1399586216,), (1399586218,), (1399586222,), (1399586226,), (1399586229,), (1399586237,), (1399586238,), (1399586239,), (1399586240,), (1399586243,), (1399586246,), (1399586264,), (1399586265,), (1399586266,), (1399586300,), (1399586301,), (1399586302,), (1399586303,), (1399586305,), (1399586307,), (1399586324,), (1399586325,), (1399586326,), (1399586327,), (1399586329,), (1399586330,), (1399586350,), (1399586353,), (1399586354,), (1399586367,), (1399586368,), (1399586369,), (1399586370,), (1399586373,), (1399586392,), (1399586393,), (1399586394,), (1399586395,), (1399586398,), (1399586411,), (1399586412,), (1399586413,), (1399586430,), (1399586432,), (1399586433,), (1399586434,), (1399586437,), (1399586453,), (1399586454,), (1399586455,), (1399586456,), (1399586459,), (1399586484,), (1399586486,), (1399586487,), (1399586504,), (1399586537,), (1399586575,)) 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 (1399586200,1399586300) 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 29455603 , 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=29455589 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 (29455603) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29455589) result : ((1399586198,), (1399586199,), (1399586200,), (1399586201,), (1399586214,), (1399586216,), (1399586218,), (1399586222,), (1399586226,), (1399586229,), (1399586237,), (1399586238,), (1399586239,), (1399586240,), (1399586243,), (1399586246,), (1399586264,), (1399586265,), (1399586266,), (1399586300,), (1399586301,), (1399586302,), (1399586303,), (1399586305,), (1399586307,), (1399586324,), (1399586325,), (1399586326,), (1399586327,), (1399586329,), (1399586330,), (1399586350,), (1399586353,), (1399586354,), (1399586367,), (1399586368,), (1399586369,), (1399586370,), (1399586373,), (1399586392,), (1399586393,), (1399586394,), (1399586395,), (1399586398,), (1399586411,), (1399586412,), (1399586413,), (1399586430,), (1399586432,), (1399586433,), (1399586434,), (1399586437,), (1399586453,), (1399586454,), (1399586455,), (1399586456,), (1399586459,), (1399586484,), (1399586486,), (1399586487,), (1399586504,), (1399586537,), (1399586575,)) 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 (1399586200,1399586300) 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 29455604 , 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=29455589 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 (29455604) result : ((1399586376,), (1399586390,), (1399586480,), (1399586481,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29455589) result : ((1399586198,), (1399586199,), (1399586200,), (1399586201,), (1399586214,), (1399586216,), (1399586218,), (1399586222,), (1399586226,), (1399586229,), (1399586237,), (1399586238,), (1399586239,), (1399586240,), (1399586243,), (1399586246,), (1399586264,), (1399586265,), (1399586266,), (1399586300,), (1399586301,), (1399586302,), (1399586303,), (1399586305,), (1399586307,), (1399586324,), (1399586325,), (1399586326,), (1399586327,), (1399586329,), (1399586330,), (1399586350,), (1399586353,), (1399586354,), (1399586367,), (1399586368,), (1399586369,), (1399586370,), (1399586373,), (1399586392,), (1399586393,), (1399586394,), (1399586395,), (1399586398,), (1399586411,), (1399586412,), (1399586413,), (1399586430,), (1399586432,), (1399586433,), (1399586434,), (1399586437,), (1399586453,), (1399586454,), (1399586455,), (1399586456,), (1399586459,), (1399586484,), (1399586486,), (1399586487,), (1399586504,), (1399586537,), (1399586575,)) 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 (1399586200,1399586300) 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 29455605 , 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=29455589 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 (29455605) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29455589) result : ((1399586198,), (1399586199,), (1399586200,), (1399586201,), (1399586214,), (1399586216,), (1399586218,), (1399586222,), (1399586226,), (1399586229,), (1399586237,), (1399586238,), (1399586239,), (1399586240,), (1399586243,), (1399586246,), (1399586264,), (1399586265,), (1399586266,), (1399586300,), (1399586301,), (1399586302,), (1399586303,), (1399586305,), (1399586307,), (1399586324,), (1399586325,), (1399586326,), (1399586327,), (1399586329,), (1399586330,), (1399586350,), (1399586353,), (1399586354,), (1399586367,), (1399586368,), (1399586369,), (1399586370,), (1399586373,), (1399586392,), (1399586393,), (1399586394,), (1399586395,), (1399586398,), (1399586411,), (1399586412,), (1399586413,), (1399586430,), (1399586432,), (1399586433,), (1399586434,), (1399586437,), (1399586453,), (1399586454,), (1399586455,), (1399586456,), (1399586459,), (1399586484,), (1399586486,), (1399586487,), (1399586504,), (1399586537,), (1399586575,)) 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 (1399586200,1399586300) 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 29455606 , 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=29455589 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 (29455606) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29455589) result : ((1399586198,), (1399586199,), (1399586200,), (1399586201,), (1399586214,), (1399586216,), (1399586218,), (1399586222,), (1399586226,), (1399586229,), (1399586237,), (1399586238,), (1399586239,), (1399586240,), (1399586243,), (1399586246,), (1399586264,), (1399586265,), (1399586266,), (1399586300,), (1399586301,), (1399586302,), (1399586303,), (1399586305,), (1399586307,), (1399586324,), (1399586325,), (1399586326,), (1399586327,), (1399586329,), (1399586330,), (1399586350,), (1399586353,), (1399586354,), (1399586367,), (1399586368,), (1399586369,), (1399586370,), (1399586373,), (1399586392,), (1399586393,), (1399586394,), (1399586395,), (1399586398,), (1399586411,), (1399586412,), (1399586413,), (1399586430,), (1399586432,), (1399586433,), (1399586434,), (1399586437,), (1399586453,), (1399586454,), (1399586455,), (1399586456,), (1399586459,), (1399586484,), (1399586486,), (1399586487,), (1399586504,), (1399586537,), (1399586575,)) 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 (1399586200,1399586300) 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 29455607 , 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=29455589 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 (29455607) result : ((1399586476,), (1399586710,), (1399586711,), (1399586712,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29455589) result : ((1399586198,), (1399586199,), (1399586200,), (1399586201,), (1399586214,), (1399586216,), (1399586218,), (1399586222,), (1399586226,), (1399586229,), (1399586237,), (1399586238,), (1399586239,), (1399586240,), (1399586243,), (1399586246,), (1399586264,), (1399586265,), (1399586266,), (1399586300,), (1399586301,), (1399586302,), (1399586303,), (1399586305,), (1399586307,), (1399586324,), (1399586325,), (1399586326,), (1399586327,), (1399586329,), (1399586330,), (1399586350,), (1399586353,), (1399586354,), (1399586367,), (1399586368,), (1399586369,), (1399586370,), (1399586373,), (1399586392,), (1399586393,), (1399586394,), (1399586395,), (1399586398,), (1399586411,), (1399586412,), (1399586413,), (1399586430,), (1399586432,), (1399586433,), (1399586434,), (1399586437,), (1399586453,), (1399586454,), (1399586455,), (1399586456,), (1399586459,), (1399586484,), (1399586486,), (1399586487,), (1399586504,), (1399586537,), (1399586575,)) 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 (1399586200,1399586300) 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 29455608 , 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=29455589 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 (29455608) result : ((1399586419,), (1399586482,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29455589) result : ((1399586198,), (1399586199,), (1399586200,), (1399586201,), (1399586214,), (1399586216,), (1399586218,), (1399586222,), (1399586226,), (1399586229,), (1399586237,), (1399586238,), (1399586239,), (1399586240,), (1399586243,), (1399586246,), (1399586264,), (1399586265,), (1399586266,), (1399586300,), (1399586301,), (1399586302,), (1399586303,), (1399586305,), (1399586307,), (1399586324,), (1399586325,), (1399586326,), (1399586327,), (1399586329,), (1399586330,), (1399586350,), (1399586353,), (1399586354,), (1399586367,), (1399586368,), (1399586369,), (1399586370,), (1399586373,), (1399586392,), (1399586393,), (1399586394,), (1399586395,), (1399586398,), (1399586411,), (1399586412,), (1399586413,), (1399586430,), (1399586432,), (1399586433,), (1399586434,), (1399586437,), (1399586453,), (1399586454,), (1399586455,), (1399586456,), (1399586459,), (1399586484,), (1399586486,), (1399586487,), (1399586504,), (1399586537,), (1399586575,)) 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 (1399586200,1399586300) 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`=29455589 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','autre_refus','kraft','mal_croppe','flou','Carton_gris','environnement','cartonnette','Teint_Dans_La_Masse','Carton_brun','papier','metal')) 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`=29455589 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','autre_refus','kraft','mal_croppe','flou','Carton_gris','environnement','cartonnette','Teint_Dans_La_Masse','Carton_brun','papier','metal')) AND mptpi.`min_score`=0.5 To do returned map {'environnement': {'main_port_id': 29455589, 'sub_port_id': 29455610, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20078016, 'last_updated_at': datetime.datetime(2025, 12, 16, 2, 47, 28), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 47, 28), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 2, 47, 28)}, 'plastique': {'main_port_id': 29455589, 'sub_port_id': 29455611, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20078017, 'last_updated_at': datetime.datetime(2025, 12, 16, 2, 47, 28), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 47, 28), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 2, 47, 28)}, 'papier': {'main_port_id': 29455589, 'sub_port_id': 29455612, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20078018, 'last_updated_at': datetime.datetime(2025, 12, 16, 2, 47, 28), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 47, 28), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 2, 47, 28)}, 'metal': {'main_port_id': 29455589, 'sub_port_id': 29455613, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20078019, 'last_updated_at': datetime.datetime(2025, 12, 16, 2, 47, 28), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 47, 28), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 2, 47, 28)}, 'Carton_gris': {'main_port_id': 29455589, 'sub_port_id': 29455614, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20078020, 'last_updated_at': datetime.datetime(2025, 12, 16, 2, 47, 28), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 47, 28), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 2, 47, 28)}, 'Teint_Dans_La_Masse': {'main_port_id': 29455589, 'sub_port_id': 29455615, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20078021, 'last_updated_at': datetime.datetime(2025, 12, 16, 2, 47, 28), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 47, 28), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 2, 47, 28)}, 'flou': {'main_port_id': 29455589, 'sub_port_id': 29455616, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20078022, 'last_updated_at': datetime.datetime(2025, 12, 16, 2, 47, 28), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 47, 28), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 2, 47, 28)}, 'cartonnette': {'main_port_id': 29455589, 'sub_port_id': 29455617, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20078023, 'last_updated_at': datetime.datetime(2025, 12, 16, 2, 47, 28), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 47, 28), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 2, 47, 28)}, 'mal_croppe': {'main_port_id': 29455589, 'sub_port_id': 29455618, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20078024, 'last_updated_at': datetime.datetime(2025, 12, 16, 2, 47, 28), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 47, 28), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 2, 47, 28)}, 'kraft': {'main_port_id': 29455589, 'sub_port_id': 29455619, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20078025, 'last_updated_at': datetime.datetime(2025, 12, 16, 2, 47, 28), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 47, 28), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 2, 47, 28)}, 'autre_refus': {'main_port_id': 29455589, 'sub_port_id': 29455620, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20078026, 'last_updated_at': datetime.datetime(2025, 12, 16, 2, 47, 28), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 47, 28), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 2, 47, 28)}, 'Carton_brun': {'main_port_id': 29455589, 'sub_port_id': 29455621, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20078027, 'last_updated_at': datetime.datetime(2025, 12, 16, 2, 58, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 58, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 2, 47, 28)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29455610,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29455597 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29455611,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29455598 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29455612,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29455599 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29455613,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29455600 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29455614,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29455601 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29455615,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29455602 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29455616,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29455603 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29455617,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29455604 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29455618,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29455605 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29455619,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29455606 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29455620,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29455607 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29455621,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29455608 lien utilise dans velours : https://marlene.fotonower.com/velours/29455610,29455611,29455612,29455613,29455614,29455615,29455616,29455617,29455618,29455619,29455620,29455621?tags=environnement,plastique,papier,metal,Carton_gris,Teint_Dans_La_Masse,flou,cartonnette,mal_croppe,kraft,autre_refus,Carton_brun After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29455589]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1399586575, 1399586537, 1399586504, 1399586487, 1399586486, 1399586484] map_info['map_portfolio_photo'] : {29455589: [1399586575, 1399586537, 1399586504, 1399586487, 1399586486, 1399586484, 1399586459, 1399586456, 1399586455, 1399586454, 1399586453, 1399586437, 1399586434, 1399586433, 1399586432, 1399586430, 1399586413, 1399586412, 1399586411, 1399586398, 1399586395, 1399586394, 1399586393, 1399586392, 1399586373, 1399586370, 1399586369, 1399586368, 1399586367, 1399586354, 1399586353, 1399586350, 1399586330, 1399586329, 1399586327, 1399586326, 1399586325, 1399586324, 1399586307, 1399586305, 1399586303, 1399586302, 1399586301, 1399586300, 1399586266, 1399586265, 1399586264, 1399586246, 1399586243, 1399586240, 1399586239, 1399586238, 1399586237, 1399586229, 1399586226, 1399586222, 1399586218, 1399586216, 1399586214, 1399586201, 1399586200, 1399586199, 1399586198]} final : False mtd_id 4302 list_pids : [1399586575, 1399586537, 1399586504, 1399586487, 1399586486, 1399586484] Looping around the photos to save general results len do output : 1 /29455589. 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, '4232475') ('4302', '29455589', '1399586575', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586537', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586504', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586487', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586486', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586484', None, None, None, None, None, '4232475') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '29455589', "{'environnement': 29455597, 'plastique': 29455598, 'papier': 29455599, 'metal': 29455600, 'Carton_gris': 29455601, 'Teint_Dans_La_Masse': 29455602, 'flou': 29455603, 'cartonnette': 29455604, 'mal_croppe': 29455605, 'kraft': 29455606, 'autre_refus': 29455607, 'Carton_brun': 29455608}", None, None, None, None, '4232475'), ('4302', '29455589', '1399586575', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586537', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586504', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586487', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586486', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586484', None, None, None, None, None, '4232475')] time used for this insertion : 0.014810562133789062 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.5424201488494873 time spend to save output : 0.014954566955566406 total time spend for step 1 : 0.5573747158050537 step2:final Tue Dec 16 02:59:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29455589) 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 29455589 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1399586201,1399586200,1399586199,1399586198,1399586229,1399586226,1399586222,1399586218,1399586216,1399586214,1399586246,1399586243,1399586240,1399586239,1399586238,1399586237,1399586266,1399586265,1399586264,1399586307,1399586305,1399586303,1399586302,1399586301,1399586300,1399586330,1399586329,1399586327,1399586326,1399586325,1399586324,1399586354,1399586353,1399586350,1399586373,1399586370,1399586369,1399586368,1399586367,1399586398,1399586395,1399586394,1399586393,1399586392,1399586413,1399586412,1399586411,1399586437,1399586434,1399586433,1399586432,1399586430,1399586459,1399586456,1399586455,1399586454,1399586453,1399586575,1399586537,1399586504,1399586487,1399586486,1399586484); insert ignore into MTRUser.portfolio_carac_ratio (portfolio_id, hashtag_type, hashtag_id, value) values (%s,%s,%s,%s) on DUPLICATE KEY UPDATE value=VALUES(value) After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29455589]) Inside saveOutput : final : False verbose : True original output for save of step final : {1399586575: ('0.04790620638915017',), 1399586537: ('0.04790620638915017',), 1399586504: ('0.04790620638915017',), 1399586487: ('0.04790620638915017',), 1399586486: ('0.04790620638915017',), 1399586484: ('0.04790620638915017',)} new output for save of step final : {1399586575: ('0.04790620638915017',), 1399586537: ('0.04790620638915017',), 1399586504: ('0.04790620638915017',), 1399586487: ('0.04790620638915017',), 1399586486: ('0.04790620638915017',), 1399586484: ('0.04790620638915017',)} [1399586575, 1399586537, 1399586504, 1399586487, 1399586486, 1399586484] map_info['map_portfolio_photo'] : {29455589: [1399586575, 1399586537, 1399586504, 1399586487, 1399586486, 1399586484, 1399586459, 1399586456, 1399586455, 1399586454, 1399586453, 1399586437, 1399586434, 1399586433, 1399586432, 1399586430, 1399586413, 1399586412, 1399586411, 1399586398, 1399586395, 1399586394, 1399586393, 1399586392, 1399586373, 1399586370, 1399586369, 1399586368, 1399586367, 1399586354, 1399586353, 1399586350, 1399586330, 1399586329, 1399586327, 1399586326, 1399586325, 1399586324, 1399586307, 1399586305, 1399586303, 1399586302, 1399586301, 1399586300, 1399586266, 1399586265, 1399586264, 1399586246, 1399586243, 1399586240, 1399586239, 1399586238, 1399586237, 1399586229, 1399586226, 1399586222, 1399586218, 1399586216, 1399586214, 1399586201, 1399586200, 1399586199, 1399586198]} final : False mtd_id 4302 list_pids : [1399586575, 1399586537, 1399586504, 1399586487, 1399586486, 1399586484] Looping around the photos to save general results len do output : 6 /1399586575.Didn't retrieve data . /1399586537.Didn't retrieve data . /1399586504.Didn't retrieve data . /1399586487.Didn't retrieve data . /1399586486.Didn't retrieve data . /1399586484.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, '4232475') ('4302', '29455589', '1399586575', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586537', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586504', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586487', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586486', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586484', None, None, None, None, None, '4232475') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 18 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '29455589', '1399586575', '0.04790620638915017', None, None, None, None, '4232475'), ('4302', '29455589', '1399586537', '0.04790620638915017', None, None, None, None, '4232475'), ('4302', '29455589', '1399586504', '0.04790620638915017', None, None, None, None, '4232475'), ('4302', '29455589', '1399586487', '0.04790620638915017', None, None, None, None, '4232475'), ('4302', '29455589', '1399586486', '0.04790620638915017', None, None, None, None, '4232475'), ('4302', '29455589', '1399586484', '0.04790620638915017', None, None, None, None, '4232475')] time used for this insertion : 0.013900041580200195 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.07996249198913574 time spend to save output : 0.014085054397583008 total time spend for step 2 : 0.09404754638671875 step3:velours_tree Tue Dec 16 02:59:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {29455589: [{'environnement': 29455597, 'plastique': 29455598, 'papier': 29455599, 'metal': 29455600, 'Carton_gris': 29455601, 'Teint_Dans_La_Masse': 29455602, 'flou': 29455603, 'cartonnette': 29455604, 'mal_croppe': 29455605, 'kraft': 29455606, 'autre_refus': 29455607, 'Carton_brun': 29455608}]} input_args_next_step : {29455589: ()} output_args : {29455589: [{'environnement': 29455597, 'plastique': 29455598, 'papier': 29455599, 'metal': 29455600, 'Carton_gris': 29455601, 'Teint_Dans_La_Masse': 29455602, 'flou': 29455603, 'cartonnette': 29455604, 'mal_croppe': 29455605, 'kraft': 29455606, 'autre_refus': 29455607, 'Carton_brun': 29455608}]} args : 29455589 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 : ({'environnement': 29455597, 'plastique': 29455598, 'papier': 29455599, 'metal': 29455600, 'Carton_gris': 29455601, 'Teint_Dans_La_Masse': 29455602, 'flou': 29455603, 'cartonnette': 29455604, 'mal_croppe': 29455605, 'kraft': 29455606, 'autre_refus': 29455607, 'Carton_brun': 29455608},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29455589) 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([29455589]) 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.24227237701416016 time spend to save output : 5.793571472167969e-05 total time spend for step 3 : 0.24233031272888184 step4:send_mail_cod Tue Dec 16 02:59:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1399586575: ('0.04790620638915017',), 1399586537: ('0.04790620638915017',), 1399586504: ('0.04790620638915017',), 1399586487: ('0.04790620638915017',), 1399586486: ('0.04790620638915017',), 1399586484: ('0.04790620638915017',)} input_args_next_step : {1399586575: ()} output_args : {1399586575: ('0.04790620638915017',), 1399586537: ('0.04790620638915017',), 1399586504: ('0.04790620638915017',), 1399586487: ('0.04790620638915017',), 1399586486: ('0.04790620638915017',), 1399586484: ('0.04790620638915017',)} args : 1399586575 depend.output_id : 0 input_args_next_step : {1399586575: ('0.04790620638915017',), 1399586537: ()} output_args : {1399586575: ('0.04790620638915017',), 1399586537: ('0.04790620638915017',), 1399586504: ('0.04790620638915017',), 1399586487: ('0.04790620638915017',), 1399586486: ('0.04790620638915017',), 1399586484: ('0.04790620638915017',)} args : 1399586537 depend.output_id : 0 input_args_next_step : {1399586575: ('0.04790620638915017',), 1399586537: ('0.04790620638915017',), 1399586504: ()} output_args : {1399586575: ('0.04790620638915017',), 1399586537: ('0.04790620638915017',), 1399586504: ('0.04790620638915017',), 1399586487: ('0.04790620638915017',), 1399586486: ('0.04790620638915017',), 1399586484: ('0.04790620638915017',)} args : 1399586504 depend.output_id : 0 input_args_next_step : {1399586575: ('0.04790620638915017',), 1399586537: ('0.04790620638915017',), 1399586504: ('0.04790620638915017',), 1399586487: ()} output_args : {1399586575: ('0.04790620638915017',), 1399586537: ('0.04790620638915017',), 1399586504: ('0.04790620638915017',), 1399586487: ('0.04790620638915017',), 1399586486: ('0.04790620638915017',), 1399586484: ('0.04790620638915017',)} args : 1399586487 depend.output_id : 0 input_args_next_step : {1399586575: ('0.04790620638915017',), 1399586537: ('0.04790620638915017',), 1399586504: ('0.04790620638915017',), 1399586487: ('0.04790620638915017',), 1399586486: ()} output_args : {1399586575: ('0.04790620638915017',), 1399586537: ('0.04790620638915017',), 1399586504: ('0.04790620638915017',), 1399586487: ('0.04790620638915017',), 1399586486: ('0.04790620638915017',), 1399586484: ('0.04790620638915017',)} args : 1399586486 depend.output_id : 0 input_args_next_step : {1399586575: ('0.04790620638915017',), 1399586537: ('0.04790620638915017',), 1399586504: ('0.04790620638915017',), 1399586487: ('0.04790620638915017',), 1399586486: ('0.04790620638915017',), 1399586484: ()} output_args : {1399586575: ('0.04790620638915017',), 1399586537: ('0.04790620638915017',), 1399586504: ('0.04790620638915017',), 1399586487: ('0.04790620638915017',), 1399586486: ('0.04790620638915017',), 1399586484: ('0.04790620638915017',)} args : 1399586484 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 : {29455589: [{'environnement': 29455597, 'plastique': 29455598, 'papier': 29455599, 'metal': 29455600, 'Carton_gris': 29455601, 'Teint_Dans_La_Masse': 29455602, 'flou': 29455603, 'cartonnette': 29455604, 'mal_croppe': 29455605, 'kraft': 29455606, 'autre_refus': 29455607, 'Carton_brun': 29455608}]} input_args_next_step : {1399586575: ('0.04790620638915017',), 1399586537: ('0.04790620638915017',), 1399586504: ('0.04790620638915017',), 1399586487: ('0.04790620638915017',), 1399586486: ('0.04790620638915017',), 1399586484: ('0.04790620638915017',), 29455589: ()} output_args : {29455589: [{'environnement': 29455597, 'plastique': 29455598, 'papier': 29455599, 'metal': 29455600, 'Carton_gris': 29455601, 'Teint_Dans_La_Masse': 29455602, 'flou': 29455603, 'cartonnette': 29455604, 'mal_croppe': 29455605, 'kraft': 29455606, 'autre_refus': 29455607, 'Carton_brun': 29455608}]} args : 29455589 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :7, first value : ('0.04790620638915017',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29455589) 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 (1399586575,1399586537,1399586504,1399586487,1399586486,1399586484) Found this number of photos: 6 ##### Call download_photos : nb_thread : 5 begin to download photo : 1399586484 begin to download photo : 1399586487 begin to download photo : 1399586537 download finish for photo 1399586484 begin to download photo : 1399586486 download finish for photo 1399586537 begin to download photo : 1399586575 download finish for photo 1399586487 begin to download photo : 1399586504 download finish for photo 1399586486 download finish for photo 1399586575 download finish for photo 1399586504 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos length of list_filenames : 6 ; length of list_pids : 6 ; length of list_args : 6 results_Auto_P29455589_16-12-2025_02_59_58.pdf 29455598 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=29455598 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1399586391: '1765850007_3414878_1399586239_cec4298fbcc9a5ab438f6c4d085e0981_rle_crop_4071502347_0.png'} change filename to text .imagette294555981765850398/ imagette294555981765850398/1765850007_3414878_1399586239_cec4298fbcc9a5ab438f6c4d085e0981_rle_crop_4071502347_0.png.png imagette294556001765850399/ imagette294556031765850399/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/3d0d209e84faf582c91e95d0672204e8_76481905.png imagette294555981765850398 29455600 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=29455600 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette294556001765850399 29455603 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=29455603 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette294556031765850399 29455604 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=29455604 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1399586376: '1765849985_3414477_1399586264_71a23e7fb34e9f5025f7145271df9846_rle_crop_4071502142_0.png', 1399586390: '1765850007_3414878_1399586237_ba4fb434b6fe8a91840ee4a75ba28afc_rle_crop_4071502368_0.png', 1399586480: '1765850227_3423357_1399586354_9a94ec9f8441f5431b21899ec713ecaa_rle_crop_4071509047_0.png', 1399586481: '1765850227_3423357_1399586326_456560cca0b050d127f05d642afa7a18_rle_crop_4071509431_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/524a92736a3dfb6dbfee3e2ac327134d_79475400.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/dcbce6060ddf3a161b593a201d9dffee_77170678.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/9d1061c3b9bfb0eb25b2389f7acbe4ee_95559489.png change filename to text .imagette294556041765850399/ imagette294556041765850399/1765850227_3423357_1399586326_456560cca0b050d127f05d642afa7a18_rle_crop_4071509431_0.png.png imagette294556041765850399/1765850227_3423357_1399586354_9a94ec9f8441f5431b21899ec713ecaa_rle_crop_4071509047_0.png.png imagette294556041765850399/1765850007_3414878_1399586237_ba4fb434b6fe8a91840ee4a75ba28afc_rle_crop_4071502368_0.png.png imagette294556041765850399/1765849985_3414477_1399586264_71a23e7fb34e9f5025f7145271df9846_rle_crop_4071502142_0.png.png imagette294556051765850399/ imagette294556061765850399/ wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/8ed8ff9ddcf728702f2201fe87df7b7a_7097016.png imagette294556041765850399 29455605 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=29455605 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette294556051765850399 29455606 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=29455606 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette294556061765850399 29455607 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=29455607 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1399586476: '1765850227_3423357_1399586325_b3586ebf5cf40e57054e665d1388e4e8_rle_crop_4071509778_0.png', 1399586710: '1765850305_3426877_1399586434_f762b534012a64af74e3e2da326ca198_rle_crop_4071513092_0.png', 1399586711: '1765850305_3426877_1399586432_a0bfb34c19d00993c9d17315059bd269_rle_crop_4071513701_0.png', 1399586712: '1765850305_3426877_1399586430_3285e0b25a0bb71fdf9bc3598d3bedf0_rle_crop_4071513722_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/89329b34512a44b49380d119c032a03d_21361281.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/261a1a7e2e0f065a1e664d77cf219258_13796165.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/b6c34b1cc7250af968f2d82e0337a861_64623592.png change filename to text .imagette294556071765850399/ imagette294556071765850399/1765850305_3426877_1399586434_f762b534012a64af74e3e2da326ca198_rle_crop_4071513092_0.png.png imagette294556071765850399/1765850305_3426877_1399586430_3285e0b25a0bb71fdf9bc3598d3bedf0_rle_crop_4071513722_0.png.png imagette294556071765850399/1765850305_3426877_1399586432_a0bfb34c19d00993c9d17315059bd269_rle_crop_4071513701_0.png.png imagette294556071765850399/1765850227_3423357_1399586325_b3586ebf5cf40e57054e665d1388e4e8_rle_crop_4071509778_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/5f537424e3ff9c95ec5597c8252d7633_51213033.png imagette294556071765850399 29455601 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=29455601 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1399586388: '1765850007_3414878_1399586243_6e186d3a5a93be9b175bb7dd97df372f_rle_crop_4071502313_0.png', 1399586389: '1765850007_3414878_1399586239_cec4298fbcc9a5ab438f6c4d085e0981_rle_crop_4071502344_0.png', 1399586417: '1765850105_3420012_1399586350_fed87c293555e3c3b638c75c239a9096_rle_crop_4071502457_0.png', 1399586477: '1765850227_3423357_1399586354_9a94ec9f8441f5431b21899ec713ecaa_rle_crop_4071509055_0.png', 1399586478: '1765850227_3423357_1399586329_25052027c1f396f7b6508fe0ff5e86e1_rle_crop_4071509070_0.png', 1399586479: '1765850227_3423357_1399586327_3ffff8d15a9a7430fc4fe3c383ec7be2_rle_crop_4071509085_0.png', 1399586738: '1765850346_3427468_1399586412_d114ae99b1aa664dc397195748e61c01_rle_crop_4071514319_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/a1f093749d9fc6e7b92ed78e13147435_59001278.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/42233576c28d48200bef5a516dcf51b2_33836617.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/242d15254e3ffa7f3076f8d76189ec02_15700745.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/397c00b1ffab56729c123e3e2e96ff2c_51242833.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/cf7af74852bccc071bc0db27e05753f5_70542746.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/1b04d1c4577c97b27fab7d1fdeb43e02_25721394.png change filename to text .imagette294556011765850399/ imagette294556011765850399/1765850227_3423357_1399586354_9a94ec9f8441f5431b21899ec713ecaa_rle_crop_4071509055_0.png.png imagette294556011765850399/1765850227_3423357_1399586329_25052027c1f396f7b6508fe0ff5e86e1_rle_crop_4071509070_0.png.png imagette294556011765850399/1765850007_3414878_1399586243_6e186d3a5a93be9b175bb7dd97df372f_rle_crop_4071502313_0.png.png imagette294556011765850399/1765850007_3414878_1399586239_cec4298fbcc9a5ab438f6c4d085e0981_rle_crop_4071502344_0.png.png imagette294556011765850399/1765850346_3427468_1399586412_d114ae99b1aa664dc397195748e61c01_rle_crop_4071514319_0.png.png imagette294556011765850399/1765850227_3423357_1399586327_3ffff8d15a9a7430fc4fe3c383ec7be2_rle_crop_4071509085_0.png.png imagette294556011765850399/1765850105_3420012_1399586350_fed87c293555e3c3b638c75c239a9096_rle_crop_4071502457_0.png.png wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/d343c43db0084b4b58c40a1a8cecd7b7_91802729.png imagette294556011765850399 29455602 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=29455602 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1399586385: '1765850007_3414878_1399586243_6e186d3a5a93be9b175bb7dd97df372f_rle_crop_4071502314_0.png', 1399586386: '1765850007_3414878_1399586239_cec4298fbcc9a5ab438f6c4d085e0981_rle_crop_4071502350_0.png', 1399586387: '1765850007_3414878_1399586238_b2c07773b09debf366453b80e3d1e12f_rle_crop_4071502364_0.png', 1399586415: '1765850105_3420012_1399586353_d256dd734ff1c3920d964c7314e6ec91_rle_crop_4071502442_0.png', 1399586472: '1765850227_3423357_1399586329_25052027c1f396f7b6508fe0ff5e86e1_rle_crop_4071509069_0.png', 1399586473: '1765850227_3423357_1399586329_25052027c1f396f7b6508fe0ff5e86e1_rle_crop_4071509072_0.png', 1399586474: '1765850227_3423357_1399586327_3ffff8d15a9a7430fc4fe3c383ec7be2_rle_crop_4071509087_0.png', 1399586708: '1765850305_3426877_1399586434_f762b534012a64af74e3e2da326ca198_rle_crop_4071513101_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/834aa058a7bcb6ec1ed027b39ffb784c_54540506.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/dd27f536b7c6503d5bc161f23b0fe8a2_82753083.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/167704ffba5ff6c14daca268ef361842_66319698.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/e70d8197223c99fadcb81c847caf4b15_36454002.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/eaa552aa2aa972b16bbcb309519a51a4_22500022.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/1799b4b956998463d6e32a84be2fe435_63373428.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/7be277ce2b556a5951f38e944e01ae73_95515537.png change filename to text .imagette294556021765850400/ imagette294556021765850400/1765850007_3414878_1399586239_cec4298fbcc9a5ab438f6c4d085e0981_rle_crop_4071502350_0.png.png imagette294556021765850400/1765850227_3423357_1399586327_3ffff8d15a9a7430fc4fe3c383ec7be2_rle_crop_4071509087_0.png.png imagette294556021765850400/1765850007_3414878_1399586238_b2c07773b09debf366453b80e3d1e12f_rle_crop_4071502364_0.png.png imagette294556021765850400/1765850227_3423357_1399586329_25052027c1f396f7b6508fe0ff5e86e1_rle_crop_4071509069_0.png.png imagette294556021765850400/1765850227_3423357_1399586329_25052027c1f396f7b6508fe0ff5e86e1_rle_crop_4071509072_0.png.png imagette294556021765850400/1765850305_3426877_1399586434_f762b534012a64af74e3e2da326ca198_rle_crop_4071513101_0.png.png imagette294556021765850400/1765850007_3414878_1399586243_6e186d3a5a93be9b175bb7dd97df372f_rle_crop_4071502314_0.png.png imagette294556021765850400/1765850105_3420012_1399586353_d256dd734ff1c3920d964c7314e6ec91_rle_crop_4071502442_0.png.png wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/07e935cb96c4f6a3fdd55e9c525a892d_72709595.png imagette294556021765850400 29455608 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=29455608 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1399586419: '1765850105_3420012_1399586353_d256dd734ff1c3920d964c7314e6ec91_rle_crop_4071502444_0.png', 1399586482: '1765850227_3423357_1399586354_9a94ec9f8441f5431b21899ec713ecaa_rle_crop_4071509057_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/3b72820e17096497e75912da46e10426_90274597.png change filename to text .imagette294556081765850400/ imagette294556081765850400/1765850227_3423357_1399586354_9a94ec9f8441f5431b21899ec713ecaa_rle_crop_4071509057_0.png.png imagette294556081765850400/1765850105_3420012_1399586353_d256dd734ff1c3920d964c7314e6ec91_rle_crop_4071502444_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/22ff0ea3a8e53b4ed570356744b69363_56963584.png imagette294556081765850400 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=29455589 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/29455610,29455611,29455612,29455613,29455614,29455615,29455616,29455617,29455618,29455619,29455620,29455621?tags=environnement,plastique,papier,metal,Carton_gris,Teint_Dans_La_Masse,flou,cartonnette,mal_croppe,kraft,autre_refus,Carton_brun your option no_mail is active, we will not send the real mail to your client args[1399586575] : ('0.04790620638915017',) no score found for photo 1399586575 We are sending mail with results at report@fotonower.com args[1399586537] : ('0.04790620638915017',) no score found for photo 1399586537 We are sending mail with results at report@fotonower.com args[1399586504] : ('0.04790620638915017',) no score found for photo 1399586504 We are sending mail with results at report@fotonower.com args[1399586487] : ('0.04790620638915017',) no score found for photo 1399586487 We are sending mail with results at report@fotonower.com args[1399586486] : ('0.04790620638915017',) no score found for photo 1399586486 We are sending mail with results at report@fotonower.com args[1399586484] : ('0.04790620638915017',) no score found for photo 1399586484 We are sending mail with results at report@fotonower.com refus_total : 0.04790620638915017 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=29455589 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_P29455589_16-12-2025_02_59_58.pdf results_Auto_P29455589_16-12-2025_02_59_58.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29455589_16-12-2025_02_59_58.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','29455589','results_Auto_P29455589_16-12-2025_02_59_58.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29455589_16-12-2025_02_59_58.pdf','pdf','','0.14','0.04790620638915017') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29455589]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1399586575, 1399586537, 1399586504, 1399586487, 1399586486, 1399586484] map_info['map_portfolio_photo'] : {29455589: [1399586575, 1399586537, 1399586504, 1399586487, 1399586486, 1399586484, 1399586459, 1399586456, 1399586455, 1399586454, 1399586453, 1399586437, 1399586434, 1399586433, 1399586432, 1399586430, 1399586413, 1399586412, 1399586411, 1399586398, 1399586395, 1399586394, 1399586393, 1399586392, 1399586373, 1399586370, 1399586369, 1399586368, 1399586367, 1399586354, 1399586353, 1399586350, 1399586330, 1399586329, 1399586327, 1399586326, 1399586325, 1399586324, 1399586307, 1399586305, 1399586303, 1399586302, 1399586301, 1399586300, 1399586266, 1399586265, 1399586264, 1399586246, 1399586243, 1399586240, 1399586239, 1399586238, 1399586237, 1399586229, 1399586226, 1399586222, 1399586218, 1399586216, 1399586214, 1399586201, 1399586200, 1399586199, 1399586198]} final : False mtd_id 4302 list_pids : [1399586575, 1399586537, 1399586504, 1399586487, 1399586486, 1399586484] 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, '4232475') ('4302', '29455589', '1399586575', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586537', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586504', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586487', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586486', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586484', None, None, None, None, None, '4232475') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '29455589', '1399586575', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586537', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586504', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586487', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586486', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586484', None, None, None, None, None, '4232475')] time used for this insertion : 0.01576852798461914 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.5356993675231934 time spend to save output : 0.016077518463134766 total time spend for step 4 : 3.551776885986328 step5:split_time_score Tue Dec 16 03:00:02 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['29455589'] 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 : [('29455589',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29455589) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1399586484: {'path': 'temp/1765850398_2739119_1399586484_bb5c54e1b9deba3de75fa199ce2037e0.jpg', 'extension': 'jpg'}, 1399586486: {'path': 'temp/1765850398_2739119_1399586486_9086e703df5108bb26d712cb6e263043.jpg', 'extension': 'jpg'}, 1399586537: {'path': 'temp/1765850398_2739119_1399586537_8b7518bacf7f9f3a08be9284742bd919.jpg', 'extension': 'jpg'}, 1399586575: {'path': 'temp/1765850398_2739119_1399586575_b8bdec22da0849193967c0e40b11e7da.jpg', 'extension': 'jpg'}, 1399586487: {'path': 'temp/1765850398_2739119_1399586487_d4dd7b58b9c7fddaf16da423bd8b53f6.jpg', 'extension': 'jpg'}, 1399586504: {'path': 'temp/1765850398_2739119_1399586504_3c61565fc080949e52f20ef19eedda15.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 = 29455589; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm_bis',), ('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 = 29455589 group by h (('02', 63),) 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=29455589 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 (29455589) 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 (29455589) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 16122025 29455589 Nombre de photos uploadées : 63 / 23040 (0%) 16122025 29455589 Nombre de photos taguées (types de déchets): 0 / 63 (0%) 16122025 29455589 Nombre de photos taguées (volume) : 0 / 63 (0%) [{'photo_id': 1399586201, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/33ffa35a0b34471824bab78ffd61d053.jpg', 'username': None, 'uploaded_at': 1765849567, 'text': 'image_16122025_02_45_14_10137.jpg'}, {'photo_id': 1399586200, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/e462351e23afe7f3f475aa972f492ae9.jpg', 'username': None, 'uploaded_at': 1765849567, 'text': 'image_16122025_02_45_24_10140.jpg'}, {'photo_id': 1399586199, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/5e5c2ab7cb82506e913650ca1195171e.jpg', 'username': None, 'uploaded_at': 1765849567, 'text': 'image_16122025_02_45_34_10141.jpg'}, {'photo_id': 1399586198, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/ffeddca0e61d88c6f6669a36ffd25865.jpg', 'username': None, 'uploaded_at': 1765849567, 'text': 'image_16122025_02_45_45_10140.jpg'}] 0 [] elapsed_time : load_data_split_time_score 3.5762786865234375e-06 elapsed_time : order_list_meta_photo_and_scores 1.3589859008789062e-05 ??????????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0022428035736083984 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 29455589, '2025-12-16' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 10 and date = '2025-12-16' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2742047,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.26149940490722656 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= 2742047 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2742047, 'dashboard_run_id': 2749284, 'mtr_portfolio_id': 29450388, 'dashboard_result_id': 18403823, '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_P29450388_16-12-2025_00_19_01.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29450390, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29450391, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29450392, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29450393, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29450394, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29450395, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29450396, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29450397, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29450398, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29450399, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29450400, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29450401, 'pht': 3726}}"}, {'dashboat_entry_day': 2742047, 'dashboard_run_id': 2749284, 'mtr_portfolio_id': 29450996, 'dashboard_result_id': 18403824, '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_P29450996_16-12-2025_00_33_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29451038, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29451039, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29451040, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29451041, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29451042, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29451043, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29451044, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29451045, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29451046, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29451047, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29451048, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29451049, 'pht': 3726}}"}, {'dashboat_entry_day': 2742047, 'dashboard_run_id': 2749284, 'mtr_portfolio_id': 29451566, 'dashboard_result_id': 18403825, '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_P29451566_16-12-2025_00_46_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29451574, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29451575, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29451576, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29451577, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29451578, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29451579, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29451580, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29451581, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29451582, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29451583, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29451584, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29451585, 'pht': 3726}}"}, {'dashboat_entry_day': 2742047, 'dashboard_run_id': 2749284, 'mtr_portfolio_id': 29452103, 'dashboard_result_id': 18403826, '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_P29452103_16-12-2025_01_32_58.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29452135, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29452136, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29452137, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29452138, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29452139, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29452140, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29452141, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29452142, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29452143, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29452144, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29452146, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29452149, 'pht': 3726}}"}, {'dashboat_entry_day': 2742047, 'dashboard_run_id': 2749284, 'mtr_portfolio_id': 29453332, 'dashboard_result_id': 18403827, '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_P29453332_16-12-2025_01_49_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29453334, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29453335, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29453336, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29453337, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29453338, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29453339, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29453340, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29453341, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29453342, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29453343, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29453344, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29453345, 'pht': 3726}}"}, {'dashboat_entry_day': 2742047, 'dashboard_run_id': 2749284, 'mtr_portfolio_id': 29453728, 'dashboard_result_id': 18403828, '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_P29453728_16-12-2025_02_02_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29453735, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29453736, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29453737, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29453738, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29453739, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29453740, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29453741, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29453742, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29453743, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29453744, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29453745, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29453746, 'pht': 3726}}"}, {'dashboat_entry_day': 2742047, 'dashboard_run_id': 2749284, 'mtr_portfolio_id': 29454116, 'dashboard_result_id': 18403829, '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_P29454116_16-12-2025_02_19_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29454123, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29454124, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29454125, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29454126, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29454127, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29454128, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29454129, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29454130, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29454131, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29454132, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29454133, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29454134, 'pht': 3726}}"}, {'dashboat_entry_day': 2742047, 'dashboard_run_id': 2749284, 'mtr_portfolio_id': 29454690, 'dashboard_result_id': 18403830, '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_P29454690_16-12-2025_02_32_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29454698, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29454699, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29454700, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29454701, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29454702, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29454703, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29454704, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29454705, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29454706, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29454707, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29454708, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29454709, 'pht': 3726}}"}, {'dashboat_entry_day': 2742047, 'dashboard_run_id': 2749284, 'mtr_portfolio_id': 29455111, 'dashboard_result_id': 18403831, '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_P29455111_16-12-2025_02_47_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29455144, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29455145, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29455146, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29455147, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29455148, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29455149, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29455150, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29455151, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29455152, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29455153, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29455154, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29455155, 'pht': 3726}}"}, {'dashboat_entry_day': 2742047, 'dashboard_run_id': 2749284, 'mtr_portfolio_id': 29455589, 'dashboard_result_id': 18403832, '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_P29455589_16-12-2025_02_58_30.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29455597, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29455598, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29455599, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29455600, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29455601, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29455602, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29455603, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29455604, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29455605, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29455606, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29455607, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29455608, 'pht': 3726}}"}] SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 29450388 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': 4231841, 'mtr_portfolio_id': 29450388, 'created_at': datetime.datetime(2025, 12, 16, 0, 19, 1), 'result': '0.05849226565291721', 'result_long': None, 'result_double': None}] Qualite : 0.05849226565291721 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29450388 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29450388_16-12-2025_00_19_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29450388 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_P29450388_16-12-2025_00_19_01.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29450390, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29450391, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29450392, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29450393, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29450394, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29450395, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29450396, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29450397, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29450398, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29450399, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29450400, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29450401, 'pht': 3726}}" where mtr_portfolio_id = 29450388 and dashboard_run_id = 2749288 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`=29450388 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18403823, 0.05849226565291721, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29450388_16-12-2025_00_19_01.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29450390, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29450391, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29450392, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29450393, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29450394, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29450395, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29450396, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29450397, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29450398, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29450399, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29450400, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29450401, '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 = 29450996 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': 4231891, 'mtr_portfolio_id': 29450996, 'created_at': datetime.datetime(2025, 12, 16, 0, 33), 'result': '0.05860023724292723', 'result_long': None, 'result_double': None}] Qualite : 0.05860023724292723 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29450996 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29450996_16-12-2025_00_33_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29450996 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_P29450996_16-12-2025_00_33_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29451038, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29451039, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29451040, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29451041, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29451042, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29451043, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29451044, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29451045, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29451046, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29451047, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29451048, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29451049, 'pht': 3726}}" where mtr_portfolio_id = 29450996 and dashboard_run_id = 2749288 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`=29450996 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18403824, 0.05860023724292723, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29450996_16-12-2025_00_33_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29451038, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29451039, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29451040, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29451041, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29451042, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29451043, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29451044, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29451045, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29451046, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29451047, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29451048, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29451049, '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 = 29451566 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': 4231947, 'mtr_portfolio_id': 29451566, 'created_at': datetime.datetime(2025, 12, 16, 0, 46, 57), 'result': '0.04760964518372767', 'result_long': None, 'result_double': None}] Qualite : 0.04760964518372767 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29451566 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29451566_16-12-2025_00_46_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29451566 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_P29451566_16-12-2025_00_46_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29451574, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29451575, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29451576, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29451577, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29451578, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29451579, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29451580, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29451581, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29451582, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29451583, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29451584, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29451585, 'pht': 3726}}" where mtr_portfolio_id = 29451566 and dashboard_run_id = 2749288 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`=29451566 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18403825, 0.04760964518372767, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29451566_16-12-2025_00_46_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29451574, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29451575, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29451576, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29451577, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29451578, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29451579, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29451580, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29451581, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29451582, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29451583, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29451584, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29451585, '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 = 29452103 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': 4232011, 'mtr_portfolio_id': 29452103, 'created_at': datetime.datetime(2025, 12, 16, 1, 32, 58), 'result': '0.04210042514862066', 'result_long': None, 'result_double': None}] Qualite : 0.04210042514862066 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29452103 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29452103_16-12-2025_01_32_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29452103 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_P29452103_16-12-2025_01_32_58.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29452135, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29452136, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29452137, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29452138, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29452139, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29452140, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29452141, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29452142, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29452143, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29452144, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29452146, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29452149, 'pht': 3726}}" where mtr_portfolio_id = 29452103 and dashboard_run_id = 2749288 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`=29452103 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18403826, 0.04210042514862066, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29452103_16-12-2025_01_32_58.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29452135, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29452136, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29452137, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29452138, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29452139, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29452140, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29452141, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29452142, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29452143, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29452144, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29452146, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29452149, '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 = 29453332 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': 4232138, 'mtr_portfolio_id': 29453332, 'created_at': datetime.datetime(2025, 12, 16, 1, 48, 59), 'result': '0.029333104092729448', 'result_long': None, 'result_double': None}] Qualite : 0.029333104092729448 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29453332 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29453332_16-12-2025_01_49_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29453332 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_P29453332_16-12-2025_01_49_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29453334, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29453335, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29453336, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29453337, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29453338, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29453339, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29453340, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29453341, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29453342, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29453343, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29453344, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29453345, 'pht': 3726}}" where mtr_portfolio_id = 29453332 and dashboard_run_id = 2749288 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`=29453332 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18403827, 0.029333104092729448, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29453332_16-12-2025_01_49_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29453334, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29453335, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29453336, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29453337, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29453338, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29453339, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29453340, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29453341, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29453342, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29453343, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29453344, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29453345, '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 = 29453728 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': 4232191, 'mtr_portfolio_id': 29453728, 'created_at': datetime.datetime(2025, 12, 16, 2, 2, 58), 'result': '0.04331540313387708', 'result_long': None, 'result_double': None}] Qualite : 0.04331540313387708 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29453728 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29453728_16-12-2025_02_02_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29453728 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_P29453728_16-12-2025_02_02_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29453735, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29453736, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29453737, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29453738, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29453739, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29453740, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29453741, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29453742, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29453743, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29453744, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29453745, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29453746, 'pht': 3726}}" where mtr_portfolio_id = 29453728 and dashboard_run_id = 2749288 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`=29453728 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18403828, 0.04331540313387708, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29453728_16-12-2025_02_02_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29453735, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29453736, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29453737, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29453738, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29453739, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29453740, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29453741, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29453742, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29453743, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29453744, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29453745, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29453746, '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 = 29454116 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': 4232286, 'mtr_portfolio_id': 29454116, 'created_at': datetime.datetime(2025, 12, 16, 2, 19), 'result': '0.04807568087582184', 'result_long': None, 'result_double': None}] Qualite : 0.04807568087582184 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29454116 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29454116_16-12-2025_02_19_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29454116 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_P29454116_16-12-2025_02_19_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29454123, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29454124, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29454125, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29454126, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29454127, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29454128, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29454129, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29454130, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29454131, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29454132, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29454133, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29454134, 'pht': 3726}}" where mtr_portfolio_id = 29454116 and dashboard_run_id = 2749288 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`=29454116 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18403829, 0.04807568087582184, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29454116_16-12-2025_02_19_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29454123, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29454124, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29454125, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29454126, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29454127, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29454128, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29454129, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29454130, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29454131, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29454132, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29454133, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29454134, '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 = 29454690 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': 4232349, 'mtr_portfolio_id': 29454690, 'created_at': datetime.datetime(2025, 12, 16, 2, 32, 59), 'result': '0.04511154696265637', 'result_long': None, 'result_double': None}] Qualite : 0.04511154696265637 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29454690 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29454690_16-12-2025_02_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29454690 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_P29454690_16-12-2025_02_32_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29454698, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29454699, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29454700, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29454701, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29454702, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29454703, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29454704, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29454705, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29454706, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29454707, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29454708, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29454709, 'pht': 3726}}" where mtr_portfolio_id = 29454690 and dashboard_run_id = 2749288 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`=29454690 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18403830, 0.04511154696265637, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29454690_16-12-2025_02_32_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29454698, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29454699, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29454700, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29454701, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29454702, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29454703, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29454704, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29454705, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29454706, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29454707, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29454708, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29454709, '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 = 29455111 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': 4232414, 'mtr_portfolio_id': 29455111, 'created_at': datetime.datetime(2025, 12, 16, 2, 47), 'result': '0.051224888726139145', 'result_long': None, 'result_double': None}] Qualite : 0.051224888726139145 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29455111 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29455111_16-12-2025_02_47_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29455111 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_P29455111_16-12-2025_02_47_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29455144, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29455145, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29455146, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29455147, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29455148, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29455149, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29455150, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29455151, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29455152, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29455153, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29455154, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29455155, 'pht': 3726}}" where mtr_portfolio_id = 29455111 and dashboard_run_id = 2749288 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`=29455111 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18403831, 0.051224888726139145, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29455111_16-12-2025_02_47_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29455144, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29455145, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29455146, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29455147, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29455148, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29455149, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29455150, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29455151, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29455152, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29455153, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29455154, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29455155, '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 = 29455589 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': 4232475, 'mtr_portfolio_id': 29455589, 'created_at': datetime.datetime(2025, 12, 16, 2, 59, 58), 'result': '0.04790620638915017', 'result_long': None, 'result_double': None}] Qualite : 0.04790620638915017 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29455589 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29455589_16-12-2025_02_59_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29455589 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_P29455589_16-12-2025_02_59_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29455597, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29455598, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29455599, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29455600, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29455601, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29455602, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29455603, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29455604, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29455605, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29455606, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29455607, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29455608, 'pht': 3726}}" where mtr_portfolio_id = 29455589 and dashboard_run_id = 2749288 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`=29455589 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18403832, 0.04790620638915017, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29455589_16-12-2025_02_59_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29455597, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29455598, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29455599, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29455600, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29455601, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29455602, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29455603, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29455604, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29455605, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29455606, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29455607, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29455608, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29450388,29450996,29451566,29452103,29453332,29453728,29454116,29454690,29455111,29455589) result : ((1399569775,), (1399569840,), (1399569914,), (1399569963,), (1399570004,), (1399570079,), (1399570082,), (1399570115,), (1399570158,), (1399570440,), (1399570473,), (1399570509,), (1399570540,), (1399570781,), (1399570794,), (1399570799,), (1399570816,), (1399570840,), (1399570850,), (1399570857,), (1399570858,), (1399570859,), (1399570860,), (1399570863,), (1399570873,), (1399570874,), (1399570875,), (1399570876,), (1399570879,), (1399571005,), (1399571039,), (1399571074,), (1399571109,), (1399571144,), (1399571180,), (1399571473,), (1399571474,), (1399571475,), (1399571476,), (1399571629,), (1399571630,), (1399571631,), (1399571632,), (1399571634,), (1399571636,), (1399571669,), (1399571670,), (1399571671,), (1399571701,), (1399571758,), (1399571822,), (1399571881,), (1399571945,), (1399572326,), (1399572363,), (1399572393,), (1399572424,), (1399572457,), (1399572701,), (1399572702,), (1399572703,), (1399572792,), (1399572827,), (1399572856,), (1399572888,), (1399572921,), (1399573118,), (1399573152,), (1399573155,), (1399573156,), (1399573186,), (1399573180,), (1399573181,), (1399573182,), (1399573183,), (1399573195,), (1399573196,), (1399573197,), (1399573198,), (1399573234,), (1399573235,), (1399573236,), (1399573237,), (1399573239,), (1399573242,), (1399573262,), (1399573263,), (1399573264,), (1399573265,), (1399573268,), (1399573286,), (1399573288,), (1399573289,), (1399573290,), (1399573292,), (1399573304,), (1399573305,), (1399573306,), (1399573307,), (1399573310,), (1399573313,), (1399573339,), (1399573340,), (1399573341,), (1399573355,), (1399573356,), (1399573357,), (1399573358,), (1399573389,), (1399573390,), (1399573393,), (1399573394,), (1399573396,), (1399573398,), (1399573411,), (1399573412,), (1399573413,), (1399573445,), (1399573446,), (1399573447,), (1399573448,), (1399573451,), (1399573460,), (1399573461,), (1399573462,), (1399573463,), (1399573487,), (1399573488,), (1399573489,), (1399573490,), (1399573492,), (1399573494,), (1399573505,), (1399573507,), (1399573509,), (1399573510,), (1399573512,), (1399573514,), (1399573528,), (1399573530,), (1399573531,), (1399573532,), (1399573558,), (1399573560,), (1399573571,), (1399573572,), (1399573576,), (1399573550,), (1399573551,), (1399573552,), (1399573555,), (1399573580,), (1399573582,), (1399573583,), (1399573585,), (1399573834,), (1399573858,), (1399573860,), (1399573873,), (1399573929,), (1399573930,), (1399573931,), (1399573932,), (1399573935,), (1399573938,), (1399573952,), (1399573953,), (1399573954,), (1399573978,), (1399573979,), (1399573980,), (1399573981,), (1399573984,), (1399573987,), (1399573997,), (1399573998,), (1399573999,), (1399574000,), (1399574022,), (1399574023,), (1399574024,), (1399574025,), (1399574028,), (1399574031,), (1399574044,), (1399574045,), (1399574046,), (1399574047,), (1399574049,), (1399574091,), (1399574095,), (1399574125,), (1399574156,), (1399574535,), (1399574565,), (1399574597,), (1399574839,), (1399574840,), (1399574841,), (1399574842,), (1399574949,), (1399574950,), (1399574951,), (1399574953,), (1399574956,), (1399574958,), (1399574967,), (1399574969,), (1399574983,), (1399574984,), (1399574985,), (1399574986,), (1399575012,), (1399575013,), (1399575015,), (1399575037,), (1399575450,), (1399575433,), (1399575444,), (1399575446,), (1399575447,), (1399575608,), (1399575643,), (1399575646,), (1399575649,), (1399575652,), (1399575655,), (1399575677,), (1399575679,), (1399575681,), (1399575695,), (1399575696,), (1399575697,), (1399575698,), (1399575701,), (1399575728,), (1399575729,), (1399575757,), (1399575788,), (1399575827,), (1399576183,), (1399576216,), (1399576249,), (1399576628,), (1399576629,), (1399576630,), (1399576631,), (1399576634,), (1399576637,), (1399576852,), (1399576860,), (1399576861,), (1399576983,), (1399576984,), (1399577593,), (1399579074,), (1399579221,), (1399579223,), (1399579264,), (1399581480,), (1399581479,), (1399581490,), (1399581491,), (1399581492,), (1399581493,), (1399581504,), (1399581505,), (1399581506,), (1399581509,), (1399581514,), (1399581528,), (1399581543,), (1399581544,), (1399581545,), (1399581559,), (1399581560,), (1399581561,), (1399581562,), (1399581578,), (1399581579,), (1399581580,), (1399581581,), (1399581584,), (1399581596,), (1399581597,), (1399581598,), (1399581599,), (1399581619,), (1399581620,), (1399581621,), (1399581622,), (1399581625,), (1399581633,), (1399581634,), (1399581635,), (1399581636,), (1399581638,), (1399581670,), (1399581671,), (1399581672,), (1399581673,), (1399581691,), (1399581692,), (1399581693,), (1399581694,), (1399581695,), (1399581714,), (1399581715,), (1399581716,), (1399581727,), (1399581728,), (1399581729,), (1399581730,), (1399581733,), (1399581735,), (1399581748,), (1399581749,), (1399581750,), (1399581751,), (1399581753,), (1399581756,), (1399581766,), (1399581767,), (1399581768,), (1399581807,), (1399581801,), (1399581802,), (1399581803,), (1399581804,), (1399581818,), (1399581819,), (1399581820,), (1399581821,), (1399581844,), (1399581845,), (1399581846,), (1399581847,), (1399581860,), (1399581862,), (1399581864,), (1399581868,), (1399581890,), (1399581891,), (1399581892,), (1399581893,), (1399581903,), (1399581904,), (1399581905,), (1399581906,), (1399581930,), (1399581931,), (1399581932,), (1399581933,), (1399581935,), (1399581953,), (1399581954,), (1399581955,), (1399581956,), (1399581958,), (1399581961,), (1399581971,), (1399581972,), (1399581973,), (1399581974,), (1399581987,), (1399581989,), (1399581991,), (1399581996,), (1399581999,), (1399582008,), (1399582009,), (1399582010,), (1399582011,), (1399582014,), (1399582029,), (1399582034,), (1399582035,), (1399582036,), (1399582095,), (1399582126,), (1399582160,), (1399582825,), (1399582829,), (1399582832,), (1399582835,), (1399582838,), (1399582861,), (1399582860,), (1399582882,), (1399582906,), (1399582938,), (1399582971,), (1399583005,), (1399583041,), (1399583356,), (1399583390,), (1399583423,), (1399583457,), (1399583492,), (1399583527,), (1399583718,), (1399583719,), (1399583949,), (1399583950,), (1399583964,), (1399583997,), (1399584007,), (1399584020,), (1399584075,), (1399584076,), (1399584077,), (1399584078,), (1399584081,), (1399584365,), (1399584399,), (1399584433,), (1399584466,), (1399584504,), (1399584541,), (1399584677,), (1399584714,), (1399584874,), (1399584907,), (1399584947,), (1399584985,), (1399585026,), (1399585184,), (1399585200,), (1399585214,), (1399585229,), (1399585235,), (1399585238,), (1399585245,), (1399585246,), (1399585247,), (1399585267,), (1399585277,), (1399585278,), (1399585279,), (1399585282,), (1399585306,), (1399585308,), (1399585309,), (1399585310,), (1399585334,), (1399585335,), (1399585336,), (1399585337,), (1399585351,), (1399585353,), (1399585355,), (1399585359,), (1399585397,), (1399585388,), (1399585390,), (1399585392,), (1399585394,), (1399585413,), (1399585414,), (1399585415,), (1399585416,), (1399585418,), (1399585451,), (1399585452,), (1399585453,), (1399585454,), (1399585473,), (1399585474,), (1399585475,), (1399585505,), (1399585506,), (1399585507,), (1399585526,), (1399585527,), (1399585528,), (1399585529,), (1399585532,), (1399585567,), (1399585568,), (1399585569,), (1399585570,), (1399585572,), (1399585585,), (1399585700,), (1399585701,), (1399585702,), (1399585703,), (1399585738,), (1399585739,), (1399585756,), (1399585758,), (1399585786,), (1399585787,), (1399585789,), (1399585790,), (1399585817,), (1399585813,), (1399585815,), (1399585816,), (1399585846,), (1399585847,), (1399585848,), (1399585849,), (1399585868,), (1399585869,), (1399585870,), (1399585899,), (1399585900,), (1399585901,), (1399585902,), (1399585905,), (1399585918,), (1399585919,), (1399585920,), (1399585921,), (1399585953,), (1399585954,), (1399585955,), (1399585956,), (1399585971,), (1399585972,), (1399585976,), (1399585980,), (1399585990,), (1399585991,), (1399586011,), (1399586012,), (1399586013,), (1399586036,), (1399586037,), (1399586038,), (1399586039,), (1399586042,), (1399586061,), (1399586063,), (1399586065,), (1399586069,), (1399586073,), (1399586095,), (1399586096,), (1399586097,), (1399586113,), (1399586114,), (1399586115,), (1399586116,), (1399586137,), (1399586138,), (1399586139,), (1399586140,), (1399586142,), (1399586144,), (1399586160,), (1399586163,), (1399586165,), (1399586202,), (1399586198,), (1399586199,), (1399586200,), (1399586201,), (1399586214,), (1399586216,), (1399586218,), (1399586222,), (1399586226,), (1399586229,), (1399586237,), (1399586238,), (1399586239,), (1399586240,), (1399586243,), (1399586246,), (1399586264,), (1399586265,), (1399586266,), (1399586300,), (1399586301,), (1399586302,), (1399586303,), (1399586305,), (1399586307,), (1399586324,), (1399586325,), (1399586326,), (1399586327,), (1399586329,), (1399586330,), (1399586350,), (1399586353,), (1399586354,), (1399586367,), (1399586368,), (1399586369,), (1399586370,), (1399586373,), (1399586392,), (1399586393,), (1399586394,), (1399586395,), (1399586398,), (1399586411,), (1399586412,), (1399586413,), (1399586430,), (1399586432,), (1399586433,), (1399586434,), (1399586437,), (1399586453,), (1399586454,), (1399586455,), (1399586456,), (1399586459,), (1399586484,), (1399586486,), (1399586487,), (1399586504,), (1399586537,), (1399586575,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'16122025': {'nb_upload': 63, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29455589]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1399586575, 1399586537, 1399586504, 1399586487, 1399586486, 1399586484] map_info['map_portfolio_photo'] : {29455589: [1399586575, 1399586537, 1399586504, 1399586487, 1399586486, 1399586484, 1399586459, 1399586456, 1399586455, 1399586454, 1399586453, 1399586437, 1399586434, 1399586433, 1399586432, 1399586430, 1399586413, 1399586412, 1399586411, 1399586398, 1399586395, 1399586394, 1399586393, 1399586392, 1399586373, 1399586370, 1399586369, 1399586368, 1399586367, 1399586354, 1399586353, 1399586350, 1399586330, 1399586329, 1399586327, 1399586326, 1399586325, 1399586324, 1399586307, 1399586305, 1399586303, 1399586302, 1399586301, 1399586300, 1399586266, 1399586265, 1399586264, 1399586246, 1399586243, 1399586240, 1399586239, 1399586238, 1399586237, 1399586229, 1399586226, 1399586222, 1399586218, 1399586216, 1399586214, 1399586201, 1399586200, 1399586199, 1399586198]} final : True mtd_id 4302 list_pids : [1399586575, 1399586537, 1399586504, 1399586487, 1399586486, 1399586484] Looping around the photos to save general results len do output : 1 /29455589Didn'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, '4232475') ('4302', '29455589', '1399586575', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586537', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586504', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586487', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586486', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586484', None, None, None, None, None, '4232475') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '29455589', 'None', None, None, None, None, '4232475'), ('4302', '29455589', '1399586575', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586537', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586504', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586487', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586486', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586484', None, None, None, None, None, '4232475')] time used for this insertion : 0.01727151870727539 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.0342824459075928 time spend to save output : 0.017452239990234375 total time spend for step 5 : 1.0517346858978271 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 (4232475) 2.02user 2.44system 0:07.33elapsed 61%CPU (0avgtext+0avgdata 165692maxresident)k 24inputs+7288outputs (0major+67142minor)pagefaults 0swaps