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 : 239480 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 (3841937) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3841937) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27510448 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3841937'] with mtr_portfolio_ids : ['27510448'] and first list_photo_ids : [] new path : /proc/239480/ Name: python3 Umask: 0002 State: R (running) Tgid: 239480 Ngid: 0 Pid: 239480 PPid: 239479 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 239480 NSpid: 239480 NSpgid: 238243 NSsid: 238243 VmPeak: 1106868 kB VmSize: 1106868 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99064 kB VmRSS: 99064 kB RssAnon: 59848 kB RssFile: 39216 kB RssShmem: 0 kB VmData: 865620 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 596 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: 57 nonvoluntary_ctxt_switches: 92 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '239480', 'Ngid': '0', 'Pid': '239480', 'PPid': '239479', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '239480', 'NSpid': '239480', 'NSpgid': '238243', 'NSsid': '238243', 'VmPeak': '1106868 kB', 'VmSize': '1106868 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99064 kB', 'VmRSS': '99064 kB', 'RssAnon': '59848 kB', 'RssFile': '39216 kB', 'RssShmem': '0 kB', 'VmData': '865620 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '596 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': '57', 'nonvoluntary_ctxt_switches': '92'} ('datou_batch_current', '239480', '1106868', '0', '1106868', '865620', '99064', b'', 'marlene', '3841937') 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 (27510448) 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 (3841937 ) ) 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 (27510448) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1387699435, 'portfolio_id': 27510448}, {'photo_id': 1387699432, 'portfolio_id': 27510448}, {'photo_id': 1387699424, 'portfolio_id': 27510448}, {'photo_id': 1387699423, 'portfolio_id': 27510448}, {'photo_id': 1387699369, 'portfolio_id': 27510448}, {'photo_id': 1387699365, 'portfolio_id': 27510448}, {'photo_id': 1387699362, 'portfolio_id': 27510448}, {'photo_id': 1387699361, 'portfolio_id': 27510448}, {'photo_id': 1387699334, 'portfolio_id': 27510448}, {'photo_id': 1387699332, 'portfolio_id': 27510448}, {'photo_id': 1387699329, 'portfolio_id': 27510448}, {'photo_id': 1387699328, 'portfolio_id': 27510448}, {'photo_id': 1387699326, 'portfolio_id': 27510448}, {'photo_id': 1387699321, 'portfolio_id': 27510448}, {'photo_id': 1387699318, 'portfolio_id': 27510448}, {'photo_id': 1387699309, 'portfolio_id': 27510448}, {'photo_id': 1387699307, 'portfolio_id': 27510448}, {'photo_id': 1387699304, 'portfolio_id': 27510448}, {'photo_id': 1387699303, 'portfolio_id': 27510448}, {'photo_id': 1387699291, 'portfolio_id': 27510448}, {'photo_id': 1387699289, 'portfolio_id': 27510448}, {'photo_id': 1387699288, 'portfolio_id': 27510448}, {'photo_id': 1387699287, 'portfolio_id': 27510448}, {'photo_id': 1387699199, 'portfolio_id': 27510448}, {'photo_id': 1387699189, 'portfolio_id': 27510448}, {'photo_id': 1387699185, 'portfolio_id': 27510448}, {'photo_id': 1387699182, 'portfolio_id': 27510448}, {'photo_id': 1387699180, 'portfolio_id': 27510448}, {'photo_id': 1387699138, 'portfolio_id': 27510448}] map_portfolio_id_photo_id: {27510448: [1387699435, 1387699432, 1387699424, 1387699423, 1387699369, 1387699365, 1387699362, 1387699361, 1387699334, 1387699332, 1387699329, 1387699328, 1387699326, 1387699321, 1387699318, 1387699309, 1387699307, 1387699304, 1387699303, 1387699291, 1387699289, 1387699288, 1387699287, 1387699199, 1387699189, 1387699185, 1387699182, 1387699180, 1387699138]} ##### 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.05166459083557129 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Sat Oct 4 03:09: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 After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27510448) 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 : 27510448 get user id for portfolio 27510448 get sub ptf for main ptf 27510448, type 3726 and hashtags ['cartonnette', 'Carton_gris', 'autre_refus', 'plastique', 'Carton_brun', 'environnement', 'metal', 'papier', 'Teint_Dans_La_Masse', 'mal_croppe', 'flou', 'kraft'] 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`=27510448 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('cartonnette','Carton_gris','autre_refus','plastique','Carton_brun','environnement','metal','papier','Teint_Dans_La_Masse','mal_croppe','flou','kraft')) 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`=27510448 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('cartonnette','Carton_gris','autre_refus','plastique','Carton_brun','environnement','metal','papier','Teint_Dans_La_Masse','mal_croppe','flou','kraft')) AND mptpi.`min_score`=0.5 To do returned map {'flou': {'main_port_id': 27510448, 'sub_port_id': 27510460, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18589737, 'last_updated_at': datetime.datetime(2025, 10, 4, 3, 7, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 4, 3, 7, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 4, 3, 5)}, 'metal': {'main_port_id': 27510448, 'sub_port_id': 27510461, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18589738, 'last_updated_at': datetime.datetime(2025, 10, 4, 3, 7, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 4, 3, 7, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 4, 3, 5)}, 'mal_croppe': {'main_port_id': 27510448, 'sub_port_id': 27510462, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18589739, 'last_updated_at': datetime.datetime(2025, 10, 4, 3, 7, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 4, 3, 7, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 4, 3, 5)}, 'cartonnette': {'main_port_id': 27510448, 'sub_port_id': 27510463, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18589740, 'last_updated_at': datetime.datetime(2025, 10, 4, 3, 7, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 4, 3, 7, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 4, 3, 5)}, 'kraft': {'main_port_id': 27510448, 'sub_port_id': 27510464, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18589741, 'last_updated_at': datetime.datetime(2025, 10, 4, 3, 7, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 4, 3, 7, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 4, 3, 5)}, 'plastique': {'main_port_id': 27510448, 'sub_port_id': 27510466, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18589742, 'last_updated_at': datetime.datetime(2025, 10, 4, 3, 7, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 4, 3, 7, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 4, 3, 5)}, 'environnement': {'main_port_id': 27510448, 'sub_port_id': 27510467, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18589743, 'last_updated_at': datetime.datetime(2025, 10, 4, 3, 7, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 4, 3, 7, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 4, 3, 5)}, 'Carton_gris': {'main_port_id': 27510448, 'sub_port_id': 27510468, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18589744, 'last_updated_at': datetime.datetime(2025, 10, 4, 3, 7, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 4, 3, 7, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 4, 3, 5)}, 'papier': {'main_port_id': 27510448, 'sub_port_id': 27510469, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18589745, 'last_updated_at': datetime.datetime(2025, 10, 4, 3, 7, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 4, 3, 7, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 4, 3, 5)}, 'autre_refus': {'main_port_id': 27510448, 'sub_port_id': 27510470, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18589746, 'last_updated_at': datetime.datetime(2025, 10, 4, 3, 7, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 4, 3, 7, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 4, 3, 5)}, 'Teint_Dans_La_Masse': {'main_port_id': 27510448, 'sub_port_id': 27510471, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18589747, 'last_updated_at': datetime.datetime(2025, 10, 4, 3, 7, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 4, 3, 7, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 4, 3, 5)}, 'Carton_brun': {'main_port_id': 27510448, 'sub_port_id': 27510472, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18589748, 'last_updated_at': datetime.datetime(2025, 10, 4, 3, 7, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 4, 3, 7, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 4, 3, 5)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27510460 , 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=27510448 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 (27510460) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27510448) result : ((1387699138,), (1387699180,), (1387699182,), (1387699185,), (1387699189,), (1387699199,), (1387699287,), (1387699288,), (1387699289,), (1387699291,), (1387699303,), (1387699304,), (1387699307,), (1387699309,), (1387699318,), (1387699321,), (1387699326,), (1387699328,), (1387699329,), (1387699332,), (1387699334,), (1387699361,), (1387699362,), (1387699365,), (1387699369,), (1387699423,), (1387699424,), (1387699432,), (1387699435,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27510461 , 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=27510448 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 (27510461) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27510448) result : ((1387699138,), (1387699180,), (1387699182,), (1387699185,), (1387699189,), (1387699199,), (1387699287,), (1387699288,), (1387699289,), (1387699291,), (1387699303,), (1387699304,), (1387699307,), (1387699309,), (1387699318,), (1387699321,), (1387699326,), (1387699328,), (1387699329,), (1387699332,), (1387699334,), (1387699361,), (1387699362,), (1387699365,), (1387699369,), (1387699423,), (1387699424,), (1387699432,), (1387699435,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27510462 , 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=27510448 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 (27510462) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27510448) result : ((1387699138,), (1387699180,), (1387699182,), (1387699185,), (1387699189,), (1387699199,), (1387699287,), (1387699288,), (1387699289,), (1387699291,), (1387699303,), (1387699304,), (1387699307,), (1387699309,), (1387699318,), (1387699321,), (1387699326,), (1387699328,), (1387699329,), (1387699332,), (1387699334,), (1387699361,), (1387699362,), (1387699365,), (1387699369,), (1387699423,), (1387699424,), (1387699432,), (1387699435,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27510463 , 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=27510448 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 (27510463) result : ((1387699377,), (1387699378,), (1387699379,), (1387699380,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27510448) result : ((1387699138,), (1387699180,), (1387699182,), (1387699185,), (1387699189,), (1387699199,), (1387699287,), (1387699288,), (1387699289,), (1387699291,), (1387699303,), (1387699304,), (1387699307,), (1387699309,), (1387699318,), (1387699321,), (1387699326,), (1387699328,), (1387699329,), (1387699332,), (1387699334,), (1387699361,), (1387699362,), (1387699365,), (1387699369,), (1387699423,), (1387699424,), (1387699432,), (1387699435,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27510464 , 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=27510448 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 (27510464) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27510448) result : ((1387699138,), (1387699180,), (1387699182,), (1387699185,), (1387699189,), (1387699199,), (1387699287,), (1387699288,), (1387699289,), (1387699291,), (1387699303,), (1387699304,), (1387699307,), (1387699309,), (1387699318,), (1387699321,), (1387699326,), (1387699328,), (1387699329,), (1387699332,), (1387699334,), (1387699361,), (1387699362,), (1387699365,), (1387699369,), (1387699423,), (1387699424,), (1387699432,), (1387699435,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27510466 , 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=27510448 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 (27510466) result : ((1387699381,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27510448) result : ((1387699138,), (1387699180,), (1387699182,), (1387699185,), (1387699189,), (1387699199,), (1387699287,), (1387699288,), (1387699289,), (1387699291,), (1387699303,), (1387699304,), (1387699307,), (1387699309,), (1387699318,), (1387699321,), (1387699326,), (1387699328,), (1387699329,), (1387699332,), (1387699334,), (1387699361,), (1387699362,), (1387699365,), (1387699369,), (1387699423,), (1387699424,), (1387699432,), (1387699435,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27510467 , 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=27510448 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 (27510467) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27510448) result : ((1387699138,), (1387699180,), (1387699182,), (1387699185,), (1387699189,), (1387699199,), (1387699287,), (1387699288,), (1387699289,), (1387699291,), (1387699303,), (1387699304,), (1387699307,), (1387699309,), (1387699318,), (1387699321,), (1387699326,), (1387699328,), (1387699329,), (1387699332,), (1387699334,), (1387699361,), (1387699362,), (1387699365,), (1387699369,), (1387699423,), (1387699424,), (1387699432,), (1387699435,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27510468 , 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=27510448 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 (27510468) result : ((1387699375,), (1387699376,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27510448) result : ((1387699138,), (1387699180,), (1387699182,), (1387699185,), (1387699189,), (1387699199,), (1387699287,), (1387699288,), (1387699289,), (1387699291,), (1387699303,), (1387699304,), (1387699307,), (1387699309,), (1387699318,), (1387699321,), (1387699326,), (1387699328,), (1387699329,), (1387699332,), (1387699334,), (1387699361,), (1387699362,), (1387699365,), (1387699369,), (1387699423,), (1387699424,), (1387699432,), (1387699435,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27510469 , 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=27510448 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 (27510469) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27510448) result : ((1387699138,), (1387699180,), (1387699182,), (1387699185,), (1387699189,), (1387699199,), (1387699287,), (1387699288,), (1387699289,), (1387699291,), (1387699303,), (1387699304,), (1387699307,), (1387699309,), (1387699318,), (1387699321,), (1387699326,), (1387699328,), (1387699329,), (1387699332,), (1387699334,), (1387699361,), (1387699362,), (1387699365,), (1387699369,), (1387699423,), (1387699424,), (1387699432,), (1387699435,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27510470 , 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=27510448 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 (27510470) result : ((1387699374,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27510448) result : ((1387699138,), (1387699180,), (1387699182,), (1387699185,), (1387699189,), (1387699199,), (1387699287,), (1387699288,), (1387699289,), (1387699291,), (1387699303,), (1387699304,), (1387699307,), (1387699309,), (1387699318,), (1387699321,), (1387699326,), (1387699328,), (1387699329,), (1387699332,), (1387699334,), (1387699361,), (1387699362,), (1387699365,), (1387699369,), (1387699423,), (1387699424,), (1387699432,), (1387699435,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27510471 , 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=27510448 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 (27510471) result : ((1387699370,), (1387699371,), (1387699372,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27510448) result : ((1387699138,), (1387699180,), (1387699182,), (1387699185,), (1387699189,), (1387699199,), (1387699287,), (1387699288,), (1387699289,), (1387699291,), (1387699303,), (1387699304,), (1387699307,), (1387699309,), (1387699318,), (1387699321,), (1387699326,), (1387699328,), (1387699329,), (1387699332,), (1387699334,), (1387699361,), (1387699362,), (1387699365,), (1387699369,), (1387699423,), (1387699424,), (1387699432,), (1387699435,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27510472 , 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=27510448 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 (27510472) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27510448) result : ((1387699138,), (1387699180,), (1387699182,), (1387699185,), (1387699189,), (1387699199,), (1387699287,), (1387699288,), (1387699289,), (1387699291,), (1387699303,), (1387699304,), (1387699307,), (1387699309,), (1387699318,), (1387699321,), (1387699326,), (1387699328,), (1387699329,), (1387699332,), (1387699334,), (1387699361,), (1387699362,), (1387699365,), (1387699369,), (1387699423,), (1387699424,), (1387699432,), (1387699435,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") 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`=27510448 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('cartonnette','Carton_gris','autre_refus','plastique','Carton_brun','environnement','metal','papier','Teint_Dans_La_Masse','mal_croppe','flou','kraft')) 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`=27510448 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('cartonnette','Carton_gris','autre_refus','plastique','Carton_brun','environnement','metal','papier','Teint_Dans_La_Masse','mal_croppe','flou','kraft')) AND mptpi.`min_score`=0.5 To do returned map {'flou': {'main_port_id': 27510448, 'sub_port_id': 27510474, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18589749, 'last_updated_at': datetime.datetime(2025, 10, 4, 3, 5, 6), 'last_updated_at_desc': datetime.datetime(2025, 10, 4, 3, 5, 6), 'last_updated_at_asc': datetime.datetime(2025, 10, 4, 3, 5, 6)}, 'metal': {'main_port_id': 27510448, 'sub_port_id': 27510475, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18589750, 'last_updated_at': datetime.datetime(2025, 10, 4, 3, 5, 6), 'last_updated_at_desc': datetime.datetime(2025, 10, 4, 3, 5, 6), 'last_updated_at_asc': datetime.datetime(2025, 10, 4, 3, 5, 6)}, 'mal_croppe': {'main_port_id': 27510448, 'sub_port_id': 27510476, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18589751, 'last_updated_at': datetime.datetime(2025, 10, 4, 3, 5, 6), 'last_updated_at_desc': datetime.datetime(2025, 10, 4, 3, 5, 6), 'last_updated_at_asc': datetime.datetime(2025, 10, 4, 3, 5, 6)}, 'cartonnette': {'main_port_id': 27510448, 'sub_port_id': 27510477, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18589752, 'last_updated_at': datetime.datetime(2025, 10, 4, 3, 5, 6), 'last_updated_at_desc': datetime.datetime(2025, 10, 4, 3, 5, 6), 'last_updated_at_asc': datetime.datetime(2025, 10, 4, 3, 5, 6)}, 'kraft': {'main_port_id': 27510448, 'sub_port_id': 27510478, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18589753, 'last_updated_at': datetime.datetime(2025, 10, 4, 3, 5, 6), 'last_updated_at_desc': datetime.datetime(2025, 10, 4, 3, 5, 6), 'last_updated_at_asc': datetime.datetime(2025, 10, 4, 3, 5, 6)}, 'plastique': {'main_port_id': 27510448, 'sub_port_id': 27510479, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18589754, 'last_updated_at': datetime.datetime(2025, 10, 4, 3, 5, 6), 'last_updated_at_desc': datetime.datetime(2025, 10, 4, 3, 5, 6), 'last_updated_at_asc': datetime.datetime(2025, 10, 4, 3, 5, 6)}, 'environnement': {'main_port_id': 27510448, 'sub_port_id': 27510480, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18589755, 'last_updated_at': datetime.datetime(2025, 10, 4, 3, 5, 6), 'last_updated_at_desc': datetime.datetime(2025, 10, 4, 3, 5, 6), 'last_updated_at_asc': datetime.datetime(2025, 10, 4, 3, 5, 6)}, 'Carton_gris': {'main_port_id': 27510448, 'sub_port_id': 27510481, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18589756, 'last_updated_at': datetime.datetime(2025, 10, 4, 3, 5, 6), 'last_updated_at_desc': datetime.datetime(2025, 10, 4, 3, 5, 6), 'last_updated_at_asc': datetime.datetime(2025, 10, 4, 3, 5, 6)}, 'papier': {'main_port_id': 27510448, 'sub_port_id': 27510482, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18589757, 'last_updated_at': datetime.datetime(2025, 10, 4, 3, 5, 6), 'last_updated_at_desc': datetime.datetime(2025, 10, 4, 3, 5, 6), 'last_updated_at_asc': datetime.datetime(2025, 10, 4, 3, 5, 6)}, 'autre_refus': {'main_port_id': 27510448, 'sub_port_id': 27510483, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18589758, 'last_updated_at': datetime.datetime(2025, 10, 4, 3, 5, 6), 'last_updated_at_desc': datetime.datetime(2025, 10, 4, 3, 5, 6), 'last_updated_at_asc': datetime.datetime(2025, 10, 4, 3, 5, 6)}, 'Teint_Dans_La_Masse': {'main_port_id': 27510448, 'sub_port_id': 27510484, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18589759, 'last_updated_at': datetime.datetime(2025, 10, 4, 3, 5, 6), 'last_updated_at_desc': datetime.datetime(2025, 10, 4, 3, 5, 6), 'last_updated_at_asc': datetime.datetime(2025, 10, 4, 3, 5, 6)}, 'Carton_brun': {'main_port_id': 27510448, 'sub_port_id': 27510485, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18589760, 'last_updated_at': datetime.datetime(2025, 10, 4, 3, 7, 4), 'last_updated_at_desc': datetime.datetime(2025, 10, 4, 3, 7, 4), 'last_updated_at_asc': datetime.datetime(2025, 10, 4, 3, 5, 6)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27510474,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27510460 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27510475,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27510461 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27510476,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27510462 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27510477,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27510463 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27510478,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27510464 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27510479,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27510466 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27510480,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27510467 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27510481,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27510468 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27510482,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27510469 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27510483,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27510470 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27510484,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27510471 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27510485,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27510472 lien utilise dans velours : https://marlene.fotonower.com/velours/27510474,27510475,27510476,27510477,27510478,27510479,27510480,27510481,27510482,27510483,27510484,27510485?tags=flou,metal,mal_croppe,cartonnette,kraft,plastique,environnement,Carton_gris,papier,autre_refus,Teint_Dans_La_Masse,Carton_brun After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27510448]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1387699435, 1387699432, 1387699424, 1387699423, 1387699369, 1387699365, 1387699362, 1387699361] map_info['map_portfolio_photo'] : {27510448: [1387699435, 1387699432, 1387699424, 1387699423, 1387699369, 1387699365, 1387699362, 1387699361, 1387699334, 1387699332, 1387699329, 1387699328, 1387699326, 1387699321, 1387699318, 1387699309, 1387699307, 1387699304, 1387699303, 1387699291, 1387699289, 1387699288, 1387699287, 1387699199, 1387699189, 1387699185, 1387699182, 1387699180, 1387699138]} final : False mtd_id 4302 list_pids : [1387699435, 1387699432, 1387699424, 1387699423, 1387699369, 1387699365, 1387699362, 1387699361] Looping around the photos to save general results len do output : 1 /27510448. 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, '3841937') ('4302', '27510448', '1387699435', None, None, None, None, None, '3841937') ('4302', None, None, None, None, None, None, None, '3841937') ('4302', '27510448', '1387699432', None, None, None, None, None, '3841937') ('4302', None, None, None, None, None, None, None, '3841937') ('4302', '27510448', '1387699424', None, None, None, None, None, '3841937') ('4302', None, None, None, None, None, None, None, '3841937') ('4302', '27510448', '1387699423', None, None, None, None, None, '3841937') ('4302', None, None, None, None, None, None, None, '3841937') ('4302', '27510448', '1387699369', None, None, None, None, None, '3841937') ('4302', None, None, None, None, None, None, None, '3841937') ('4302', '27510448', '1387699365', None, None, None, None, None, '3841937') ('4302', None, None, None, None, None, None, None, '3841937') ('4302', '27510448', '1387699362', None, None, None, None, None, '3841937') ('4302', None, None, None, None, None, None, None, '3841937') ('4302', '27510448', '1387699361', None, None, None, None, None, '3841937') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 9 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, '27510448', "{'flou': 27510460, 'metal': 27510461, 'mal_croppe': 27510462, 'cartonnette': 27510463, 'kraft': 27510464, 'plastique': 27510466, 'environnement': 27510467, 'Carton_gris': 27510468, 'papier': 27510469, 'autre_refus': 27510470, 'Teint_Dans_La_Masse': 27510471, 'Carton_brun': 27510472}", None, None, None, None, '3841937'), ('4302', '27510448', '1387699435', None, None, None, None, None, '3841937'), ('4302', '27510448', '1387699432', None, None, None, None, None, '3841937'), ('4302', '27510448', '1387699424', None, None, None, None, None, '3841937'), ('4302', '27510448', '1387699423', None, None, None, None, None, '3841937'), ('4302', '27510448', '1387699369', None, None, None, None, None, '3841937'), ('4302', '27510448', '1387699365', None, None, None, None, None, '3841937'), ('4302', '27510448', '1387699362', None, None, None, None, None, '3841937'), ('4302', '27510448', '1387699361', None, None, None, None, None, '3841937')] time used for this insertion : 0.03675127029418945 save_final save missing photos in datou_result : time spend for datou_step_exec : 5.043902397155762 time spend to save output : 0.03760528564453125 total time spend for step 1 : 5.081507682800293 step2:final Sat Oct 4 03:09:05 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 (27510448) 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 27510448 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1387699138,1387699189,1387699185,1387699182,1387699180,1387699199,1387699291,1387699329,1387699289,1387699328,1387699288,1387699326,1387699287,1387699321,1387699318,1387699309,1387699307,1387699304,1387699303,1387699334,1387699332,1387699369,1387699365,1387699362,1387699361,1387699435,1387699432,1387699424,1387699423); insert ignore into MTRUser.portfolio_carac_ratio (portfolio_id, hashtag_type, hashtag_id, value) values (%s,%s,%s,%s) on DUPLICATE KEY UPDATE value=VALUES(value) After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27510448]) Inside saveOutput : final : False verbose : True original output for save of step final : {1387699435: ('0.12824820751929258',), 1387699432: ('0.12824820751929258',), 1387699424: ('0.12824820751929258',), 1387699423: ('0.12824820751929258',), 1387699369: ('0.12824820751929258',), 1387699365: ('0.12824820751929258',), 1387699362: ('0.12824820751929258',), 1387699361: ('0.12824820751929258',)} new output for save of step final : {1387699435: ('0.12824820751929258',), 1387699432: ('0.12824820751929258',), 1387699424: ('0.12824820751929258',), 1387699423: ('0.12824820751929258',), 1387699369: ('0.12824820751929258',), 1387699365: ('0.12824820751929258',), 1387699362: ('0.12824820751929258',), 1387699361: ('0.12824820751929258',)} [1387699435, 1387699432, 1387699424, 1387699423, 1387699369, 1387699365, 1387699362, 1387699361] map_info['map_portfolio_photo'] : {27510448: [1387699435, 1387699432, 1387699424, 1387699423, 1387699369, 1387699365, 1387699362, 1387699361, 1387699334, 1387699332, 1387699329, 1387699328, 1387699326, 1387699321, 1387699318, 1387699309, 1387699307, 1387699304, 1387699303, 1387699291, 1387699289, 1387699288, 1387699287, 1387699199, 1387699189, 1387699185, 1387699182, 1387699180, 1387699138]} final : False mtd_id 4302 list_pids : [1387699435, 1387699432, 1387699424, 1387699423, 1387699369, 1387699365, 1387699362, 1387699361] Looping around the photos to save general results len do output : 8 /1387699435.Didn't retrieve data . /1387699432.Didn't retrieve data . /1387699424.Didn't retrieve data . /1387699423.Didn't retrieve data . /1387699369.Didn't retrieve data . /1387699365.Didn't retrieve data . /1387699362.Didn't retrieve data . /1387699361.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, '3841937') ('4302', '27510448', '1387699435', None, None, None, None, None, '3841937') ('4302', None, None, None, None, None, None, None, '3841937') ('4302', '27510448', '1387699432', None, None, None, None, None, '3841937') ('4302', None, None, None, None, None, None, None, '3841937') ('4302', '27510448', '1387699424', None, None, None, None, None, '3841937') ('4302', None, None, None, None, None, None, None, '3841937') ('4302', '27510448', '1387699423', None, None, None, None, None, '3841937') ('4302', None, None, None, None, None, None, None, '3841937') ('4302', '27510448', '1387699369', None, None, None, None, None, '3841937') ('4302', None, None, None, None, None, None, None, '3841937') ('4302', '27510448', '1387699365', None, None, None, None, None, '3841937') ('4302', None, None, None, None, None, None, None, '3841937') ('4302', '27510448', '1387699362', None, None, None, None, None, '3841937') ('4302', None, None, None, None, None, None, None, '3841937') ('4302', '27510448', '1387699361', None, None, None, None, None, '3841937') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 24 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', '27510448', '1387699435', '0.12824820751929258', None, None, None, None, '3841937'), ('4302', '27510448', '1387699432', '0.12824820751929258', None, None, None, None, '3841937'), ('4302', '27510448', '1387699424', '0.12824820751929258', None, None, None, None, '3841937'), ('4302', '27510448', '1387699423', '0.12824820751929258', None, None, None, None, '3841937'), ('4302', '27510448', '1387699369', '0.12824820751929258', None, None, None, None, '3841937'), ('4302', '27510448', '1387699365', '0.12824820751929258', None, None, None, None, '3841937'), ('4302', '27510448', '1387699362', '0.12824820751929258', None, None, None, None, '3841937'), ('4302', '27510448', '1387699361', '0.12824820751929258', None, None, None, None, '3841937')] time used for this insertion : 0.03590202331542969 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.24825334548950195 time spend to save output : 0.036342620849609375 total time spend for step 2 : 0.28459596633911133 step3:velours_tree Sat Oct 4 03:09:05 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 : {27510448: [{'flou': 27510460, 'metal': 27510461, 'mal_croppe': 27510462, 'cartonnette': 27510463, 'kraft': 27510464, 'plastique': 27510466, 'environnement': 27510467, 'Carton_gris': 27510468, 'papier': 27510469, 'autre_refus': 27510470, 'Teint_Dans_La_Masse': 27510471, 'Carton_brun': 27510472}]} input_args_next_step : {27510448: ()} output_args : {27510448: [{'flou': 27510460, 'metal': 27510461, 'mal_croppe': 27510462, 'cartonnette': 27510463, 'kraft': 27510464, 'plastique': 27510466, 'environnement': 27510467, 'Carton_gris': 27510468, 'papier': 27510469, 'autre_refus': 27510470, 'Teint_Dans_La_Masse': 27510471, 'Carton_brun': 27510472}]} args : 27510448 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 : ({'flou': 27510460, 'metal': 27510461, 'mal_croppe': 27510462, 'cartonnette': 27510463, 'kraft': 27510464, 'plastique': 27510466, 'environnement': 27510467, 'Carton_gris': 27510468, 'papier': 27510469, 'autre_refus': 27510470, 'Teint_Dans_La_Masse': 27510471, 'Carton_brun': 27510472},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27510448) 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([27510448]) 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.28183674812316895 time spend to save output : 5.1975250244140625e-05 total time spend for step 3 : 0.2818887233734131 step4:send_mail_cod Sat Oct 4 03:09:06 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 : {1387699435: ('0.12824820751929258',), 1387699432: ('0.12824820751929258',), 1387699424: ('0.12824820751929258',), 1387699423: ('0.12824820751929258',), 1387699369: ('0.12824820751929258',), 1387699365: ('0.12824820751929258',), 1387699362: ('0.12824820751929258',), 1387699361: ('0.12824820751929258',)} input_args_next_step : {1387699435: ()} output_args : {1387699435: ('0.12824820751929258',), 1387699432: ('0.12824820751929258',), 1387699424: ('0.12824820751929258',), 1387699423: ('0.12824820751929258',), 1387699369: ('0.12824820751929258',), 1387699365: ('0.12824820751929258',), 1387699362: ('0.12824820751929258',), 1387699361: ('0.12824820751929258',)} args : 1387699435 depend.output_id : 0 input_args_next_step : {1387699435: ('0.12824820751929258',), 1387699432: ()} output_args : {1387699435: ('0.12824820751929258',), 1387699432: ('0.12824820751929258',), 1387699424: ('0.12824820751929258',), 1387699423: ('0.12824820751929258',), 1387699369: ('0.12824820751929258',), 1387699365: ('0.12824820751929258',), 1387699362: ('0.12824820751929258',), 1387699361: ('0.12824820751929258',)} args : 1387699432 depend.output_id : 0 input_args_next_step : {1387699435: ('0.12824820751929258',), 1387699432: ('0.12824820751929258',), 1387699424: ()} output_args : {1387699435: ('0.12824820751929258',), 1387699432: ('0.12824820751929258',), 1387699424: ('0.12824820751929258',), 1387699423: ('0.12824820751929258',), 1387699369: ('0.12824820751929258',), 1387699365: ('0.12824820751929258',), 1387699362: ('0.12824820751929258',), 1387699361: ('0.12824820751929258',)} args : 1387699424 depend.output_id : 0 input_args_next_step : {1387699435: ('0.12824820751929258',), 1387699432: ('0.12824820751929258',), 1387699424: ('0.12824820751929258',), 1387699423: ()} output_args : {1387699435: ('0.12824820751929258',), 1387699432: ('0.12824820751929258',), 1387699424: ('0.12824820751929258',), 1387699423: ('0.12824820751929258',), 1387699369: ('0.12824820751929258',), 1387699365: ('0.12824820751929258',), 1387699362: ('0.12824820751929258',), 1387699361: ('0.12824820751929258',)} args : 1387699423 depend.output_id : 0 input_args_next_step : {1387699435: ('0.12824820751929258',), 1387699432: ('0.12824820751929258',), 1387699424: ('0.12824820751929258',), 1387699423: ('0.12824820751929258',), 1387699369: ()} output_args : {1387699435: ('0.12824820751929258',), 1387699432: ('0.12824820751929258',), 1387699424: ('0.12824820751929258',), 1387699423: ('0.12824820751929258',), 1387699369: ('0.12824820751929258',), 1387699365: ('0.12824820751929258',), 1387699362: ('0.12824820751929258',), 1387699361: ('0.12824820751929258',)} args : 1387699369 depend.output_id : 0 input_args_next_step : {1387699435: ('0.12824820751929258',), 1387699432: ('0.12824820751929258',), 1387699424: ('0.12824820751929258',), 1387699423: ('0.12824820751929258',), 1387699369: ('0.12824820751929258',), 1387699365: ()} output_args : {1387699435: ('0.12824820751929258',), 1387699432: ('0.12824820751929258',), 1387699424: ('0.12824820751929258',), 1387699423: ('0.12824820751929258',), 1387699369: ('0.12824820751929258',), 1387699365: ('0.12824820751929258',), 1387699362: ('0.12824820751929258',), 1387699361: ('0.12824820751929258',)} args : 1387699365 depend.output_id : 0 input_args_next_step : {1387699435: ('0.12824820751929258',), 1387699432: ('0.12824820751929258',), 1387699424: ('0.12824820751929258',), 1387699423: ('0.12824820751929258',), 1387699369: ('0.12824820751929258',), 1387699365: ('0.12824820751929258',), 1387699362: ()} output_args : {1387699435: ('0.12824820751929258',), 1387699432: ('0.12824820751929258',), 1387699424: ('0.12824820751929258',), 1387699423: ('0.12824820751929258',), 1387699369: ('0.12824820751929258',), 1387699365: ('0.12824820751929258',), 1387699362: ('0.12824820751929258',), 1387699361: ('0.12824820751929258',)} args : 1387699362 depend.output_id : 0 input_args_next_step : {1387699435: ('0.12824820751929258',), 1387699432: ('0.12824820751929258',), 1387699424: ('0.12824820751929258',), 1387699423: ('0.12824820751929258',), 1387699369: ('0.12824820751929258',), 1387699365: ('0.12824820751929258',), 1387699362: ('0.12824820751929258',), 1387699361: ()} output_args : {1387699435: ('0.12824820751929258',), 1387699432: ('0.12824820751929258',), 1387699424: ('0.12824820751929258',), 1387699423: ('0.12824820751929258',), 1387699369: ('0.12824820751929258',), 1387699365: ('0.12824820751929258',), 1387699362: ('0.12824820751929258',), 1387699361: ('0.12824820751929258',)} args : 1387699361 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 : {27510448: [{'flou': 27510460, 'metal': 27510461, 'mal_croppe': 27510462, 'cartonnette': 27510463, 'kraft': 27510464, 'plastique': 27510466, 'environnement': 27510467, 'Carton_gris': 27510468, 'papier': 27510469, 'autre_refus': 27510470, 'Teint_Dans_La_Masse': 27510471, 'Carton_brun': 27510472}]} input_args_next_step : {1387699435: ('0.12824820751929258',), 1387699432: ('0.12824820751929258',), 1387699424: ('0.12824820751929258',), 1387699423: ('0.12824820751929258',), 1387699369: ('0.12824820751929258',), 1387699365: ('0.12824820751929258',), 1387699362: ('0.12824820751929258',), 1387699361: ('0.12824820751929258',), 27510448: ()} output_args : {27510448: [{'flou': 27510460, 'metal': 27510461, 'mal_croppe': 27510462, 'cartonnette': 27510463, 'kraft': 27510464, 'plastique': 27510466, 'environnement': 27510467, 'Carton_gris': 27510468, 'papier': 27510469, 'autre_refus': 27510470, 'Teint_Dans_La_Masse': 27510471, 'Carton_brun': 27510472}]} args : 27510448 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 :9, first value : ('0.12824820751929258',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27510448) 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 (1387699435,1387699432,1387699424,1387699423,1387699369,1387699365,1387699362,1387699361) Found this number of photos: 8 ##### Call download_photos : nb_thread : 5 begin to download photo : 1387699361 begin to download photo : 1387699365 begin to download photo : 1387699423 begin to download photo : 1387699432 download finish for photo 1387699423 begin to download photo : 1387699424 download finish for photo 1387699365 begin to download photo : 1387699369 download finish for photo 1387699432 begin to download photo : 1387699435 download finish for photo 1387699361 begin to download photo : 1387699362 download finish for photo 1387699424 download finish for photo 1387699369 download finish for photo 1387699362 download finish for photo 1387699435 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette275104601759540146/ imagette275104611759540146/ imagette275104621759540146/ length of list_filenames : 8 ; length of list_pids : 8 ; length of list_args : 8 results_Auto_P27510448_04-10-2025_03_09_06.pdf 27510460 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=27510460 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette275104601759540146 27510461 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=27510461 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette275104611759540146 27510462 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=27510462 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette275104621759540146 27510463 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=27510463 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1387699377: '1759540025_1344724_1387699289_086596d299614e09ebbffe938d319154_rle_crop_3986055510_0.png', 1387699378: '1759540025_1344724_1387699288_b51828e05715e664dbf84d3fda54bcd1_rle_crop_3986055525_0.png', 1387699379: '1759540025_1344724_1387699288_b51828e05715e664dbf84d3fda54bcd1_rle_crop_3986055531_0.png', 1387699380: '1759540025_1344724_1387699287_f877a12a755d0f9b604bd4b0f8895d80_rle_crop_3986055548_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/4/8e410c24a1fd3d8b6e9e8d565b93472d_23282303.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/4/0f18c89a251cc0bc370e6d3797c9604f_50129960.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/4/0de6a8da83a2a4e51e6828bd6ff80c9e_71589309.png change filename to text .imagette275104631759540146/ imagette275104631759540146/1759540025_1344724_1387699289_086596d299614e09ebbffe938d319154_rle_crop_3986055510_0.png.png imagette275104631759540146/1759540025_1344724_1387699287_f877a12a755d0f9b604bd4b0f8895d80_rle_crop_3986055548_0.png.png imagette275104631759540146/1759540025_1344724_1387699288_b51828e05715e664dbf84d3fda54bcd1_rle_crop_3986055531_0.png.png imagette275104631759540146/1759540025_1344724_1387699288_b51828e05715e664dbf84d3fda54bcd1_rle_crop_3986055525_0.png.png imagette275104641759540146/ wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/4/2a6c7339deeeb1f7c25b811d693c420a_49140457.png imagette275104631759540146 27510464 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=27510464 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette275104641759540146 27510466 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=27510466 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1387699381: '1759540025_1344724_1387699289_086596d299614e09ebbffe938d319154_rle_crop_3986055507_0.png'} change filename to text .imagette275104661759540146/ imagette275104661759540146/1759540025_1344724_1387699289_086596d299614e09ebbffe938d319154_rle_crop_3986055507_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/4/62cb3e7baba59c56d5ed230740be5073_42660731.png imagette275104661759540146 27510470 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=27510470 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1387699374: '1759540025_1344724_1387699287_f877a12a755d0f9b604bd4b0f8895d80_rle_crop_3986055542_0.png'} change filename to text .imagette275104701759540146/ imagette275104701759540146/1759540025_1344724_1387699287_f877a12a755d0f9b604bd4b0f8895d80_rle_crop_3986055542_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/4/74b61683bee61d5c1c8cd0658a27e458_50720219.png imagette275104701759540146 27510468 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=27510468 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1387699375: '1759540025_1344724_1387699289_086596d299614e09ebbffe938d319154_rle_crop_3986055500_0.png', 1387699376: '1759540025_1344724_1387699288_b51828e05715e664dbf84d3fda54bcd1_rle_crop_3986055518_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/4/63bf4a7cd864c099136422dfae3b81ab_740256.png change filename to text .imagette275104681759540147/ imagette275104681759540147/1759540025_1344724_1387699289_086596d299614e09ebbffe938d319154_rle_crop_3986055500_0.png.png imagette275104681759540147/1759540025_1344724_1387699288_b51828e05715e664dbf84d3fda54bcd1_rle_crop_3986055518_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/4/531bdfe16c0848c777b10bc3342a1058_9396011.png imagette275104681759540147 27510471 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=27510471 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1387699370: '1759540025_1344724_1387699289_086596d299614e09ebbffe938d319154_rle_crop_3986055509_0.png', 1387699371: '1759540025_1344724_1387699288_b51828e05715e664dbf84d3fda54bcd1_rle_crop_3986055532_0.png', 1387699372: '1759540025_1344724_1387699287_f877a12a755d0f9b604bd4b0f8895d80_rle_crop_3986055546_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/4/0baef1a0748abeaf2a7c49bb66a7cdc4_49149392.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/4/3322e90dad9407d1a5e777173540cb1c_82418698.png change filename to text .imagette275104711759540147/ imagette275104711759540147/1759540025_1344724_1387699287_f877a12a755d0f9b604bd4b0f8895d80_rle_crop_3986055546_0.png.png imagette275104711759540147/1759540025_1344724_1387699288_b51828e05715e664dbf84d3fda54bcd1_rle_crop_3986055532_0.png.png imagette275104711759540147/1759540025_1344724_1387699289_086596d299614e09ebbffe938d319154_rle_crop_3986055509_0.png.png imagette275104721759540147/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/4/0793b80022193d760b2cd6e7faba512e_64554489.png imagette275104711759540147 27510472 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=27510472 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette275104721759540147 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=27510448 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/27510474,27510475,27510476,27510477,27510478,27510479,27510480,27510481,27510482,27510483,27510484,27510485?tags=flou,metal,mal_croppe,cartonnette,kraft,plastique,environnement,Carton_gris,papier,autre_refus,Teint_Dans_La_Masse,Carton_brun your option no_mail is active, we will not send the real mail to your client args[1387699435] : ('0.12824820751929258',) no score found for photo 1387699435 We are sending mail with results at report@fotonower.com args[1387699432] : ('0.12824820751929258',) no score found for photo 1387699432 We are sending mail with results at report@fotonower.com args[1387699424] : ('0.12824820751929258',) no score found for photo 1387699424 We are sending mail with results at report@fotonower.com args[1387699423] : ('0.12824820751929258',) no score found for photo 1387699423 We are sending mail with results at report@fotonower.com args[1387699369] : ('0.12824820751929258',) no score found for photo 1387699369 We are sending mail with results at report@fotonower.com args[1387699365] : ('0.12824820751929258',) no score found for photo 1387699365 We are sending mail with results at report@fotonower.com args[1387699362] : ('0.12824820751929258',) no score found for photo 1387699362 We are sending mail with results at report@fotonower.com args[1387699361] : ('0.12824820751929258',) no score found for photo 1387699361 We are sending mail with results at report@fotonower.com refus_total : 0.12824820751929258 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=27510448 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_P27510448_04-10-2025_03_09_06.pdf results_Auto_P27510448_04-10-2025_03_09_06.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27510448_04-10-2025_03_09_06.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','27510448','results_Auto_P27510448_04-10-2025_03_09_06.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27510448_04-10-2025_03_09_06.pdf','pdf','','0.12','0.12824820751929258') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27510448]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1387699435, 1387699432, 1387699424, 1387699423, 1387699369, 1387699365, 1387699362, 1387699361] map_info['map_portfolio_photo'] : {27510448: [1387699435, 1387699432, 1387699424, 1387699423, 1387699369, 1387699365, 1387699362, 1387699361, 1387699334, 1387699332, 1387699329, 1387699328, 1387699326, 1387699321, 1387699318, 1387699309, 1387699307, 1387699304, 1387699303, 1387699291, 1387699289, 1387699288, 1387699287, 1387699199, 1387699189, 1387699185, 1387699182, 1387699180, 1387699138]} final : False mtd_id 4302 list_pids : [1387699435, 1387699432, 1387699424, 1387699423, 1387699369, 1387699365, 1387699362, 1387699361] 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, '3841937') ('4302', '27510448', '1387699435', None, None, None, None, None, '3841937') ('4302', None, None, None, None, None, None, None, '3841937') ('4302', '27510448', '1387699432', None, None, None, None, None, '3841937') ('4302', None, None, None, None, None, None, None, '3841937') ('4302', '27510448', '1387699424', None, None, None, None, None, '3841937') ('4302', None, None, None, None, None, None, None, '3841937') ('4302', '27510448', '1387699423', None, None, None, None, None, '3841937') ('4302', None, None, None, None, None, None, None, '3841937') ('4302', '27510448', '1387699369', None, None, None, None, None, '3841937') ('4302', None, None, None, None, None, None, None, '3841937') ('4302', '27510448', '1387699365', None, None, None, None, None, '3841937') ('4302', None, None, None, None, None, None, None, '3841937') ('4302', '27510448', '1387699362', None, None, None, None, None, '3841937') ('4302', None, None, None, None, None, None, None, '3841937') ('4302', '27510448', '1387699361', None, None, None, None, None, '3841937') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 8 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', '27510448', '1387699435', None, None, None, None, None, '3841937'), ('4302', '27510448', '1387699432', None, None, None, None, None, '3841937'), ('4302', '27510448', '1387699424', None, None, None, None, None, '3841937'), ('4302', '27510448', '1387699423', None, None, None, None, None, '3841937'), ('4302', '27510448', '1387699369', None, None, None, None, None, '3841937'), ('4302', '27510448', '1387699365', None, None, None, None, None, '3841937'), ('4302', '27510448', '1387699362', None, None, None, None, None, '3841937'), ('4302', '27510448', '1387699361', None, None, None, None, None, '3841937')] time used for this insertion : 0.03715395927429199 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.4786932468414307 time spend to save output : 0.03736162185668945 total time spend for step 4 : 2.51605486869812 step5:split_time_score Sat Oct 4 03:09:08 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 : ['27510448'] 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 : [('27510448',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27510448) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1387699423: {'path': 'temp/1759540146_239480_1387699423_774bdfb3d18f304ffcbad7eaa231e205.jpg', 'extension': 'jpg'}, 1387699424: {'path': 'temp/1759540146_239480_1387699424_60a833ee1334758f3a1f48b5be5bbf5b.jpg', 'extension': 'jpg'}, 1387699365: {'path': 'temp/1759540146_239480_1387699365_705aa4acb0296f70615c80d3d9db010f.jpg', 'extension': 'jpg'}, 1387699369: {'path': 'temp/1759540146_239480_1387699369_a888f0dea49eaf1fe00602f95218c6c9.jpg', 'extension': 'jpg'}, 1387699361: {'path': 'temp/1759540146_239480_1387699361_e878f49e91dd94bbb607d82660464583.jpg', 'extension': 'jpg'}, 1387699362: {'path': 'temp/1759540146_239480_1387699362_bff2e15d286b38548403fbf684ff6bb5.jpg', 'extension': 'jpg'}, 1387699432: {'path': 'temp/1759540146_239480_1387699432_20034d96a81aed8ff52307eb4e4f41a4.jpg', 'extension': 'jpg'}, 1387699435: {'path': 'temp/1759540146_239480_1387699435_693204da81c8e3d35157890ce7189af4.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 = 27510448; (('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 = 27510448 group by h (('03', 29),) 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=27510448 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 (27510448) 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 (27510448) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 04102025 27510448 Nombre de photos uploadées : 29 / 23040 (0%) 04102025 27510448 Nombre de photos taguées (types de déchets): 0 / 29 (0%) 04102025 27510448 Nombre de photos taguées (volume) : 0 / 29 (0%) [{'photo_id': 1387699138, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/4/2d80b274163e5b3cb01e79bc3ee9a3c1.jpg', 'username': None, 'uploaded_at': 1759539667, 'text': 'image_04102025_03_00_34_9130.jpg'}, {'photo_id': 1387699189, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/4/2c784c7eaa4234c253b2830016c9dd5c.jpg', 'username': None, 'uploaded_at': 1759539727, 'text': 'image_04102025_03_00_54_10137.jpg'}, {'photo_id': 1387699185, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/4/20883c9625c608f6aa6c0b1e610b90a8.jpg', 'username': None, 'uploaded_at': 1759539727, 'text': 'image_04102025_03_01_04_10155.jpg'}, {'photo_id': 1387699182, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/4/d48b6a8602398b8ea7c8dd356975e886.jpg', 'username': None, 'uploaded_at': 1759539727, 'text': 'image_04102025_03_01_24_10150.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.9073486328125e-06 elapsed_time : order_list_meta_photo_and_scores 6.4373016357421875e-06 ????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0013217926025390625 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 27510448, '2025-10-04' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2392991,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.6568808555603027 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= 2392991 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2392991, 'dashboard_run_id': 2401003, 'mtr_portfolio_id': 27508003, 'dashboard_result_id': 16020695, '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_P27508003_04-10-2025_00_47_05.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27508006, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27508007, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27508008, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27508009, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27508010, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27508011, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27508012, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27508013, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27508014, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27508015, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27508016, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27508017, 'pht': 3726}}"}, {'dashboat_entry_day': 2392991, 'dashboard_run_id': 2401003, 'mtr_portfolio_id': 27508107, 'dashboard_result_id': 16020696, '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_P27508107_04-10-2025_01_03_01.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27508109, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27508110, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27508111, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27508112, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27508113, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27508114, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27508115, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27508116, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27508117, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27508118, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27508119, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27508120, 'pht': 3726}}"}, {'dashboat_entry_day': 2392991, 'dashboard_run_id': 2401003, 'mtr_portfolio_id': 27508709, 'dashboard_result_id': 16020697, '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_P27508709_04-10-2025_01_49_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27508710, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27508711, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27508712, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27508713, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27508714, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27508715, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27508716, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27508717, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27508718, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27508719, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27508720, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27508721, 'pht': 3726}}"}, {'dashboat_entry_day': 2392991, 'dashboard_run_id': 2401003, 'mtr_portfolio_id': 27508967, 'dashboard_result_id': 16020698, '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_P27508967_04-10-2025_02_03_31.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27509017, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27509018, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27509019, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27509020, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27509021, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27509022, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27509023, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27509024, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27509025, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27509026, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27509027, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27509028, 'pht': 3726}}"}, {'dashboat_entry_day': 2392991, 'dashboard_run_id': 2401003, 'mtr_portfolio_id': 27509223, 'dashboard_result_id': 16020699, '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_P27509223_04-10-2025_02_21_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27509229, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27509230, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27509231, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27509232, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27509233, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27509234, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27509235, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27509236, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27509237, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27509238, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27509239, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27509240, 'pht': 3726}}"}, {'dashboat_entry_day': 2392991, 'dashboard_run_id': 2401003, 'mtr_portfolio_id': 27509631, 'dashboard_result_id': 16020700, '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_P27509631_04-10-2025_02_32_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27509636, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27509638, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27509639, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27509640, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27509641, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27509642, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27509643, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27509644, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27509645, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27509646, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27509647, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27509648, 'pht': 3726}}"}, {'dashboat_entry_day': 2392991, 'dashboard_run_id': 2401003, 'mtr_portfolio_id': 27509835, 'dashboard_result_id': 16020701, '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_P27509835_04-10-2025_02_49_02.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27509837, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27509838, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27509839, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27509840, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27509841, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27509842, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27509843, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27509844, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27509845, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27509846, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27509847, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27509848, 'pht': 3726}}"}, {'dashboat_entry_day': 2392991, 'dashboard_run_id': 2401003, 'mtr_portfolio_id': 27510106, 'dashboard_result_id': 16020702, '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_P27510106_04-10-2025_03_03_05.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27510107, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27510108, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27510109, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27510110, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27510111, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27510112, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27510113, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27510114, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27510115, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27510116, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27510117, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27510118, 'pht': 3726}}"}, {'dashboat_entry_day': 2392991, 'dashboard_run_id': 2401003, 'mtr_portfolio_id': 27510448, 'dashboard_result_id': 16020703, '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_P27510448_04-10-2025_03_07_05.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27510460, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27510461, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27510462, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27510463, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27510464, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27510466, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27510467, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27510468, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27510469, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27510470, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27510471, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27510472, '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 = 27508003 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': 3841122, 'mtr_portfolio_id': 27508003, 'created_at': datetime.datetime(2025, 10, 4, 0, 47, 5), 'result': '0.1130349992060495', 'result_long': None, 'result_double': None}] Qualite : 0.1130349992060495 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27508003 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27508003_04-10-2025_00_47_05.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27508003 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_P27508003_04-10-2025_00_47_05.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27508006, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27508007, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27508008, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27508009, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27508010, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27508011, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27508012, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27508013, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27508014, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27508015, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27508016, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27508017, 'pht': 3726}}" where mtr_portfolio_id = 27508003 and dashboard_run_id = 2401003 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`=27508003 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16020695, 0.1130349992060495, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27508003_04-10-2025_00_47_05.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27508006, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27508007, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27508008, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27508009, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27508010, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27508011, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27508012, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27508013, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27508014, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27508015, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27508016, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27508017, '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 = 27508107 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': 3841137, 'mtr_portfolio_id': 27508107, 'created_at': datetime.datetime(2025, 10, 4, 1, 3, 1), 'result': '0.08119551833816703', 'result_long': None, 'result_double': None}] Qualite : 0.08119551833816703 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27508107 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27508107_04-10-2025_01_03_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27508107 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_P27508107_04-10-2025_01_03_01.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27508109, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27508110, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27508111, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27508112, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27508113, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27508114, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27508115, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27508116, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27508117, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27508118, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27508119, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27508120, 'pht': 3726}}" where mtr_portfolio_id = 27508107 and dashboard_run_id = 2401003 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`=27508107 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16020696, 0.08119551833816703, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27508107_04-10-2025_01_03_01.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27508109, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27508110, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27508111, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27508112, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27508113, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27508114, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27508115, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27508116, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27508117, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27508118, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27508119, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27508120, '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 = 27508709 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': 3841301, 'mtr_portfolio_id': 27508709, 'created_at': datetime.datetime(2025, 10, 4, 1, 49), 'result': '0.07837718359882537', 'result_long': None, 'result_double': None}] Qualite : 0.07837718359882537 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27508709 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27508709_04-10-2025_01_49_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27508709 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_P27508709_04-10-2025_01_49_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27508710, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27508711, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27508712, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27508713, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27508714, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27508715, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27508716, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27508717, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27508718, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27508719, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27508720, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27508721, 'pht': 3726}}" where mtr_portfolio_id = 27508709 and dashboard_run_id = 2401003 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`=27508709 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16020697, 0.07837718359882537, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27508709_04-10-2025_01_49_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27508710, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27508711, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27508712, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27508713, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27508714, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27508715, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27508716, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27508717, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27508718, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27508719, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27508720, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27508721, '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 = 27508967 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': 3841372, 'mtr_portfolio_id': 27508967, 'created_at': datetime.datetime(2025, 10, 4, 2, 3, 30), 'result': '0.07641227620073816', 'result_long': None, 'result_double': None}] Qualite : 0.07641227620073816 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27508967 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27508967_04-10-2025_02_03_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27508967 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_P27508967_04-10-2025_02_03_31.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27509017, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27509018, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27509019, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27509020, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27509021, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27509022, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27509023, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27509024, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27509025, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27509026, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27509027, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27509028, 'pht': 3726}}" where mtr_portfolio_id = 27508967 and dashboard_run_id = 2401003 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`=27508967 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16020698, 0.07641227620073816, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27508967_04-10-2025_02_03_31.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27509017, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27509018, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27509019, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27509020, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27509021, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27509022, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27509023, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27509024, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27509025, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27509026, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27509027, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27509028, '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 = 27509223 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': 3841478, 'mtr_portfolio_id': 27509223, 'created_at': datetime.datetime(2025, 10, 4, 2, 21), 'result': '0.06771910362226782', 'result_long': None, 'result_double': None}] Qualite : 0.06771910362226782 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27509223 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27509223_04-10-2025_02_21_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27509223 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_P27509223_04-10-2025_02_21_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27509229, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27509230, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27509231, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27509232, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27509233, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27509234, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27509235, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27509236, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27509237, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27509238, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27509239, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27509240, 'pht': 3726}}" where mtr_portfolio_id = 27509223 and dashboard_run_id = 2401003 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`=27509223 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16020699, 0.06771910362226782, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27509223_04-10-2025_02_21_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27509229, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27509230, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27509231, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27509232, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27509233, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27509234, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27509235, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27509236, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27509237, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27509238, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27509239, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27509240, '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 = 27509631 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': 3841625, 'mtr_portfolio_id': 27509631, 'created_at': datetime.datetime(2025, 10, 4, 2, 32, 59), 'result': '0.09248229302826665', 'result_long': None, 'result_double': None}] Qualite : 0.09248229302826665 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27509631 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27509631_04-10-2025_02_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27509631 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_P27509631_04-10-2025_02_32_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27509636, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27509638, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27509639, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27509640, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27509641, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27509642, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27509643, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27509644, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27509645, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27509646, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27509647, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27509648, 'pht': 3726}}" where mtr_portfolio_id = 27509631 and dashboard_run_id = 2401001 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`=27509631 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16020700, 0.09248229302826665, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27509631_04-10-2025_02_32_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27509636, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27509638, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27509639, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27509640, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27509641, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27509642, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27509643, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27509644, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27509645, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27509646, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27509647, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27509648, '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 = 27509835 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': 3841692, 'mtr_portfolio_id': 27509835, 'created_at': datetime.datetime(2025, 10, 4, 2, 49, 2), 'result': '0.035018512195361805', 'result_long': None, 'result_double': None}] Qualite : 0.035018512195361805 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27509835 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27509835_04-10-2025_02_49_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27509835 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_P27509835_04-10-2025_02_49_02.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27509837, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27509838, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27509839, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27509840, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27509841, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27509842, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27509843, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27509844, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27509845, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27509846, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27509847, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27509848, 'pht': 3726}}" where mtr_portfolio_id = 27509835 and dashboard_run_id = 2401001 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`=27509835 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16020701, 0.035018512195361805, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27509835_04-10-2025_02_49_02.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27509837, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27509838, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27509839, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27509840, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27509841, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27509842, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27509843, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27509844, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27509845, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27509846, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27509847, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27509848, '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 = 27510106 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': 3841812, 'mtr_portfolio_id': 27510106, 'created_at': datetime.datetime(2025, 10, 4, 3, 3, 4), 'result': '0.07372556261966136', 'result_long': None, 'result_double': None}] Qualite : 0.07372556261966136 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27510106 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27510106_04-10-2025_03_03_05.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27510106 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_P27510106_04-10-2025_03_03_05.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27510107, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27510108, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27510109, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27510110, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27510111, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27510112, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27510113, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27510114, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27510115, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27510116, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27510117, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27510118, 'pht': 3726}}" where mtr_portfolio_id = 27510106 and dashboard_run_id = 2401001 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`=27510106 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16020702, 0.07372556261966136, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27510106_04-10-2025_03_03_05.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27510107, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27510108, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27510109, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27510110, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27510111, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27510112, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27510113, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27510114, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27510115, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27510116, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27510117, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27510118, '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 = 27510448 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': 3841937, 'mtr_portfolio_id': 27510448, 'created_at': datetime.datetime(2025, 10, 4, 3, 9, 5), 'result': '0.12824820751929258', 'result_long': None, 'result_double': None}] Qualite : 0.12824820751929258 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27510448 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27510448_04-10-2025_03_09_06.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27510448 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_P27510448_04-10-2025_03_09_06.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27510460, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27510461, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27510462, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27510463, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27510464, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27510466, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27510467, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27510468, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27510469, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27510470, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27510471, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27510472, 'pht': 3726}}" where mtr_portfolio_id = 27510448 and dashboard_run_id = 2401001 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`=27510448 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16020703, 0.12824820751929258, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27510448_04-10-2025_03_09_06.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27510460, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27510461, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27510462, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27510463, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27510464, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27510466, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27510467, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27510468, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27510469, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27510470, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27510471, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27510472, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27508003,27508107,27508709,27508967,27509223,27509631,27509835,27510106,27510448) result : ((1387694599,), (1387694612,), (1387694614,), (1387694615,), (1387694618,), (1387694622,), (1387694636,), (1387694638,), (1387694640,), (1387694643,), (1387694647,), (1387694770,), (1387694795,), (1387694790,), (1387694791,), (1387694792,), (1387694808,), (1387694810,), (1387694812,), (1387694815,), (1387694819,), (1387694821,), (1387694839,), (1387694840,), (1387694842,), (1387694846,), (1387694848,), (1387694863,), (1387694865,), (1387694866,), (1387694890,), (1387694892,), (1387694894,), (1387694896,), (1387694900,), (1387694910,), (1387694911,), (1387694913,), (1387694916,), (1387694919,), (1387694934,), (1387694942,), (1387694943,), (1387694944,), (1387694945,), (1387694946,), (1387694947,), (1387694949,), (1387694952,), (1387694955,), (1387694958,), (1387694967,), (1387694968,), (1387694969,), (1387694972,), (1387694997,), (1387694999,), (1387695001,), (1387695004,), (1387695015,), (1387695016,), (1387695018,), (1387695027,), (1387695034,), (1387695037,), (1387695042,), (1387695044,), (1387695045,), (1387695046,), (1387695047,), (1387695049,), (1387695052,), (1387695056,), (1387695061,), (1387695067,), (1387695068,), (1387695069,), (1387695071,), (1387695096,), (1387695097,), (1387695098,), (1387695101,), (1387695130,), (1387695133,), (1387695137,), (1387695140,), (1387695166,), (1387696692,), (1387696693,), (1387696705,), (1387696706,), (1387696708,), (1387696711,), (1387696721,), (1387696730,), (1387696731,), (1387696732,), (1387696734,), (1387696737,), (1387696740,), (1387696746,), (1387696747,), (1387696748,), (1387696749,), (1387696750,), (1387696751,), (1387696754,), (1387696758,), (1387696768,), (1387696770,), (1387696772,), (1387696800,), (1387696801,), (1387696802,), (1387696805,), (1387696808,), (1387696822,), (1387696823,), (1387696824,), (1387696826,), (1387696829,), (1387696853,), (1387696854,), (1387696856,), (1387696859,), (1387696862,), (1387696870,), (1387696871,), (1387696872,), (1387696874,), (1387696876,), (1387696899,), (1387696901,), (1387696903,), (1387696937,), (1387696941,), (1387696943,), (1387696946,), (1387696949,), (1387696959,), (1387696965,), (1387696967,), (1387696968,), (1387696971,), (1387696975,), (1387696986,), (1387696988,), (1387696992,), (1387696996,), (1387696999,), (1387697013,), (1387697019,), (1387697020,), (1387697033,), (1387697021,), (1387697024,), (1387697028,), (1387697031,), (1387697040,), (1387697042,), (1387697046,), (1387697058,), (1387697063,), (1387697110,), (1387697112,), (1387697116,), (1387697119,), (1387697122,), (1387697132,), (1387697133,), (1387697135,), (1387697157,), (1387697158,), (1387697159,), (1387697161,), (1387697164,), (1387697175,), (1387697176,), (1387697177,), (1387697181,), (1387697203,), (1387697204,), (1387697207,), (1387697210,), (1387697229,), (1387697248,), (1387697249,), (1387697273,), (1387697274,), (1387697276,), (1387697279,), (1387697283,), (1387697297,), (1387697298,), (1387697300,), (1387697305,), (1387697313,), (1387697315,), (1387697319,), (1387697320,), (1387697321,), (1387697322,), (1387697327,), (1387697331,), (1387697334,), (1387697342,), (1387697343,), (1387697344,), (1387697346,), (1387697349,), (1387697364,), (1387697414,), (1387697418,), (1387697420,), (1387697424,), (1387697427,), (1387697435,), (1387697438,), (1387697441,), (1387697444,), (1387697448,), (1387697451,), (1387697457,), (1387697459,), (1387697461,), (1387697519,), (1387697467,), (1387697500,), (1387697510,), (1387697515,), (1387697570,), (1387697571,), (1387697572,), (1387697574,), (1387697581,), (1387697654,), (1387697701,), (1387697969,), (1387697967,), (1387697986,), (1387697988,), (1387698005,), (1387698006,), (1387698009,), (1387698013,), (1387698017,), (1387698027,), (1387698029,), (1387698031,), (1387698045,), (1387698047,), (1387698049,), (1387698053,), (1387698057,), (1387698077,), (1387698082,), (1387698091,), (1387698096,), (1387698101,), (1387698102,), (1387698105,), (1387698106,), (1387698107,), (1387698114,), (1387698117,), (1387698123,), (1387698124,), (1387698128,), (1387698131,), (1387698137,), (1387698148,), (1387698167,), (1387698169,), (1387698170,), (1387698173,), (1387698177,), (1387698194,), (1387698195,), (1387698196,), (1387698200,), (1387698228,), (1387698230,), (1387698266,), (1387698260,), (1387698262,), (1387698263,), (1387698282,), (1387698283,), (1387698285,), (1387698290,), (1387698293,), (1387698296,), (1387698303,), (1387698304,), (1387698306,), (1387698308,), (1387698311,), (1387698330,), (1387698331,), (1387698332,), (1387698334,), (1387698344,), (1387698345,), (1387698347,), (1387698350,), (1387698358,), (1387698361,), (1387698363,), (1387698364,), (1387698365,), (1387698366,), (1387698368,), (1387698371,), (1387698375,), (1387698379,), (1387698389,), (1387698390,), (1387698391,), (1387698444,), (1387698445,), (1387698465,), (1387698467,), (1387698470,), (1387698474,), (1387698477,), (1387698486,), (1387698489,), (1387698493,), (1387698498,), (1387698504,), (1387698509,), (1387698510,), (1387698512,), (1387698515,), (1387698533,), (1387698534,), (1387698535,), (1387698537,), (1387698580,), (1387698581,), (1387698582,), (1387698607,), (1387698608,), (1387698609,), (1387698612,), (1387698616,), (1387698628,), (1387698629,), (1387698631,), (1387698634,), (1387698644,), (1387698647,), (1387698652,), (1387698653,), (1387698654,), (1387698655,), (1387698656,), (1387698668,), (1387698660,), (1387698662,), (1387698665,), (1387698677,), (1387698678,), (1387698682,), (1387698684,), (1387698687,), (1387698690,), (1387698731,), (1387698732,), (1387698733,), (1387698735,), (1387698748,), (1387698749,), (1387698755,), (1387698794,), (1387698795,), (1387698796,), (1387698798,), (1387698815,), (1387698817,), (1387698818,), (1387698821,), (1387698849,), (1387698850,), (1387698852,), (1387698856,), (1387698864,), (1387698872,), (1387698896,), (1387698898,), (1387698900,), (1387698903,), (1387698906,), (1387698928,), (1387698929,), (1387698930,), (1387698951,), (1387698953,), (1387698958,), (1387698961,), (1387698971,), (1387698975,), (1387698979,), (1387698981,), (1387698983,), (1387698987,), (1387698989,), (1387698991,), (1387698995,), (1387698998,), (1387699009,), (1387699010,), (1387699011,), (1387699014,), (1387699044,), (1387699046,), (1387699048,), (1387699051,), (1387699054,), (1387699089,), (1387699090,), (1387699093,), (1387699097,), (1387699108,), (1387699109,), (1387699112,), (1387699113,), (1387699115,), (1387699117,), (1387699145,), (1387699138,), (1387699180,), (1387699182,), (1387699185,), (1387699189,), (1387699199,), (1387699287,), (1387699288,), (1387699289,), (1387699291,), (1387699303,), (1387699304,), (1387699307,), (1387699309,), (1387699318,), (1387699321,), (1387699326,), (1387699328,), (1387699329,), (1387699332,), (1387699334,), (1387699361,), (1387699362,), (1387699365,), (1387699369,), (1387699423,), (1387699424,), (1387699432,), (1387699435,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'04102025': {'nb_upload': 29, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27510448]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1387699435, 1387699432, 1387699424, 1387699423, 1387699369, 1387699365, 1387699362, 1387699361] map_info['map_portfolio_photo'] : {27510448: [1387699435, 1387699432, 1387699424, 1387699423, 1387699369, 1387699365, 1387699362, 1387699361, 1387699334, 1387699332, 1387699329, 1387699328, 1387699326, 1387699321, 1387699318, 1387699309, 1387699307, 1387699304, 1387699303, 1387699291, 1387699289, 1387699288, 1387699287, 1387699199, 1387699189, 1387699185, 1387699182, 1387699180, 1387699138]} final : True mtd_id 4302 list_pids : [1387699435, 1387699432, 1387699424, 1387699423, 1387699369, 1387699365, 1387699362, 1387699361] Looping around the photos to save general results len do output : 1 /27510448Didn'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, '3841937') ('4302', '27510448', '1387699435', None, None, None, None, None, '3841937') ('4302', None, None, None, None, None, None, None, '3841937') ('4302', '27510448', '1387699432', None, None, None, None, None, '3841937') ('4302', None, None, None, None, None, None, None, '3841937') ('4302', '27510448', '1387699424', None, None, None, None, None, '3841937') ('4302', None, None, None, None, None, None, None, '3841937') ('4302', '27510448', '1387699423', None, None, None, None, None, '3841937') ('4302', None, None, None, None, None, None, None, '3841937') ('4302', '27510448', '1387699369', None, None, None, None, None, '3841937') ('4302', None, None, None, None, None, None, None, '3841937') ('4302', '27510448', '1387699365', None, None, None, None, None, '3841937') ('4302', None, None, None, None, None, None, None, '3841937') ('4302', '27510448', '1387699362', None, None, None, None, None, '3841937') ('4302', None, None, None, None, None, None, None, '3841937') ('4302', '27510448', '1387699361', None, None, None, None, None, '3841937') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 9 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, '27510448', 'None', None, None, None, None, '3841937'), ('4302', '27510448', '1387699435', None, None, None, None, None, '3841937'), ('4302', '27510448', '1387699432', None, None, None, None, None, '3841937'), ('4302', '27510448', '1387699424', None, None, None, None, None, '3841937'), ('4302', '27510448', '1387699423', None, None, None, None, None, '3841937'), ('4302', '27510448', '1387699369', None, None, None, None, None, '3841937'), ('4302', '27510448', '1387699365', None, None, None, None, None, '3841937'), ('4302', '27510448', '1387699362', None, None, None, None, None, '3841937'), ('4302', '27510448', '1387699361', None, None, None, None, None, '3841937')] time used for this insertion : 0.036701202392578125 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.848923444747925 time spend to save output : 0.03690958023071289 total time spend for step 5 : 2.8858330249786377 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 (3841937) 1.95user 2.69system 0:15.23elapsed 30%CPU (0avgtext+0avgdata 160608maxresident)k 224inputs+7032outputs (2major+64140minor)pagefaults 0swaps