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 : 2731604 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/2731604/ Name: python3 Umask: 0002 State: R (running) Tgid: 2731604 Ngid: 0 Pid: 2731604 PPid: 2731603 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 2731604 NSpid: 2731604 NSpgid: 2730464 NSsid: 2730464 VmPeak: 1113376 kB VmSize: 1113376 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 105004 kB VmRSS: 105004 kB RssAnon: 66320 kB RssFile: 38684 kB RssShmem: 0 kB VmData: 872104 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130476 kB VmPTE: 616 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: 50 nonvoluntary_ctxt_switches: 88 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '2731604', 'Ngid': '0', 'Pid': '2731604', 'PPid': '2731603', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '2731604', 'NSpid': '2731604', 'NSpgid': '2730464', 'NSsid': '2730464', 'VmPeak': '1113376 kB', 'VmSize': '1113376 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '105004 kB', 'VmRSS': '105004 kB', 'RssAnon': '66320 kB', 'RssFile': '38684 kB', 'RssShmem': '0 kB', 'VmData': '872104 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130476 kB', 'VmPTE': '616 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': '50', 'nonvoluntary_ctxt_switches': '88'} ('datou_batch_current', '2731604', '1113376', '0', '1113376', '872104', '105004', 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': 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: [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.01872873306274414 #### 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:52:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (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 ['Carton_gris', 'cartonnette', 'environnement', 'metal', 'Carton_brun', 'kraft', 'plastique', 'Teint_Dans_La_Masse', 'papier', 'autre_refus', 'mal_croppe', 'flou'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=29455589 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','cartonnette','environnement','metal','Carton_brun','kraft','plastique','Teint_Dans_La_Masse','papier','autre_refus','mal_croppe','flou')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=29455589 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','cartonnette','environnement','metal','Carton_brun','kraft','plastique','Teint_Dans_La_Masse','papier','autre_refus','mal_croppe','flou')) 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, 50, 57), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 50, 57), '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, 50, 57), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 50, 57), '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, 50, 57), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 50, 57), '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, 50, 57), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 50, 57), '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, 50, 57), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 50, 57), '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, 50, 57), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 50, 57), '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, 50, 57), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 50, 57), '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, 50, 57), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 50, 57), '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, 50, 57), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 50, 57), '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, 50, 57), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 50, 57), '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, 50, 57), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 50, 57), '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, 50, 57), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 50, 57), '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,)) 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 : () 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,)) 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,)) 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,)) 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 : () 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,)) 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 : () 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,)) 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,)) 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 : () 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,)) 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,)) 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,)) 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 : () 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,)) 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 : () 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,)) 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 ('Carton_gris','cartonnette','environnement','metal','Carton_brun','kraft','plastique','Teint_Dans_La_Masse','papier','autre_refus','mal_croppe','flou')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=29455589 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','cartonnette','environnement','metal','Carton_brun','kraft','plastique','Teint_Dans_La_Masse','papier','autre_refus','mal_croppe','flou')) 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, 50, 57), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 2, 50, 57), '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 [1399586354, 1399586353, 1399586350, 1399586330, 1399586329, 1399586327, 1399586326, 1399586325, 1399586324, 1399586307, 1399586305, 1399586303, 1399586302, 1399586301, 1399586300] map_info['map_portfolio_photo'] : {29455589: [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 : [1399586354, 1399586353, 1399586350, 1399586330, 1399586329, 1399586327, 1399586326, 1399586325, 1399586324, 1399586307, 1399586305, 1399586303, 1399586302, 1399586301, 1399586300] 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', '1399586354', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586353', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586350', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586330', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586329', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586327', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586326', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586325', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586324', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586307', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586305', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586303', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586302', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586301', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586300', None, None, None, None, None, '4232475') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 16 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', '1399586354', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586353', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586350', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586330', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586329', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586327', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586326', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586325', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586324', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586307', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586305', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586303', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586302', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586301', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586300', None, None, None, None, None, '4232475')] time used for this insertion : 0.02095627784729004 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.5020430088043213 time spend to save output : 0.0213320255279541 total time spend for step 1 : 0.5233750343322754 step2:final Tue Dec 16 02:52: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); 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 : {1399586354: ('0.0',), 1399586353: ('0.0',), 1399586350: ('0.0',), 1399586330: ('0.0',), 1399586329: ('0.0',), 1399586327: ('0.0',), 1399586326: ('0.0',), 1399586325: ('0.0',), 1399586324: ('0.0',), 1399586307: ('0.0',), 1399586305: ('0.0',), 1399586303: ('0.0',), 1399586302: ('0.0',), 1399586301: ('0.0',), 1399586300: ('0.0',)} new output for save of step final : {1399586354: ('0.0',), 1399586353: ('0.0',), 1399586350: ('0.0',), 1399586330: ('0.0',), 1399586329: ('0.0',), 1399586327: ('0.0',), 1399586326: ('0.0',), 1399586325: ('0.0',), 1399586324: ('0.0',), 1399586307: ('0.0',), 1399586305: ('0.0',), 1399586303: ('0.0',), 1399586302: ('0.0',), 1399586301: ('0.0',), 1399586300: ('0.0',)} [1399586354, 1399586353, 1399586350, 1399586330, 1399586329, 1399586327, 1399586326, 1399586325, 1399586324, 1399586307, 1399586305, 1399586303, 1399586302, 1399586301, 1399586300] map_info['map_portfolio_photo'] : {29455589: [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 : [1399586354, 1399586353, 1399586350, 1399586330, 1399586329, 1399586327, 1399586326, 1399586325, 1399586324, 1399586307, 1399586305, 1399586303, 1399586302, 1399586301, 1399586300] Looping around the photos to save general results len do output : 15 /1399586354.Didn't retrieve data . /1399586353.Didn't retrieve data . /1399586350.Didn't retrieve data . /1399586330.Didn't retrieve data . /1399586329.Didn't retrieve data . /1399586327.Didn't retrieve data . /1399586326.Didn't retrieve data . /1399586325.Didn't retrieve data . /1399586324.Didn't retrieve data . /1399586307.Didn't retrieve data . /1399586305.Didn't retrieve data . /1399586303.Didn't retrieve data . /1399586302.Didn't retrieve data . /1399586301.Didn't retrieve data . /1399586300.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', '1399586354', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586353', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586350', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586330', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586329', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586327', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586326', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586325', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586324', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586307', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586305', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586303', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586302', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586301', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586300', None, None, None, None, None, '4232475') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 45 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', '1399586354', '0.0', None, None, None, None, '4232475'), ('4302', '29455589', '1399586353', '0.0', None, None, None, None, '4232475'), ('4302', '29455589', '1399586350', '0.0', None, None, None, None, '4232475'), ('4302', '29455589', '1399586330', '0.0', None, None, None, None, '4232475'), ('4302', '29455589', '1399586329', '0.0', None, None, None, None, '4232475'), ('4302', '29455589', '1399586327', '0.0', None, None, None, None, '4232475'), ('4302', '29455589', '1399586326', '0.0', None, None, None, None, '4232475'), ('4302', '29455589', '1399586325', '0.0', None, None, None, None, '4232475'), ('4302', '29455589', '1399586324', '0.0', None, None, None, None, '4232475'), ('4302', '29455589', '1399586307', '0.0', None, None, None, None, '4232475'), ('4302', '29455589', '1399586305', '0.0', None, None, None, None, '4232475'), ('4302', '29455589', '1399586303', '0.0', None, None, None, None, '4232475'), ('4302', '29455589', '1399586302', '0.0', None, None, None, None, '4232475'), ('4302', '29455589', '1399586301', '0.0', None, None, None, None, '4232475'), ('4302', '29455589', '1399586300', '0.0', None, None, None, None, '4232475')] time used for this insertion : 0.01946282386779785 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06291961669921875 time spend to save output : 0.020122051239013672 total time spend for step 2 : 0.08304166793823242 step3:velours_tree Tue Dec 16 02:52: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.24024701118469238 time spend to save output : 3.933906555175781e-05 total time spend for step 3 : 0.24028635025024414 step4:send_mail_cod Tue Dec 16 02:52: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 : {1399586354: ('0.0',), 1399586353: ('0.0',), 1399586350: ('0.0',), 1399586330: ('0.0',), 1399586329: ('0.0',), 1399586327: ('0.0',), 1399586326: ('0.0',), 1399586325: ('0.0',), 1399586324: ('0.0',), 1399586307: ('0.0',), 1399586305: ('0.0',), 1399586303: ('0.0',), 1399586302: ('0.0',), 1399586301: ('0.0',), 1399586300: ('0.0',)} input_args_next_step : {1399586354: ()} output_args : {1399586354: ('0.0',), 1399586353: ('0.0',), 1399586350: ('0.0',), 1399586330: ('0.0',), 1399586329: ('0.0',), 1399586327: ('0.0',), 1399586326: ('0.0',), 1399586325: ('0.0',), 1399586324: ('0.0',), 1399586307: ('0.0',), 1399586305: ('0.0',), 1399586303: ('0.0',), 1399586302: ('0.0',), 1399586301: ('0.0',), 1399586300: ('0.0',)} args : 1399586354 depend.output_id : 0 input_args_next_step : {1399586354: ('0.0',), 1399586353: ()} output_args : {1399586354: ('0.0',), 1399586353: ('0.0',), 1399586350: ('0.0',), 1399586330: ('0.0',), 1399586329: ('0.0',), 1399586327: ('0.0',), 1399586326: ('0.0',), 1399586325: ('0.0',), 1399586324: ('0.0',), 1399586307: ('0.0',), 1399586305: ('0.0',), 1399586303: ('0.0',), 1399586302: ('0.0',), 1399586301: ('0.0',), 1399586300: ('0.0',)} args : 1399586353 depend.output_id : 0 input_args_next_step : {1399586354: ('0.0',), 1399586353: ('0.0',), 1399586350: ()} output_args : {1399586354: ('0.0',), 1399586353: ('0.0',), 1399586350: ('0.0',), 1399586330: ('0.0',), 1399586329: ('0.0',), 1399586327: ('0.0',), 1399586326: ('0.0',), 1399586325: ('0.0',), 1399586324: ('0.0',), 1399586307: ('0.0',), 1399586305: ('0.0',), 1399586303: ('0.0',), 1399586302: ('0.0',), 1399586301: ('0.0',), 1399586300: ('0.0',)} args : 1399586350 depend.output_id : 0 input_args_next_step : {1399586354: ('0.0',), 1399586353: ('0.0',), 1399586350: ('0.0',), 1399586330: ()} output_args : {1399586354: ('0.0',), 1399586353: ('0.0',), 1399586350: ('0.0',), 1399586330: ('0.0',), 1399586329: ('0.0',), 1399586327: ('0.0',), 1399586326: ('0.0',), 1399586325: ('0.0',), 1399586324: ('0.0',), 1399586307: ('0.0',), 1399586305: ('0.0',), 1399586303: ('0.0',), 1399586302: ('0.0',), 1399586301: ('0.0',), 1399586300: ('0.0',)} args : 1399586330 depend.output_id : 0 input_args_next_step : {1399586354: ('0.0',), 1399586353: ('0.0',), 1399586350: ('0.0',), 1399586330: ('0.0',), 1399586329: ()} output_args : {1399586354: ('0.0',), 1399586353: ('0.0',), 1399586350: ('0.0',), 1399586330: ('0.0',), 1399586329: ('0.0',), 1399586327: ('0.0',), 1399586326: ('0.0',), 1399586325: ('0.0',), 1399586324: ('0.0',), 1399586307: ('0.0',), 1399586305: ('0.0',), 1399586303: ('0.0',), 1399586302: ('0.0',), 1399586301: ('0.0',), 1399586300: ('0.0',)} args : 1399586329 depend.output_id : 0 input_args_next_step : {1399586354: ('0.0',), 1399586353: ('0.0',), 1399586350: ('0.0',), 1399586330: ('0.0',), 1399586329: ('0.0',), 1399586327: ()} output_args : {1399586354: ('0.0',), 1399586353: ('0.0',), 1399586350: ('0.0',), 1399586330: ('0.0',), 1399586329: ('0.0',), 1399586327: ('0.0',), 1399586326: ('0.0',), 1399586325: ('0.0',), 1399586324: ('0.0',), 1399586307: ('0.0',), 1399586305: ('0.0',), 1399586303: ('0.0',), 1399586302: ('0.0',), 1399586301: ('0.0',), 1399586300: ('0.0',)} args : 1399586327 depend.output_id : 0 input_args_next_step : {1399586354: ('0.0',), 1399586353: ('0.0',), 1399586350: ('0.0',), 1399586330: ('0.0',), 1399586329: ('0.0',), 1399586327: ('0.0',), 1399586326: ()} output_args : {1399586354: ('0.0',), 1399586353: ('0.0',), 1399586350: ('0.0',), 1399586330: ('0.0',), 1399586329: ('0.0',), 1399586327: ('0.0',), 1399586326: ('0.0',), 1399586325: ('0.0',), 1399586324: ('0.0',), 1399586307: ('0.0',), 1399586305: ('0.0',), 1399586303: ('0.0',), 1399586302: ('0.0',), 1399586301: ('0.0',), 1399586300: ('0.0',)} args : 1399586326 depend.output_id : 0 input_args_next_step : {1399586354: ('0.0',), 1399586353: ('0.0',), 1399586350: ('0.0',), 1399586330: ('0.0',), 1399586329: ('0.0',), 1399586327: ('0.0',), 1399586326: ('0.0',), 1399586325: ()} output_args : {1399586354: ('0.0',), 1399586353: ('0.0',), 1399586350: ('0.0',), 1399586330: ('0.0',), 1399586329: ('0.0',), 1399586327: ('0.0',), 1399586326: ('0.0',), 1399586325: ('0.0',), 1399586324: ('0.0',), 1399586307: ('0.0',), 1399586305: ('0.0',), 1399586303: ('0.0',), 1399586302: ('0.0',), 1399586301: ('0.0',), 1399586300: ('0.0',)} args : 1399586325 depend.output_id : 0 input_args_next_step : {1399586354: ('0.0',), 1399586353: ('0.0',), 1399586350: ('0.0',), 1399586330: ('0.0',), 1399586329: ('0.0',), 1399586327: ('0.0',), 1399586326: ('0.0',), 1399586325: ('0.0',), 1399586324: ()} output_args : {1399586354: ('0.0',), 1399586353: ('0.0',), 1399586350: ('0.0',), 1399586330: ('0.0',), 1399586329: ('0.0',), 1399586327: ('0.0',), 1399586326: ('0.0',), 1399586325: ('0.0',), 1399586324: ('0.0',), 1399586307: ('0.0',), 1399586305: ('0.0',), 1399586303: ('0.0',), 1399586302: ('0.0',), 1399586301: ('0.0',), 1399586300: ('0.0',)} args : 1399586324 depend.output_id : 0 input_args_next_step : {1399586354: ('0.0',), 1399586353: ('0.0',), 1399586350: ('0.0',), 1399586330: ('0.0',), 1399586329: ('0.0',), 1399586327: ('0.0',), 1399586326: ('0.0',), 1399586325: ('0.0',), 1399586324: ('0.0',), 1399586307: ()} output_args : {1399586354: ('0.0',), 1399586353: ('0.0',), 1399586350: ('0.0',), 1399586330: ('0.0',), 1399586329: ('0.0',), 1399586327: ('0.0',), 1399586326: ('0.0',), 1399586325: ('0.0',), 1399586324: ('0.0',), 1399586307: ('0.0',), 1399586305: ('0.0',), 1399586303: ('0.0',), 1399586302: ('0.0',), 1399586301: ('0.0',), 1399586300: ('0.0',)} args : 1399586307 depend.output_id : 0 input_args_next_step : {1399586354: ('0.0',), 1399586353: ('0.0',), 1399586350: ('0.0',), 1399586330: ('0.0',), 1399586329: ('0.0',), 1399586327: ('0.0',), 1399586326: ('0.0',), 1399586325: ('0.0',), 1399586324: ('0.0',), 1399586307: ('0.0',), 1399586305: ()} output_args : {1399586354: ('0.0',), 1399586353: ('0.0',), 1399586350: ('0.0',), 1399586330: ('0.0',), 1399586329: ('0.0',), 1399586327: ('0.0',), 1399586326: ('0.0',), 1399586325: ('0.0',), 1399586324: ('0.0',), 1399586307: ('0.0',), 1399586305: ('0.0',), 1399586303: ('0.0',), 1399586302: ('0.0',), 1399586301: ('0.0',), 1399586300: ('0.0',)} args : 1399586305 depend.output_id : 0 input_args_next_step : {1399586354: ('0.0',), 1399586353: ('0.0',), 1399586350: ('0.0',), 1399586330: ('0.0',), 1399586329: ('0.0',), 1399586327: ('0.0',), 1399586326: ('0.0',), 1399586325: ('0.0',), 1399586324: ('0.0',), 1399586307: ('0.0',), 1399586305: ('0.0',), 1399586303: ()} output_args : {1399586354: ('0.0',), 1399586353: ('0.0',), 1399586350: ('0.0',), 1399586330: ('0.0',), 1399586329: ('0.0',), 1399586327: ('0.0',), 1399586326: ('0.0',), 1399586325: ('0.0',), 1399586324: ('0.0',), 1399586307: ('0.0',), 1399586305: ('0.0',), 1399586303: ('0.0',), 1399586302: ('0.0',), 1399586301: ('0.0',), 1399586300: ('0.0',)} args : 1399586303 depend.output_id : 0 input_args_next_step : {1399586354: ('0.0',), 1399586353: ('0.0',), 1399586350: ('0.0',), 1399586330: ('0.0',), 1399586329: ('0.0',), 1399586327: ('0.0',), 1399586326: ('0.0',), 1399586325: ('0.0',), 1399586324: ('0.0',), 1399586307: ('0.0',), 1399586305: ('0.0',), 1399586303: ('0.0',), 1399586302: ()} output_args : {1399586354: ('0.0',), 1399586353: ('0.0',), 1399586350: ('0.0',), 1399586330: ('0.0',), 1399586329: ('0.0',), 1399586327: ('0.0',), 1399586326: ('0.0',), 1399586325: ('0.0',), 1399586324: ('0.0',), 1399586307: ('0.0',), 1399586305: ('0.0',), 1399586303: ('0.0',), 1399586302: ('0.0',), 1399586301: ('0.0',), 1399586300: ('0.0',)} args : 1399586302 depend.output_id : 0 input_args_next_step : {1399586354: ('0.0',), 1399586353: ('0.0',), 1399586350: ('0.0',), 1399586330: ('0.0',), 1399586329: ('0.0',), 1399586327: ('0.0',), 1399586326: ('0.0',), 1399586325: ('0.0',), 1399586324: ('0.0',), 1399586307: ('0.0',), 1399586305: ('0.0',), 1399586303: ('0.0',), 1399586302: ('0.0',), 1399586301: ()} output_args : {1399586354: ('0.0',), 1399586353: ('0.0',), 1399586350: ('0.0',), 1399586330: ('0.0',), 1399586329: ('0.0',), 1399586327: ('0.0',), 1399586326: ('0.0',), 1399586325: ('0.0',), 1399586324: ('0.0',), 1399586307: ('0.0',), 1399586305: ('0.0',), 1399586303: ('0.0',), 1399586302: ('0.0',), 1399586301: ('0.0',), 1399586300: ('0.0',)} args : 1399586301 depend.output_id : 0 input_args_next_step : {1399586354: ('0.0',), 1399586353: ('0.0',), 1399586350: ('0.0',), 1399586330: ('0.0',), 1399586329: ('0.0',), 1399586327: ('0.0',), 1399586326: ('0.0',), 1399586325: ('0.0',), 1399586324: ('0.0',), 1399586307: ('0.0',), 1399586305: ('0.0',), 1399586303: ('0.0',), 1399586302: ('0.0',), 1399586301: ('0.0',), 1399586300: ()} output_args : {1399586354: ('0.0',), 1399586353: ('0.0',), 1399586350: ('0.0',), 1399586330: ('0.0',), 1399586329: ('0.0',), 1399586327: ('0.0',), 1399586326: ('0.0',), 1399586325: ('0.0',), 1399586324: ('0.0',), 1399586307: ('0.0',), 1399586305: ('0.0',), 1399586303: ('0.0',), 1399586302: ('0.0',), 1399586301: ('0.0',), 1399586300: ('0.0',)} args : 1399586300 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 : {1399586354: ('0.0',), 1399586353: ('0.0',), 1399586350: ('0.0',), 1399586330: ('0.0',), 1399586329: ('0.0',), 1399586327: ('0.0',), 1399586326: ('0.0',), 1399586325: ('0.0',), 1399586324: ('0.0',), 1399586307: ('0.0',), 1399586305: ('0.0',), 1399586303: ('0.0',), 1399586302: ('0.0',), 1399586301: ('0.0',), 1399586300: ('0.0',), 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 :16, first value : ('0.0',) 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 (1399586354,1399586353,1399586350,1399586330,1399586329,1399586327,1399586326,1399586325,1399586324,1399586307,1399586305,1399586303,1399586302,1399586301,1399586300) Found this number of photos: 15 ##### Call download_photos : nb_thread : 5 begin to download photo : 1399586300 begin to download photo : 1399586305 begin to download photo : 1399586326 begin to download photo : 1399586350 download finish for photo 1399586300 begin to download photo : 1399586301 download finish for photo 1399586305 begin to download photo : 1399586307 download finish for photo 1399586350 begin to download photo : 1399586353 download finish for photo 1399586326 begin to download photo : 1399586327 download finish for photo 1399586301 begin to download photo : 1399586302 download finish for photo 1399586353 begin to download photo : 1399586354 download finish for photo 1399586307 begin to download photo : 1399586324 download finish for photo 1399586327 begin to download photo : 1399586329 download finish for photo 1399586302 begin to download photo : 1399586303 download finish for photo 1399586354 download finish for photo 1399586324 begin to download photo : 1399586325 download finish for photo 1399586329 begin to download photo : 1399586330 download finish for photo 1399586303 download finish for photo 1399586325 download finish for photo 1399586330 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette294555981765849979/ imagette294556001765849979/ imagette294556031765849979/ imagette294556041765849979/ imagette294556051765849979/ imagette294556061765849979/ imagette294556071765849979/ imagette294556011765849979/ imagette294556021765849979/ imagette294556081765849979/ length of list_filenames : 15 ; length of list_pids : 15 ; length of list_args : 15 results_Auto_P29455589_16-12-2025_02_52_59.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 : {} imagette294555981765849979 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 : {} imagette294556001765849979 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 : {} imagette294556031765849979 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 : {} imagette294556041765849979 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 : {} imagette294556051765849979 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 : {} imagette294556061765849979 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 : {} imagette294556071765849979 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 : {} imagette294556011765849979 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 : {} imagette294556021765849979 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 : {} imagette294556081765849979 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[1399586354] : ('0.0',) no score found for photo 1399586354 We are sending mail with results at report@fotonower.com args[1399586353] : ('0.0',) no score found for photo 1399586353 We are sending mail with results at report@fotonower.com args[1399586350] : ('0.0',) no score found for photo 1399586350 We are sending mail with results at report@fotonower.com args[1399586330] : ('0.0',) no score found for photo 1399586330 We are sending mail with results at report@fotonower.com args[1399586329] : ('0.0',) no score found for photo 1399586329 We are sending mail with results at report@fotonower.com args[1399586327] : ('0.0',) no score found for photo 1399586327 We are sending mail with results at report@fotonower.com args[1399586326] : ('0.0',) no score found for photo 1399586326 We are sending mail with results at report@fotonower.com args[1399586325] : ('0.0',) no score found for photo 1399586325 We are sending mail with results at report@fotonower.com args[1399586324] : ('0.0',) no score found for photo 1399586324 We are sending mail with results at report@fotonower.com args[1399586307] : ('0.0',) no score found for photo 1399586307 We are sending mail with results at report@fotonower.com args[1399586305] : ('0.0',) no score found for photo 1399586305 We are sending mail with results at report@fotonower.com args[1399586303] : ('0.0',) no score found for photo 1399586303 We are sending mail with results at report@fotonower.com args[1399586302] : ('0.0',) no score found for photo 1399586302 We are sending mail with results at report@fotonower.com args[1399586301] : ('0.0',) no score found for photo 1399586301 We are sending mail with results at report@fotonower.com args[1399586300] : ('0.0',) no score found for photo 1399586300 We are sending mail with results at report@fotonower.com refus_total : 0.0 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=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_52_59.pdf results_Auto_P29455589_16-12-2025_02_52_59.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29455589_16-12-2025_02_52_59.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','29455589','results_Auto_P29455589_16-12-2025_02_52_59.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29455589_16-12-2025_02_52_59.pdf','pdf','','0.13','0.0') 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 [1399586354, 1399586353, 1399586350, 1399586330, 1399586329, 1399586327, 1399586326, 1399586325, 1399586324, 1399586307, 1399586305, 1399586303, 1399586302, 1399586301, 1399586300] map_info['map_portfolio_photo'] : {29455589: [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 : [1399586354, 1399586353, 1399586350, 1399586330, 1399586329, 1399586327, 1399586326, 1399586325, 1399586324, 1399586307, 1399586305, 1399586303, 1399586302, 1399586301, 1399586300] 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', '1399586354', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586353', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586350', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586330', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586329', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586327', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586326', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586325', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586324', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586307', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586305', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586303', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586302', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586301', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586300', None, None, None, None, None, '4232475') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '29455589', '1399586354', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586353', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586350', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586330', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586329', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586327', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586326', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586325', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586324', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586307', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586305', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586303', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586302', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586301', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586300', None, None, None, None, None, '4232475')] time used for this insertion : 0.018975496292114258 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.8265798091888428 time spend to save output : 0.019283771514892578 total time spend for step 4 : 1.8458635807037354 step5:split_time_score Tue Dec 16 02:53:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['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 : {1399586350: {'path': 'temp/1765849978_2731604_1399586350_fed87c293555e3c3b638c75c239a9096.jpg', 'extension': 'jpg'}, 1399586353: {'path': 'temp/1765849978_2731604_1399586353_d256dd734ff1c3920d964c7314e6ec91.jpg', 'extension': 'jpg'}, 1399586354: {'path': 'temp/1765849978_2731604_1399586354_9a94ec9f8441f5431b21899ec713ecaa.jpg', 'extension': 'jpg'}, 1399586300: {'path': 'temp/1765849978_2731604_1399586300_708624367e06adf778573413d469dee5.jpg', 'extension': 'jpg'}, 1399586301: {'path': 'temp/1765849978_2731604_1399586301_ee970eabf2c8427e1157508458c2fc6c.jpg', 'extension': 'jpg'}, 1399586302: {'path': 'temp/1765849978_2731604_1399586302_6c175ee2bb4c1bfcce5e6b63fbf10fcb.jpg', 'extension': 'jpg'}, 1399586303: {'path': 'temp/1765849978_2731604_1399586303_388599998930810b3035e0742f4c00d3.jpg', 'extension': 'jpg'}, 1399586305: {'path': 'temp/1765849978_2731604_1399586305_a6ce50d0dde3c6be252920ac4b2ee3bd.jpg', 'extension': 'jpg'}, 1399586307: {'path': 'temp/1765849978_2731604_1399586307_a62a339f86c662accf070f241706ab08.jpg', 'extension': 'jpg'}, 1399586324: {'path': 'temp/1765849978_2731604_1399586324_4b96788e25d65fe2f937e1553e1312f1.jpg', 'extension': 'jpg'}, 1399586325: {'path': 'temp/1765849978_2731604_1399586325_b3586ebf5cf40e57054e665d1388e4e8.jpg', 'extension': 'jpg'}, 1399586326: {'path': 'temp/1765849978_2731604_1399586326_456560cca0b050d127f05d642afa7a18.jpg', 'extension': 'jpg'}, 1399586327: {'path': 'temp/1765849978_2731604_1399586327_3ffff8d15a9a7430fc4fe3c383ec7be2.jpg', 'extension': 'jpg'}, 1399586329: {'path': 'temp/1765849978_2731604_1399586329_25052027c1f396f7b6508fe0ff5e86e1.jpg', 'extension': 'jpg'}, 1399586330: {'path': 'temp/1765849978_2731604_1399586330_9e8c9ba660a01e6f242ee5d52a3f4b97.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',)) 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', 34),) 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 : 34 / 23040 (0%) 16122025 29455589 Nombre de photos taguées (types de déchets): 0 / 34 (0%) 16122025 29455589 Nombre de photos taguées (volume) : 0 / 34 (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 9.5367431640625e-07 elapsed_time : order_list_meta_photo_and_scores 3.5762786865234375e-06 ?????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0012569427490234375 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.23612308502197266 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': 2749254, 'mtr_portfolio_id': 29450388, 'dashboard_result_id': 18403657, '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': 2749254, 'mtr_portfolio_id': 29450996, 'dashboard_result_id': 18403658, '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': 2749254, 'mtr_portfolio_id': 29451566, 'dashboard_result_id': 18403659, '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': 2749254, 'mtr_portfolio_id': 29452103, 'dashboard_result_id': 18403660, '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': 2749254, 'mtr_portfolio_id': 29453332, 'dashboard_result_id': 18403661, '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': 2749254, 'mtr_portfolio_id': 29453728, 'dashboard_result_id': 18403662, '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_01_58_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': 2749254, 'mtr_portfolio_id': 29454116, 'dashboard_result_id': 18403663, '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': 2749254, 'mtr_portfolio_id': 29454690, 'dashboard_result_id': 18403664, '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': 2749254, 'mtr_portfolio_id': 29455111, 'dashboard_result_id': 18403665, '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': 2749254, 'mtr_portfolio_id': 29455589, 'dashboard_result_id': 18403666, '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_50_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}}"}] 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 = 2749254 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 (18403657, 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 = 2749254 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 (18403658, 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 = 2749254 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 (18403659, 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 = 2749254 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 (18403660, 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 = 2749254 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 (18403661, 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 = 2749254 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 (18403662, 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 = 2749252 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 (18403663, 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 = 2749252 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 (18403664, 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 = 2749252 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 (18403665, 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 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 created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 29455589 and created_at >= ( SELECT min(created_at) 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 )and created_at < ( SELECT addtime(max(created_at),100) 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 value desc list_result_datou : [] 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_52_59.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_52_59.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 = 2749252 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,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'16122025': {'nb_upload': 34, '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 [1399586354, 1399586353, 1399586350, 1399586330, 1399586329, 1399586327, 1399586326, 1399586325, 1399586324, 1399586307, 1399586305, 1399586303, 1399586302, 1399586301, 1399586300] map_info['map_portfolio_photo'] : {29455589: [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 : [1399586354, 1399586353, 1399586350, 1399586330, 1399586329, 1399586327, 1399586326, 1399586325, 1399586324, 1399586307, 1399586305, 1399586303, 1399586302, 1399586301, 1399586300] 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', '1399586354', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586353', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586350', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586330', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586329', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586327', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586326', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586325', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586324', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586307', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586305', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586303', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586302', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586301', None, None, None, None, None, '4232475') ('4302', None, None, None, None, None, None, None, '4232475') ('4302', '29455589', '1399586300', None, None, None, None, None, '4232475') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 16 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', '1399586354', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586353', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586350', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586330', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586329', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586327', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586326', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586325', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586324', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586307', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586305', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586303', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586302', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586301', None, None, None, None, None, '4232475'), ('4302', '29455589', '1399586300', None, None, None, None, None, '4232475')] time used for this insertion : 0.01596522331237793 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.9765386581420898 time spend to save output : 0.016192197799682617 total time spend for step 5 : 0.9927308559417725 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.11user 2.49system 0:07.37elapsed 62%CPU (0avgtext+0avgdata 166448maxresident)k 32inputs+8440outputs (2major+67505minor)pagefaults 0swaps