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 : 2835188 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 (3366149) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3366149) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25386460 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3366149'] with mtr_portfolio_ids : ['25386460'] and first list_photo_ids : [] new path : /proc/2835188/ Name: python3 Umask: 0002 State: R (running) Tgid: 2835188 Ngid: 0 Pid: 2835188 PPid: 2835187 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 2835188 NSpid: 2835188 NSpgid: 2833002 NSsid: 2833002 VmPeak: 1106884 kB VmSize: 1106884 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99456 kB VmRSS: 99456 kB RssAnon: 59824 kB RssFile: 39632 kB RssShmem: 0 kB VmData: 865636 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: 56 nonvoluntary_ctxt_switches: 98 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '2835188', 'Ngid': '0', 'Pid': '2835188', 'PPid': '2835187', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '2835188', 'NSpid': '2835188', 'NSpgid': '2833002', 'NSsid': '2833002', 'VmPeak': '1106884 kB', 'VmSize': '1106884 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99456 kB', 'VmRSS': '99456 kB', 'RssAnon': '59824 kB', 'RssFile': '39632 kB', 'RssShmem': '0 kB', 'VmData': '865636 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': '56', 'nonvoluntary_ctxt_switches': '98'} ('datou_batch_current', '2835188', '1106884', '0', '1106884', '865636', '99456', b'', 'marlene', '3366149') 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 ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (25386460) 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 (3366149 ) ) 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 (25386460) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1374091607, 'portfolio_id': 25386460}, {'photo_id': 1374091601, 'portfolio_id': 25386460}, {'photo_id': 1374091594, 'portfolio_id': 25386460}, {'photo_id': 1374091589, 'portfolio_id': 25386460}, {'photo_id': 1374091587, 'portfolio_id': 25386460}, {'photo_id': 1374091585, 'portfolio_id': 25386460}, {'photo_id': 1374091578, 'portfolio_id': 25386460}, {'photo_id': 1374091576, 'portfolio_id': 25386460}, {'photo_id': 1374091575, 'portfolio_id': 25386460}, {'photo_id': 1374091573, 'portfolio_id': 25386460}, {'photo_id': 1374091569, 'portfolio_id': 25386460}, {'photo_id': 1374091564, 'portfolio_id': 25386460}, {'photo_id': 1374091552, 'portfolio_id': 25386460}, {'photo_id': 1374091543, 'portfolio_id': 25386460}, {'photo_id': 1374091534, 'portfolio_id': 25386460}, {'photo_id': 1374091527, 'portfolio_id': 25386460}, {'photo_id': 1374091526, 'portfolio_id': 25386460}, {'photo_id': 1374091525, 'portfolio_id': 25386460}, {'photo_id': 1374091505, 'portfolio_id': 25386460}, {'photo_id': 1374091503, 'portfolio_id': 25386460}, {'photo_id': 1374091502, 'portfolio_id': 25386460}, {'photo_id': 1374091495, 'portfolio_id': 25386460}, {'photo_id': 1374091489, 'portfolio_id': 25386460}, {'photo_id': 1374091488, 'portfolio_id': 25386460}] map_portfolio_id_photo_id: {25386460: [1374091607, 1374091601, 1374091594, 1374091589, 1374091587, 1374091585, 1374091578, 1374091576, 1374091575, 1374091573, 1374091569, 1374091564, 1374091552, 1374091543, 1374091534, 1374091527, 1374091526, 1374091525, 1374091505, 1374091503, 1374091502, 1374091495, 1374091489, 1374091488]} ##### 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.01508021354675293 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Mon Jul 28 06:20:56 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 (25386460) 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 : 25386460 get user id for portfolio 25386460 get sub ptf for main ptf 25386460, type 3726 and hashtags ['kraft', 'Carton_gris', 'autre_refus', 'cartonnette', 'papier', 'metal', 'Teint_Dans_La_Masse', 'environnement', 'flou', 'mal_croppe', 'plastique', 'Carton_brun'] 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`=25386460 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','Carton_gris','autre_refus','cartonnette','papier','metal','Teint_Dans_La_Masse','environnement','flou','mal_croppe','plastique','Carton_brun')) 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`=25386460 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','Carton_gris','autre_refus','cartonnette','papier','metal','Teint_Dans_La_Masse','environnement','flou','mal_croppe','plastique','Carton_brun')) AND mptpi.`min_score`=0.5 To do returned map {'flou': {'main_port_id': 25386460, 'sub_port_id': 25386506, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17122978, 'last_updated_at': datetime.datetime(2025, 7, 28, 6, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 28, 6, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 28, 6, 17, 29)}, 'Carton_gris': {'main_port_id': 25386460, 'sub_port_id': 25386507, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17122979, 'last_updated_at': datetime.datetime(2025, 7, 28, 6, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 28, 6, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 28, 6, 17, 29)}, 'Carton_brun': {'main_port_id': 25386460, 'sub_port_id': 25386508, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17122980, 'last_updated_at': datetime.datetime(2025, 7, 28, 6, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 28, 6, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 28, 6, 17, 29)}, 'metal': {'main_port_id': 25386460, 'sub_port_id': 25386509, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17122981, 'last_updated_at': datetime.datetime(2025, 7, 28, 6, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 28, 6, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 28, 6, 17, 29)}, 'Teint_Dans_La_Masse': {'main_port_id': 25386460, 'sub_port_id': 25386510, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17122982, 'last_updated_at': datetime.datetime(2025, 7, 28, 6, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 28, 6, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 28, 6, 17, 29)}, 'plastique': {'main_port_id': 25386460, 'sub_port_id': 25386511, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17122983, 'last_updated_at': datetime.datetime(2025, 7, 28, 6, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 28, 6, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 28, 6, 17, 29)}, 'cartonnette': {'main_port_id': 25386460, 'sub_port_id': 25386512, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17122984, 'last_updated_at': datetime.datetime(2025, 7, 28, 6, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 28, 6, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 28, 6, 17, 29)}, 'kraft': {'main_port_id': 25386460, 'sub_port_id': 25386513, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17122985, 'last_updated_at': datetime.datetime(2025, 7, 28, 6, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 28, 6, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 28, 6, 17, 29)}, 'environnement': {'main_port_id': 25386460, 'sub_port_id': 25386514, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17122986, 'last_updated_at': datetime.datetime(2025, 7, 28, 6, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 28, 6, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 28, 6, 17, 29)}, 'mal_croppe': {'main_port_id': 25386460, 'sub_port_id': 25386515, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17122987, 'last_updated_at': datetime.datetime(2025, 7, 28, 6, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 28, 6, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 28, 6, 17, 29)}, 'papier': {'main_port_id': 25386460, 'sub_port_id': 25386516, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17122988, 'last_updated_at': datetime.datetime(2025, 7, 28, 6, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 28, 6, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 28, 6, 17, 29)}, 'autre_refus': {'main_port_id': 25386460, 'sub_port_id': 25386517, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17122989, 'last_updated_at': datetime.datetime(2025, 7, 28, 6, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 28, 6, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 28, 6, 17, 29)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25386506 , 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=25386460 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 (25386506) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25386460) result : ((1374091488,), (1374091489,), (1374091495,), (1374091502,), (1374091503,), (1374091505,), (1374091525,), (1374091526,), (1374091527,), (1374091534,), (1374091543,), (1374091552,), (1374091564,), (1374091569,), (1374091573,), (1374091575,), (1374091576,), (1374091578,), (1374091585,), (1374091587,), (1374091589,), (1374091594,), (1374091601,), (1374091607,)) 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 25386507 , 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=25386460 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 (25386507) result : ((1374091624,), (1374091625,), (1374091626,), (1374091627,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25386460) result : ((1374091488,), (1374091489,), (1374091495,), (1374091502,), (1374091503,), (1374091505,), (1374091525,), (1374091526,), (1374091527,), (1374091534,), (1374091543,), (1374091552,), (1374091564,), (1374091569,), (1374091573,), (1374091575,), (1374091576,), (1374091578,), (1374091585,), (1374091587,), (1374091589,), (1374091594,), (1374091601,), (1374091607,)) 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 25386508 , 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=25386460 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 (25386508) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25386460) result : ((1374091488,), (1374091489,), (1374091495,), (1374091502,), (1374091503,), (1374091505,), (1374091525,), (1374091526,), (1374091527,), (1374091534,), (1374091543,), (1374091552,), (1374091564,), (1374091569,), (1374091573,), (1374091575,), (1374091576,), (1374091578,), (1374091585,), (1374091587,), (1374091589,), (1374091594,), (1374091601,), (1374091607,)) 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 25386509 , 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=25386460 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 (25386509) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25386460) result : ((1374091488,), (1374091489,), (1374091495,), (1374091502,), (1374091503,), (1374091505,), (1374091525,), (1374091526,), (1374091527,), (1374091534,), (1374091543,), (1374091552,), (1374091564,), (1374091569,), (1374091573,), (1374091575,), (1374091576,), (1374091578,), (1374091585,), (1374091587,), (1374091589,), (1374091594,), (1374091601,), (1374091607,)) 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 25386510 , 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=25386460 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 (25386510) result : ((1374091620,), (1374091621,), (1374091622,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25386460) result : ((1374091488,), (1374091489,), (1374091495,), (1374091502,), (1374091503,), (1374091505,), (1374091525,), (1374091526,), (1374091527,), (1374091534,), (1374091543,), (1374091552,), (1374091564,), (1374091569,), (1374091573,), (1374091575,), (1374091576,), (1374091578,), (1374091585,), (1374091587,), (1374091589,), (1374091594,), (1374091601,), (1374091607,)) 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 25386511 , 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=25386460 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 (25386511) result : ((1374091631,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25386460) result : ((1374091488,), (1374091489,), (1374091495,), (1374091502,), (1374091503,), (1374091505,), (1374091525,), (1374091526,), (1374091527,), (1374091534,), (1374091543,), (1374091552,), (1374091564,), (1374091569,), (1374091573,), (1374091575,), (1374091576,), (1374091578,), (1374091585,), (1374091587,), (1374091589,), (1374091594,), (1374091601,), (1374091607,)) 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 25386512 , 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=25386460 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 (25386512) result : ((1374091629,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25386460) result : ((1374091488,), (1374091489,), (1374091495,), (1374091502,), (1374091503,), (1374091505,), (1374091525,), (1374091526,), (1374091527,), (1374091534,), (1374091543,), (1374091552,), (1374091564,), (1374091569,), (1374091573,), (1374091575,), (1374091576,), (1374091578,), (1374091585,), (1374091587,), (1374091589,), (1374091594,), (1374091601,), (1374091607,)) 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 25386513 , 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=25386460 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 (25386513) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25386460) result : ((1374091488,), (1374091489,), (1374091495,), (1374091502,), (1374091503,), (1374091505,), (1374091525,), (1374091526,), (1374091527,), (1374091534,), (1374091543,), (1374091552,), (1374091564,), (1374091569,), (1374091573,), (1374091575,), (1374091576,), (1374091578,), (1374091585,), (1374091587,), (1374091589,), (1374091594,), (1374091601,), (1374091607,)) 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 25386514 , 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=25386460 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 (25386514) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25386460) result : ((1374091488,), (1374091489,), (1374091495,), (1374091502,), (1374091503,), (1374091505,), (1374091525,), (1374091526,), (1374091527,), (1374091534,), (1374091543,), (1374091552,), (1374091564,), (1374091569,), (1374091573,), (1374091575,), (1374091576,), (1374091578,), (1374091585,), (1374091587,), (1374091589,), (1374091594,), (1374091601,), (1374091607,)) 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 25386515 , 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=25386460 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 (25386515) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25386460) result : ((1374091488,), (1374091489,), (1374091495,), (1374091502,), (1374091503,), (1374091505,), (1374091525,), (1374091526,), (1374091527,), (1374091534,), (1374091543,), (1374091552,), (1374091564,), (1374091569,), (1374091573,), (1374091575,), (1374091576,), (1374091578,), (1374091585,), (1374091587,), (1374091589,), (1374091594,), (1374091601,), (1374091607,)) 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 25386516 , 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=25386460 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 (25386516) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25386460) result : ((1374091488,), (1374091489,), (1374091495,), (1374091502,), (1374091503,), (1374091505,), (1374091525,), (1374091526,), (1374091527,), (1374091534,), (1374091543,), (1374091552,), (1374091564,), (1374091569,), (1374091573,), (1374091575,), (1374091576,), (1374091578,), (1374091585,), (1374091587,), (1374091589,), (1374091594,), (1374091601,), (1374091607,)) 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 25386517 , 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=25386460 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 (25386517) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25386460) result : ((1374091488,), (1374091489,), (1374091495,), (1374091502,), (1374091503,), (1374091505,), (1374091525,), (1374091526,), (1374091527,), (1374091534,), (1374091543,), (1374091552,), (1374091564,), (1374091569,), (1374091573,), (1374091575,), (1374091576,), (1374091578,), (1374091585,), (1374091587,), (1374091589,), (1374091594,), (1374091601,), (1374091607,)) 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`=25386460 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','Carton_gris','autre_refus','cartonnette','papier','metal','Teint_Dans_La_Masse','environnement','flou','mal_croppe','plastique','Carton_brun')) 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`=25386460 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','Carton_gris','autre_refus','cartonnette','papier','metal','Teint_Dans_La_Masse','environnement','flou','mal_croppe','plastique','Carton_brun')) AND mptpi.`min_score`=0.5 To do returned map {'flou': {'main_port_id': 25386460, 'sub_port_id': 25386531, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17123002, 'last_updated_at': datetime.datetime(2025, 7, 28, 6, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 7, 28, 6, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 7, 28, 6, 17, 31)}, 'Carton_gris': {'main_port_id': 25386460, 'sub_port_id': 25386532, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17123003, 'last_updated_at': datetime.datetime(2025, 7, 28, 6, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 7, 28, 6, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 7, 28, 6, 17, 31)}, 'Carton_brun': {'main_port_id': 25386460, 'sub_port_id': 25386533, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17123004, 'last_updated_at': datetime.datetime(2025, 7, 28, 6, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 7, 28, 6, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 7, 28, 6, 17, 31)}, 'metal': {'main_port_id': 25386460, 'sub_port_id': 25386534, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17123005, 'last_updated_at': datetime.datetime(2025, 7, 28, 6, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 7, 28, 6, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 7, 28, 6, 17, 31)}, 'Teint_Dans_La_Masse': {'main_port_id': 25386460, 'sub_port_id': 25386535, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17123006, 'last_updated_at': datetime.datetime(2025, 7, 28, 6, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 7, 28, 6, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 7, 28, 6, 17, 31)}, 'plastique': {'main_port_id': 25386460, 'sub_port_id': 25386536, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17123007, 'last_updated_at': datetime.datetime(2025, 7, 28, 6, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 7, 28, 6, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 7, 28, 6, 17, 31)}, 'cartonnette': {'main_port_id': 25386460, 'sub_port_id': 25386537, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17123008, 'last_updated_at': datetime.datetime(2025, 7, 28, 6, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 7, 28, 6, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 7, 28, 6, 17, 31)}, 'kraft': {'main_port_id': 25386460, 'sub_port_id': 25386538, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17123009, 'last_updated_at': datetime.datetime(2025, 7, 28, 6, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 7, 28, 6, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 7, 28, 6, 17, 31)}, 'environnement': {'main_port_id': 25386460, 'sub_port_id': 25386539, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17123010, 'last_updated_at': datetime.datetime(2025, 7, 28, 6, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 7, 28, 6, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 7, 28, 6, 17, 31)}, 'mal_croppe': {'main_port_id': 25386460, 'sub_port_id': 25386540, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17123011, 'last_updated_at': datetime.datetime(2025, 7, 28, 6, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 7, 28, 6, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 7, 28, 6, 17, 31)}, 'papier': {'main_port_id': 25386460, 'sub_port_id': 25386541, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17123012, 'last_updated_at': datetime.datetime(2025, 7, 28, 6, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 7, 28, 6, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 7, 28, 6, 17, 31)}, 'autre_refus': {'main_port_id': 25386460, 'sub_port_id': 25386542, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17123013, 'last_updated_at': datetime.datetime(2025, 7, 28, 6, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 28, 6, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 28, 6, 17, 31)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25386531,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25386506 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25386532,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25386507 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25386533,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25386508 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25386534,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25386509 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25386535,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25386510 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25386536,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25386511 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25386537,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25386512 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25386538,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25386513 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25386539,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25386514 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25386540,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25386515 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25386541,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25386516 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25386542,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25386517 lien utilise dans velours : https://www.fotonower.com/velours/25386531,25386532,25386533,25386534,25386535,25386536,25386537,25386538,25386539,25386540,25386541,25386542?tags=flou,Carton_gris,Carton_brun,metal,Teint_Dans_La_Masse,plastique,cartonnette,kraft,environnement,mal_croppe,papier,autre_refus After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25386460]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1374091607, 1374091601, 1374091594, 1374091589, 1374091587, 1374091585, 1374091578, 1374091576, 1374091575, 1374091573, 1374091569, 1374091564] map_info['map_portfolio_photo'] : {25386460: [1374091607, 1374091601, 1374091594, 1374091589, 1374091587, 1374091585, 1374091578, 1374091576, 1374091575, 1374091573, 1374091569, 1374091564, 1374091552, 1374091543, 1374091534, 1374091527, 1374091526, 1374091525, 1374091505, 1374091503, 1374091502, 1374091495, 1374091489, 1374091488]} final : False mtd_id 4302 list_pids : [1374091607, 1374091601, 1374091594, 1374091589, 1374091587, 1374091585, 1374091578, 1374091576, 1374091575, 1374091573, 1374091569, 1374091564] Looping around the photos to save general results len do output : 1 /25386460. 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, '3366149') ('4302', '25386460', '1374091607', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091601', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091594', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091589', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091587', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091585', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091578', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091576', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091575', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091573', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091569', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091564', None, None, None, None, None, '3366149') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 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, '25386460', "{'flou': 25386506, 'Carton_gris': 25386507, 'Carton_brun': 25386508, 'metal': 25386509, 'Teint_Dans_La_Masse': 25386510, 'plastique': 25386511, 'cartonnette': 25386512, 'kraft': 25386513, 'environnement': 25386514, 'mal_croppe': 25386515, 'papier': 25386516, 'autre_refus': 25386517}", None, None, None, None, '3366149'), ('4302', '25386460', '1374091607', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091601', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091594', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091589', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091587', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091585', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091578', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091576', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091575', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091573', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091569', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091564', None, None, None, None, None, '3366149')] time used for this insertion : 0.016720294952392578 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.6237845420837402 time spend to save output : 0.01701045036315918 total time spend for step 1 : 1.6407949924468994 step2:final Mon Jul 28 06:20:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25386460) 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 25386460 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1374091505,1374091503,1374091502,1374091495,1374091489,1374091488,1374091552,1374091543,1374091534,1374091527,1374091526,1374091525,1374091578,1374091576,1374091575,1374091573,1374091569,1374091564,1374091607,1374091601,1374091594,1374091589,1374091587,1374091585); 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([25386460]) Inside saveOutput : final : False verbose : True original output for save of step final : {1374091607: ('0.032277262701206386',), 1374091601: ('0.032277262701206386',), 1374091594: ('0.032277262701206386',), 1374091589: ('0.032277262701206386',), 1374091587: ('0.032277262701206386',), 1374091585: ('0.032277262701206386',), 1374091578: ('0.032277262701206386',), 1374091576: ('0.032277262701206386',), 1374091575: ('0.032277262701206386',), 1374091573: ('0.032277262701206386',), 1374091569: ('0.032277262701206386',), 1374091564: ('0.032277262701206386',)} new output for save of step final : {1374091607: ('0.032277262701206386',), 1374091601: ('0.032277262701206386',), 1374091594: ('0.032277262701206386',), 1374091589: ('0.032277262701206386',), 1374091587: ('0.032277262701206386',), 1374091585: ('0.032277262701206386',), 1374091578: ('0.032277262701206386',), 1374091576: ('0.032277262701206386',), 1374091575: ('0.032277262701206386',), 1374091573: ('0.032277262701206386',), 1374091569: ('0.032277262701206386',), 1374091564: ('0.032277262701206386',)} [1374091607, 1374091601, 1374091594, 1374091589, 1374091587, 1374091585, 1374091578, 1374091576, 1374091575, 1374091573, 1374091569, 1374091564] map_info['map_portfolio_photo'] : {25386460: [1374091607, 1374091601, 1374091594, 1374091589, 1374091587, 1374091585, 1374091578, 1374091576, 1374091575, 1374091573, 1374091569, 1374091564, 1374091552, 1374091543, 1374091534, 1374091527, 1374091526, 1374091525, 1374091505, 1374091503, 1374091502, 1374091495, 1374091489, 1374091488]} final : False mtd_id 4302 list_pids : [1374091607, 1374091601, 1374091594, 1374091589, 1374091587, 1374091585, 1374091578, 1374091576, 1374091575, 1374091573, 1374091569, 1374091564] Looping around the photos to save general results len do output : 12 /1374091607.Didn't retrieve data . /1374091601.Didn't retrieve data . /1374091594.Didn't retrieve data . /1374091589.Didn't retrieve data . /1374091587.Didn't retrieve data . /1374091585.Didn't retrieve data . /1374091578.Didn't retrieve data . /1374091576.Didn't retrieve data . /1374091575.Didn't retrieve data . /1374091573.Didn't retrieve data . /1374091569.Didn't retrieve data . /1374091564.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, '3366149') ('4302', '25386460', '1374091607', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091601', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091594', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091589', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091587', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091585', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091578', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091576', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091575', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091573', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091569', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091564', None, None, None, None, None, '3366149') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 36 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', '25386460', '1374091607', '0.032277262701206386', None, None, None, None, '3366149'), ('4302', '25386460', '1374091601', '0.032277262701206386', None, None, None, None, '3366149'), ('4302', '25386460', '1374091594', '0.032277262701206386', None, None, None, None, '3366149'), ('4302', '25386460', '1374091589', '0.032277262701206386', None, None, None, None, '3366149'), ('4302', '25386460', '1374091587', '0.032277262701206386', None, None, None, None, '3366149'), ('4302', '25386460', '1374091585', '0.032277262701206386', None, None, None, None, '3366149'), ('4302', '25386460', '1374091578', '0.032277262701206386', None, None, None, None, '3366149'), ('4302', '25386460', '1374091576', '0.032277262701206386', None, None, None, None, '3366149'), ('4302', '25386460', '1374091575', '0.032277262701206386', None, None, None, None, '3366149'), ('4302', '25386460', '1374091573', '0.032277262701206386', None, None, None, None, '3366149'), ('4302', '25386460', '1374091569', '0.032277262701206386', None, None, None, None, '3366149'), ('4302', '25386460', '1374091564', '0.032277262701206386', None, None, None, None, '3366149')] time used for this insertion : 0.016335248947143555 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.0627450942993164 time spend to save output : 0.016923189163208008 total time spend for step 2 : 0.07966828346252441 step3:velours_tree Mon Jul 28 06:20:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {25386460: [{'flou': 25386506, 'Carton_gris': 25386507, 'Carton_brun': 25386508, 'metal': 25386509, 'Teint_Dans_La_Masse': 25386510, 'plastique': 25386511, 'cartonnette': 25386512, 'kraft': 25386513, 'environnement': 25386514, 'mal_croppe': 25386515, 'papier': 25386516, 'autre_refus': 25386517}]} input_args_next_step : {25386460: ()} output_args : {25386460: [{'flou': 25386506, 'Carton_gris': 25386507, 'Carton_brun': 25386508, 'metal': 25386509, 'Teint_Dans_La_Masse': 25386510, 'plastique': 25386511, 'cartonnette': 25386512, 'kraft': 25386513, 'environnement': 25386514, 'mal_croppe': 25386515, 'papier': 25386516, 'autre_refus': 25386517}]} args : 25386460 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': 25386506, 'Carton_gris': 25386507, 'Carton_brun': 25386508, 'metal': 25386509, 'Teint_Dans_La_Masse': 25386510, 'plastique': 25386511, 'cartonnette': 25386512, 'kraft': 25386513, 'environnement': 25386514, 'mal_croppe': 25386515, 'papier': 25386516, 'autre_refus': 25386517},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25386460) 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([25386460]) 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.3106727600097656 time spend to save output : 4.3392181396484375e-05 total time spend for step 3 : 0.3107161521911621 step4:send_mail_cod Mon Jul 28 06:20:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1374091607: ('0.032277262701206386',), 1374091601: ('0.032277262701206386',), 1374091594: ('0.032277262701206386',), 1374091589: ('0.032277262701206386',), 1374091587: ('0.032277262701206386',), 1374091585: ('0.032277262701206386',), 1374091578: ('0.032277262701206386',), 1374091576: ('0.032277262701206386',), 1374091575: ('0.032277262701206386',), 1374091573: ('0.032277262701206386',), 1374091569: ('0.032277262701206386',), 1374091564: ('0.032277262701206386',)} input_args_next_step : {1374091607: ()} output_args : {1374091607: ('0.032277262701206386',), 1374091601: ('0.032277262701206386',), 1374091594: ('0.032277262701206386',), 1374091589: ('0.032277262701206386',), 1374091587: ('0.032277262701206386',), 1374091585: ('0.032277262701206386',), 1374091578: ('0.032277262701206386',), 1374091576: ('0.032277262701206386',), 1374091575: ('0.032277262701206386',), 1374091573: ('0.032277262701206386',), 1374091569: ('0.032277262701206386',), 1374091564: ('0.032277262701206386',)} args : 1374091607 depend.output_id : 0 input_args_next_step : {1374091607: ('0.032277262701206386',), 1374091601: ()} output_args : {1374091607: ('0.032277262701206386',), 1374091601: ('0.032277262701206386',), 1374091594: ('0.032277262701206386',), 1374091589: ('0.032277262701206386',), 1374091587: ('0.032277262701206386',), 1374091585: ('0.032277262701206386',), 1374091578: ('0.032277262701206386',), 1374091576: ('0.032277262701206386',), 1374091575: ('0.032277262701206386',), 1374091573: ('0.032277262701206386',), 1374091569: ('0.032277262701206386',), 1374091564: ('0.032277262701206386',)} args : 1374091601 depend.output_id : 0 input_args_next_step : {1374091607: ('0.032277262701206386',), 1374091601: ('0.032277262701206386',), 1374091594: ()} output_args : {1374091607: ('0.032277262701206386',), 1374091601: ('0.032277262701206386',), 1374091594: ('0.032277262701206386',), 1374091589: ('0.032277262701206386',), 1374091587: ('0.032277262701206386',), 1374091585: ('0.032277262701206386',), 1374091578: ('0.032277262701206386',), 1374091576: ('0.032277262701206386',), 1374091575: ('0.032277262701206386',), 1374091573: ('0.032277262701206386',), 1374091569: ('0.032277262701206386',), 1374091564: ('0.032277262701206386',)} args : 1374091594 depend.output_id : 0 input_args_next_step : {1374091607: ('0.032277262701206386',), 1374091601: ('0.032277262701206386',), 1374091594: ('0.032277262701206386',), 1374091589: ()} output_args : {1374091607: ('0.032277262701206386',), 1374091601: ('0.032277262701206386',), 1374091594: ('0.032277262701206386',), 1374091589: ('0.032277262701206386',), 1374091587: ('0.032277262701206386',), 1374091585: ('0.032277262701206386',), 1374091578: ('0.032277262701206386',), 1374091576: ('0.032277262701206386',), 1374091575: ('0.032277262701206386',), 1374091573: ('0.032277262701206386',), 1374091569: ('0.032277262701206386',), 1374091564: ('0.032277262701206386',)} args : 1374091589 depend.output_id : 0 input_args_next_step : {1374091607: ('0.032277262701206386',), 1374091601: ('0.032277262701206386',), 1374091594: ('0.032277262701206386',), 1374091589: ('0.032277262701206386',), 1374091587: ()} output_args : {1374091607: ('0.032277262701206386',), 1374091601: ('0.032277262701206386',), 1374091594: ('0.032277262701206386',), 1374091589: ('0.032277262701206386',), 1374091587: ('0.032277262701206386',), 1374091585: ('0.032277262701206386',), 1374091578: ('0.032277262701206386',), 1374091576: ('0.032277262701206386',), 1374091575: ('0.032277262701206386',), 1374091573: ('0.032277262701206386',), 1374091569: ('0.032277262701206386',), 1374091564: ('0.032277262701206386',)} args : 1374091587 depend.output_id : 0 input_args_next_step : {1374091607: ('0.032277262701206386',), 1374091601: ('0.032277262701206386',), 1374091594: ('0.032277262701206386',), 1374091589: ('0.032277262701206386',), 1374091587: ('0.032277262701206386',), 1374091585: ()} output_args : {1374091607: ('0.032277262701206386',), 1374091601: ('0.032277262701206386',), 1374091594: ('0.032277262701206386',), 1374091589: ('0.032277262701206386',), 1374091587: ('0.032277262701206386',), 1374091585: ('0.032277262701206386',), 1374091578: ('0.032277262701206386',), 1374091576: ('0.032277262701206386',), 1374091575: ('0.032277262701206386',), 1374091573: ('0.032277262701206386',), 1374091569: ('0.032277262701206386',), 1374091564: ('0.032277262701206386',)} args : 1374091585 depend.output_id : 0 input_args_next_step : {1374091607: ('0.032277262701206386',), 1374091601: ('0.032277262701206386',), 1374091594: ('0.032277262701206386',), 1374091589: ('0.032277262701206386',), 1374091587: ('0.032277262701206386',), 1374091585: ('0.032277262701206386',), 1374091578: ()} output_args : {1374091607: ('0.032277262701206386',), 1374091601: ('0.032277262701206386',), 1374091594: ('0.032277262701206386',), 1374091589: ('0.032277262701206386',), 1374091587: ('0.032277262701206386',), 1374091585: ('0.032277262701206386',), 1374091578: ('0.032277262701206386',), 1374091576: ('0.032277262701206386',), 1374091575: ('0.032277262701206386',), 1374091573: ('0.032277262701206386',), 1374091569: ('0.032277262701206386',), 1374091564: ('0.032277262701206386',)} args : 1374091578 depend.output_id : 0 input_args_next_step : {1374091607: ('0.032277262701206386',), 1374091601: ('0.032277262701206386',), 1374091594: ('0.032277262701206386',), 1374091589: ('0.032277262701206386',), 1374091587: ('0.032277262701206386',), 1374091585: ('0.032277262701206386',), 1374091578: ('0.032277262701206386',), 1374091576: ()} output_args : {1374091607: ('0.032277262701206386',), 1374091601: ('0.032277262701206386',), 1374091594: ('0.032277262701206386',), 1374091589: ('0.032277262701206386',), 1374091587: ('0.032277262701206386',), 1374091585: ('0.032277262701206386',), 1374091578: ('0.032277262701206386',), 1374091576: ('0.032277262701206386',), 1374091575: ('0.032277262701206386',), 1374091573: ('0.032277262701206386',), 1374091569: ('0.032277262701206386',), 1374091564: ('0.032277262701206386',)} args : 1374091576 depend.output_id : 0 input_args_next_step : {1374091607: ('0.032277262701206386',), 1374091601: ('0.032277262701206386',), 1374091594: ('0.032277262701206386',), 1374091589: ('0.032277262701206386',), 1374091587: ('0.032277262701206386',), 1374091585: ('0.032277262701206386',), 1374091578: ('0.032277262701206386',), 1374091576: ('0.032277262701206386',), 1374091575: ()} output_args : {1374091607: ('0.032277262701206386',), 1374091601: ('0.032277262701206386',), 1374091594: ('0.032277262701206386',), 1374091589: ('0.032277262701206386',), 1374091587: ('0.032277262701206386',), 1374091585: ('0.032277262701206386',), 1374091578: ('0.032277262701206386',), 1374091576: ('0.032277262701206386',), 1374091575: ('0.032277262701206386',), 1374091573: ('0.032277262701206386',), 1374091569: ('0.032277262701206386',), 1374091564: ('0.032277262701206386',)} args : 1374091575 depend.output_id : 0 input_args_next_step : {1374091607: ('0.032277262701206386',), 1374091601: ('0.032277262701206386',), 1374091594: ('0.032277262701206386',), 1374091589: ('0.032277262701206386',), 1374091587: ('0.032277262701206386',), 1374091585: ('0.032277262701206386',), 1374091578: ('0.032277262701206386',), 1374091576: ('0.032277262701206386',), 1374091575: ('0.032277262701206386',), 1374091573: ()} output_args : {1374091607: ('0.032277262701206386',), 1374091601: ('0.032277262701206386',), 1374091594: ('0.032277262701206386',), 1374091589: ('0.032277262701206386',), 1374091587: ('0.032277262701206386',), 1374091585: ('0.032277262701206386',), 1374091578: ('0.032277262701206386',), 1374091576: ('0.032277262701206386',), 1374091575: ('0.032277262701206386',), 1374091573: ('0.032277262701206386',), 1374091569: ('0.032277262701206386',), 1374091564: ('0.032277262701206386',)} args : 1374091573 depend.output_id : 0 input_args_next_step : {1374091607: ('0.032277262701206386',), 1374091601: ('0.032277262701206386',), 1374091594: ('0.032277262701206386',), 1374091589: ('0.032277262701206386',), 1374091587: ('0.032277262701206386',), 1374091585: ('0.032277262701206386',), 1374091578: ('0.032277262701206386',), 1374091576: ('0.032277262701206386',), 1374091575: ('0.032277262701206386',), 1374091573: ('0.032277262701206386',), 1374091569: ()} output_args : {1374091607: ('0.032277262701206386',), 1374091601: ('0.032277262701206386',), 1374091594: ('0.032277262701206386',), 1374091589: ('0.032277262701206386',), 1374091587: ('0.032277262701206386',), 1374091585: ('0.032277262701206386',), 1374091578: ('0.032277262701206386',), 1374091576: ('0.032277262701206386',), 1374091575: ('0.032277262701206386',), 1374091573: ('0.032277262701206386',), 1374091569: ('0.032277262701206386',), 1374091564: ('0.032277262701206386',)} args : 1374091569 depend.output_id : 0 input_args_next_step : {1374091607: ('0.032277262701206386',), 1374091601: ('0.032277262701206386',), 1374091594: ('0.032277262701206386',), 1374091589: ('0.032277262701206386',), 1374091587: ('0.032277262701206386',), 1374091585: ('0.032277262701206386',), 1374091578: ('0.032277262701206386',), 1374091576: ('0.032277262701206386',), 1374091575: ('0.032277262701206386',), 1374091573: ('0.032277262701206386',), 1374091569: ('0.032277262701206386',), 1374091564: ()} output_args : {1374091607: ('0.032277262701206386',), 1374091601: ('0.032277262701206386',), 1374091594: ('0.032277262701206386',), 1374091589: ('0.032277262701206386',), 1374091587: ('0.032277262701206386',), 1374091585: ('0.032277262701206386',), 1374091578: ('0.032277262701206386',), 1374091576: ('0.032277262701206386',), 1374091575: ('0.032277262701206386',), 1374091573: ('0.032277262701206386',), 1374091569: ('0.032277262701206386',), 1374091564: ('0.032277262701206386',)} args : 1374091564 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 : {25386460: [{'flou': 25386506, 'Carton_gris': 25386507, 'Carton_brun': 25386508, 'metal': 25386509, 'Teint_Dans_La_Masse': 25386510, 'plastique': 25386511, 'cartonnette': 25386512, 'kraft': 25386513, 'environnement': 25386514, 'mal_croppe': 25386515, 'papier': 25386516, 'autre_refus': 25386517}]} input_args_next_step : {1374091607: ('0.032277262701206386',), 1374091601: ('0.032277262701206386',), 1374091594: ('0.032277262701206386',), 1374091589: ('0.032277262701206386',), 1374091587: ('0.032277262701206386',), 1374091585: ('0.032277262701206386',), 1374091578: ('0.032277262701206386',), 1374091576: ('0.032277262701206386',), 1374091575: ('0.032277262701206386',), 1374091573: ('0.032277262701206386',), 1374091569: ('0.032277262701206386',), 1374091564: ('0.032277262701206386',), 25386460: ()} output_args : {25386460: [{'flou': 25386506, 'Carton_gris': 25386507, 'Carton_brun': 25386508, 'metal': 25386509, 'Teint_Dans_La_Masse': 25386510, 'plastique': 25386511, 'cartonnette': 25386512, 'kraft': 25386513, 'environnement': 25386514, 'mal_croppe': 25386515, 'papier': 25386516, 'autre_refus': 25386517}]} args : 25386460 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 :13, first value : ('0.032277262701206386',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25386460) 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 ph WHERE photo_id IN (1374091607,1374091601,1374091594,1374091589,1374091587,1374091585,1374091578,1374091576,1374091575,1374091573,1374091569,1374091564) Found this number of photos: 12 ##### Call download_photos : nb_thread : 5 begin to download photo : 1374091564 begin to download photo : 1374091575 begin to download photo : 1374091585 begin to download photo : 1374091594 download finish for photo 1374091575 begin to download photo : 1374091576 download finish for photo 1374091585 begin to download photo : 1374091587 download finish for photo 1374091594 begin to download photo : 1374091601 download finish for photo 1374091564 begin to download photo : 1374091569 download finish for photo 1374091576 begin to download photo : 1374091578 download finish for photo 1374091601 begin to download photo : 1374091607 download finish for photo 1374091587 begin to download photo : 1374091589 download finish for photo 1374091578 download finish for photo 1374091569 begin to download photo : 1374091573 download finish for photo 1374091607 download finish for photo 1374091589 download finish for photo 1374091573 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette253865061753676459/ imagette253865091753676459/ length of list_filenames : 12 ; length of list_pids : 12 ; length of list_args : 12 results_Auto_P25386460_28-07-2025_06_20_59.pdf 25386506 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25386506 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette253865061753676459 25386509 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25386509 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette253865091753676459 25386511 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25386511 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1374091631: '1753676367_4163060_1374091495_bca5f651966a28e240094f63dfac1f03_rle_crop_3896031244_0.png'} change filename to text .imagette253865111753676459/ imagette253865111753676459/1753676367_4163060_1374091495_bca5f651966a28e240094f63dfac1f03_rle_crop_3896031244_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/28/23d48acfa5e6abb8380f0657974e1cf6_32758224.png imagette253865111753676459 25386512 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25386512 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1374091629: '1753676367_4163060_1374091503_80e2d4b6ce265bd15891b5fd8a281f01_rle_crop_3896031211_0.png'} change filename to text .imagette253865121753676459/ imagette253865121753676459/1753676367_4163060_1374091503_80e2d4b6ce265bd15891b5fd8a281f01_rle_crop_3896031211_0.png.png imagette253865131753676459/ imagette253865151753676459/ imagette253865171753676459/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/28/2a3d8862e2da8037aaa5e09f5f5a50ab_12675208.png imagette253865121753676459 25386513 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25386513 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette253865131753676459 25386515 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25386515 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette253865151753676459 25386517 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25386517 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette253865171753676459 25386507 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25386507 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1374091624: '1753676367_4163060_1374091503_80e2d4b6ce265bd15891b5fd8a281f01_rle_crop_3896031210_0.png', 1374091625: '1753676367_4163060_1374091502_e5a61a2548776194145f27a06890badf_rle_crop_3896031228_0.png', 1374091626: '1753676367_4163060_1374091488_df90024a684166baf5a588298dd7a629_rle_crop_3896031275_0.png', 1374091627: '1753676367_4163060_1374091488_df90024a684166baf5a588298dd7a629_rle_crop_3896031273_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/28/a5a454ceff521ec19c0de6ac0cb3671e_27659964.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/28/58ce7186c9fbe21ddb54eb83f0afc16e_13546804.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/28/a2935bca89e7852c923b342660f42790_50961703.png change filename to text .imagette253865071753676459/ imagette253865071753676459/1753676367_4163060_1374091503_80e2d4b6ce265bd15891b5fd8a281f01_rle_crop_3896031210_0.png.png imagette253865071753676459/1753676367_4163060_1374091488_df90024a684166baf5a588298dd7a629_rle_crop_3896031275_0.png.png imagette253865071753676459/1753676367_4163060_1374091502_e5a61a2548776194145f27a06890badf_rle_crop_3896031228_0.png.png imagette253865071753676459/1753676367_4163060_1374091488_df90024a684166baf5a588298dd7a629_rle_crop_3896031273_0.png.png imagette253865081753676459/ wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/28/d74e50deb9cafd4f65dd7c91b074a578_17855523.png imagette253865071753676459 25386508 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25386508 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette253865081753676459 25386510 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25386510 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1374091620: '1753676367_4163060_1374091503_80e2d4b6ce265bd15891b5fd8a281f01_rle_crop_3896031218_0.png', 1374091621: '1753676367_4163060_1374091495_bca5f651966a28e240094f63dfac1f03_rle_crop_3896031245_0.png', 1374091622: '1753676367_4163060_1374091495_bca5f651966a28e240094f63dfac1f03_rle_crop_3896031246_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/28/2ff57f408e0d15aa21dcdc5679c0a264_42997612.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/28/2b574060e2c0698cb67065423e8666a3_54281889.png change filename to text .imagette253865101753676459/ imagette253865101753676459/1753676367_4163060_1374091503_80e2d4b6ce265bd15891b5fd8a281f01_rle_crop_3896031218_0.png.png imagette253865101753676459/1753676367_4163060_1374091495_bca5f651966a28e240094f63dfac1f03_rle_crop_3896031245_0.png.png imagette253865101753676459/1753676367_4163060_1374091495_bca5f651966a28e240094f63dfac1f03_rle_crop_3896031246_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/28/97199e532d0758d4551bca29899bd69d_33510520.png imagette253865101753676459 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=25386460 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/25386531,25386532,25386533,25386534,25386535,25386536,25386537,25386538,25386539,25386540,25386541,25386542?tags=flou,Carton_gris,Carton_brun,metal,Teint_Dans_La_Masse,plastique,cartonnette,kraft,environnement,mal_croppe,papier,autre_refus your option no_mail is active, we will not send the real mail to your client args[1374091607] : ('0.032277262701206386',) no score found for photo 1374091607 We are sending mail with results at report@fotonower.com args[1374091601] : ('0.032277262701206386',) no score found for photo 1374091601 We are sending mail with results at report@fotonower.com args[1374091594] : ('0.032277262701206386',) no score found for photo 1374091594 We are sending mail with results at report@fotonower.com args[1374091589] : ('0.032277262701206386',) no score found for photo 1374091589 We are sending mail with results at report@fotonower.com args[1374091587] : ('0.032277262701206386',) no score found for photo 1374091587 We are sending mail with results at report@fotonower.com args[1374091585] : ('0.032277262701206386',) no score found for photo 1374091585 We are sending mail with results at report@fotonower.com args[1374091578] : ('0.032277262701206386',) no score found for photo 1374091578 We are sending mail with results at report@fotonower.com args[1374091576] : ('0.032277262701206386',) no score found for photo 1374091576 We are sending mail with results at report@fotonower.com args[1374091575] : ('0.032277262701206386',) no score found for photo 1374091575 We are sending mail with results at report@fotonower.com args[1374091573] : ('0.032277262701206386',) no score found for photo 1374091573 We are sending mail with results at report@fotonower.com args[1374091569] : ('0.032277262701206386',) no score found for photo 1374091569 We are sending mail with results at report@fotonower.com args[1374091564] : ('0.032277262701206386',) no score found for photo 1374091564 We are sending mail with results at report@fotonower.com refus_total : 0.032277262701206386 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25386460 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_P25386460_28-07-2025_06_20_59.pdf results_Auto_P25386460_28-07-2025_06_20_59.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25386460_28-07-2025_06_20_59.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','25386460','results_Auto_P25386460_28-07-2025_06_20_59.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25386460_28-07-2025_06_20_59.pdf','pdf','','0.14','0.032277262701206386') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25386460]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1374091607, 1374091601, 1374091594, 1374091589, 1374091587, 1374091585, 1374091578, 1374091576, 1374091575, 1374091573, 1374091569, 1374091564] map_info['map_portfolio_photo'] : {25386460: [1374091607, 1374091601, 1374091594, 1374091589, 1374091587, 1374091585, 1374091578, 1374091576, 1374091575, 1374091573, 1374091569, 1374091564, 1374091552, 1374091543, 1374091534, 1374091527, 1374091526, 1374091525, 1374091505, 1374091503, 1374091502, 1374091495, 1374091489, 1374091488]} final : False mtd_id 4302 list_pids : [1374091607, 1374091601, 1374091594, 1374091589, 1374091587, 1374091585, 1374091578, 1374091576, 1374091575, 1374091573, 1374091569, 1374091564] 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, '3366149') ('4302', '25386460', '1374091607', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091601', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091594', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091589', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091587', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091585', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091578', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091576', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091575', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091573', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091569', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091564', None, None, None, None, None, '3366149') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 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', '25386460', '1374091607', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091601', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091594', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091589', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091587', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091585', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091578', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091576', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091575', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091573', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091569', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091564', None, None, None, None, None, '3366149')] time used for this insertion : 0.01624155044555664 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.2191877365112305 time spend to save output : 0.016458988189697266 total time spend for step 4 : 2.2356467247009277 step5:split_time_score Mon Jul 28 06:21:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['25386460'] 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 : [('25386460',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25386460) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1374091575: {'path': 'temp/1753676458_2835188_1374091575_9ba90c2896d5638864a7595cf14dbca4.jpg', 'extension': 'jpg'}, 1374091576: {'path': 'temp/1753676458_2835188_1374091576_fe68f71a203f40e48164d4375bb1b956.jpg', 'extension': 'jpg'}, 1374091578: {'path': 'temp/1753676458_2835188_1374091578_2cf91e472d24e60e3533fe6861966245.jpg', 'extension': 'jpg'}, 1374091594: {'path': 'temp/1753676458_2835188_1374091594_d7ca4fec813b2d831aa4ee847225eee0.jpg', 'extension': 'jpg'}, 1374091601: {'path': 'temp/1753676458_2835188_1374091601_05c2a2bb12abf87b557243a7c6d3e1cc.jpg', 'extension': 'jpg'}, 1374091607: {'path': 'temp/1753676458_2835188_1374091607_680b527485f150756b1612e30b8a4232.jpg', 'extension': 'jpg'}, 1374091585: {'path': 'temp/1753676458_2835188_1374091585_1751a6dcdc6b9d113703e108e1a0cb10.jpg', 'extension': 'jpg'}, 1374091587: {'path': 'temp/1753676458_2835188_1374091587_d2c04d5f36219206a1e478cccc8caf7e.jpg', 'extension': 'jpg'}, 1374091589: {'path': 'temp/1753676458_2835188_1374091589_e1b3dce77dcd9ade57857550f8411f50.jpg', 'extension': 'jpg'}, 1374091564: {'path': 'temp/1753676458_2835188_1374091564_a0f62cb7abc22d2935e39d56d8a096b7.jpg', 'extension': 'jpg'}, 1374091569: {'path': 'temp/1753676458_2835188_1374091569_4ffbf70b46ceb1730cab8a151b8c4401.jpg', 'extension': 'jpg'}, 1374091573: {'path': 'temp/1753676458_2835188_1374091573_a7dca402bf2c40a3392de077981371ef.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 = 25386460; (('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 ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 25386460 group by h (('06', 24),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25386460 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 (25386460) 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 (25386460) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 28072025 25386460 Nombre de photos uploadées : 24 / 23040 (0%) 28072025 25386460 Nombre de photos taguées (types de déchets): 0 / 24 (0%) 28072025 25386460 Nombre de photos taguées (volume) : 0 / 24 (0%) [{'photo_id': 1374091505, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/28/0d61a17b796fadfb2c3a110f5f15dd5a.jpg', 'username': None, 'uploaded_at': 1753676163, 'text': 'image_28072025_06_15_04_10143.jpg'}, {'photo_id': 1374091503, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/28/80e2d4b6ce265bd15891b5fd8a281f01.jpg', 'username': None, 'uploaded_at': 1753676163, 'text': 'image_28072025_06_15_14_10135.jpg'}, {'photo_id': 1374091502, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/28/e5a61a2548776194145f27a06890badf.jpg', 'username': None, 'uploaded_at': 1753676163, 'text': 'image_28072025_06_15_24_10142.jpg'}, {'photo_id': 1374091495, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/28/bca5f651966a28e240094f63dfac1f03.jpg', 'username': None, 'uploaded_at': 1753676163, 'text': 'image_28072025_06_15_33_9130.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.1920928955078125e-06 elapsed_time : order_list_meta_photo_and_scores 5.245208740234375e-06 ???????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0010766983032226562 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 25386460, '2025-07-28' ) 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 (2013825,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.21245193481445312 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= 2013825 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2013825, 'dashboard_run_id': 2021357, 'mtr_portfolio_id': 25384876, 'dashboard_result_id': 13196733, '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_P25384876_28-07-2025_05_16_58.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25384879, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25384880, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25384881, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25384882, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25384883, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25384884, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25384885, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25384886, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25384887, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25384888, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25384889, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25384890, 'pht': 3726}}"}, {'dashboat_entry_day': 2013825, 'dashboard_run_id': 2021357, 'mtr_portfolio_id': 25385066, 'dashboard_result_id': 13196734, '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_P25385066_28-07-2025_05_30_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25385093, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25385094, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25385095, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25385096, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25385097, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25385098, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25385099, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25385100, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25385101, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25385102, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25385103, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25385104, 'pht': 3726}}"}, {'dashboat_entry_day': 2013825, 'dashboard_run_id': 2021357, 'mtr_portfolio_id': 25385391, 'dashboard_result_id': 13196735, '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_P25385391_28-07-2025_05_47_33.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25385396, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25385397, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25385398, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25385399, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25385400, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25385401, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25385402, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25385403, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25385404, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25385405, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25385406, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25385407, 'pht': 3726}}"}, {'dashboat_entry_day': 2013825, 'dashboard_run_id': 2021357, 'mtr_portfolio_id': 25385661, 'dashboard_result_id': 13196736, '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_P25385661_28-07-2025_06_00_58.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25385666, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25385667, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25385668, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25385669, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25385670, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25385671, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25385672, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25385673, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25385674, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25385675, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25385676, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25385677, 'pht': 3726}}"}, {'dashboat_entry_day': 2013825, 'dashboard_run_id': 2021357, 'mtr_portfolio_id': 25385913, 'dashboard_result_id': 13196737, '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_P25385913_28-07-2025_06_17_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25385919, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25385920, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25385921, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25385922, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25385923, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25385924, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25385925, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25385926, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25385927, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25385928, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25385929, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25385930, 'pht': 3726}}"}, {'dashboat_entry_day': 2013825, 'dashboard_run_id': 2021357, 'mtr_portfolio_id': 25386460, 'dashboard_result_id': 13196738, '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_P25386460_28-07-2025_06_18_59.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25386506, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25386507, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25386508, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25386509, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25386510, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25386511, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25386512, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25386513, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25386514, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25386515, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25386516, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25386517, '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 = 25384876 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': 3365715, 'mtr_portfolio_id': 25384876, 'created_at': datetime.datetime(2025, 7, 28, 5, 16, 57), 'result': '0.1173604949788806', 'result_long': None, 'result_double': None}] Qualite : 0.1173604949788806 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25384876 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25384876_28-07-2025_05_16_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25384876 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_P25384876_28-07-2025_05_16_58.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25384879, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25384880, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25384881, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25384882, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25384883, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25384884, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25384885, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25384886, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25384887, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25384888, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25384889, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25384890, 'pht': 3726}}" where mtr_portfolio_id = 25384876 and dashboard_run_id = 2021357 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`=25384876 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13196733, 0.1173604949788806, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25384876_28-07-2025_05_16_58.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25384879, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25384880, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25384881, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25384882, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25384883, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25384884, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25384885, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25384886, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25384887, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25384888, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25384889, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25384890, '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 = 25385066 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': 3365745, 'mtr_portfolio_id': 25385066, 'created_at': datetime.datetime(2025, 7, 28, 5, 30, 57), 'result': '0.11097435655929282', 'result_long': None, 'result_double': None}] Qualite : 0.11097435655929282 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25385066 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25385066_28-07-2025_05_30_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25385066 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_P25385066_28-07-2025_05_30_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25385093, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25385094, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25385095, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25385096, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25385097, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25385098, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25385099, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25385100, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25385101, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25385102, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25385103, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25385104, 'pht': 3726}}" where mtr_portfolio_id = 25385066 and dashboard_run_id = 2021357 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`=25385066 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13196734, 0.11097435655929282, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25385066_28-07-2025_05_30_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25385093, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25385094, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25385095, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25385096, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25385097, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25385098, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25385099, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25385100, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25385101, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25385102, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25385103, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25385104, '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 = 25385391 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': 3365819, 'mtr_portfolio_id': 25385391, 'created_at': datetime.datetime(2025, 7, 28, 5, 47, 32), 'result': '0.11314513100975243', 'result_long': None, 'result_double': None}] Qualite : 0.11314513100975243 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25385391 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25385391_28-07-2025_05_47_33.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25385391 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_P25385391_28-07-2025_05_47_33.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25385396, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25385397, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25385398, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25385399, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25385400, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25385401, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25385402, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25385403, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25385404, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25385405, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25385406, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25385407, 'pht': 3726}}" where mtr_portfolio_id = 25385391 and dashboard_run_id = 2021359 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`=25385391 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13196735, 0.11314513100975243, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25385391_28-07-2025_05_47_33.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25385396, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25385397, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25385398, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25385399, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25385400, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25385401, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25385402, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25385403, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25385404, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25385405, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25385406, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25385407, '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 = 25385661 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': 3365908, 'mtr_portfolio_id': 25385661, 'created_at': datetime.datetime(2025, 7, 28, 6, 0, 57), 'result': '0.090633587082022', 'result_long': None, 'result_double': None}] Qualite : 0.090633587082022 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25385661 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25385661_28-07-2025_06_00_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25385661 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_P25385661_28-07-2025_06_00_58.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25385666, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25385667, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25385668, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25385669, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25385670, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25385671, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25385672, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25385673, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25385674, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25385675, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25385676, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25385677, 'pht': 3726}}" where mtr_portfolio_id = 25385661 and dashboard_run_id = 2021359 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`=25385661 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13196736, 0.090633587082022, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25385661_28-07-2025_06_00_58.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25385666, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25385667, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25385668, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25385669, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25385670, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25385671, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25385672, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25385673, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25385674, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25385675, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25385676, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25385677, '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 = 25385913 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': 3366007, 'mtr_portfolio_id': 25385913, 'created_at': datetime.datetime(2025, 7, 28, 6, 16, 59), 'result': '0.05071365889584217', 'result_long': None, 'result_double': None}] Qualite : 0.05071365889584217 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25385913 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25385913_28-07-2025_06_17_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25385913 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_P25385913_28-07-2025_06_17_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25385919, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25385920, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25385921, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25385922, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25385923, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25385924, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25385925, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25385926, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25385927, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25385928, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25385929, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25385930, 'pht': 3726}}" where mtr_portfolio_id = 25385913 and dashboard_run_id = 2021359 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`=25385913 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13196737, 0.05071365889584217, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25385913_28-07-2025_06_17_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25385919, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25385920, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25385921, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25385922, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25385923, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25385924, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25385925, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25385926, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25385927, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25385928, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25385929, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25385930, '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 = 25386460 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': 3366149, 'mtr_portfolio_id': 25386460, 'created_at': datetime.datetime(2025, 7, 28, 6, 20, 58), 'result': '0.032277262701206386', 'result_long': None, 'result_double': None}] Qualite : 0.032277262701206386 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25386460 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25386460_28-07-2025_06_20_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25386460 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_P25386460_28-07-2025_06_20_59.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25386506, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25386507, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25386508, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25386509, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25386510, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25386511, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25386512, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25386513, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25386514, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25386515, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25386516, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25386517, 'pht': 3726}}" where mtr_portfolio_id = 25386460 and dashboard_run_id = 2021359 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`=25386460 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13196738, 0.032277262701206386, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25386460_28-07-2025_06_20_59.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25386506, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25386507, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25386508, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25386509, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25386510, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25386511, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25386512, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25386513, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25386514, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25386515, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25386516, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25386517, '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 (25384876,25385066,25385391,25385661,25385913,25386460) result : ((1374087887,), (1374087890,), (1374087915,), (1374087938,), (1374087960,), (1374088079,), (1374088080,), (1374088081,), (1374088082,), (1374088083,), (1374088085,), (1374088101,), (1374088103,), (1374088104,), (1374088105,), (1374088106,), (1374088108,), (1374088122,), (1374088129,), (1374088137,), (1374088140,), (1374088141,), (1374088143,), (1374088155,), (1374088175,), (1374088176,), (1374088177,), (1374088188,), (1374088196,), (1374088200,), (1374088213,), (1374088237,), (1374088238,), (1374088239,), (1374088251,), (1374088259,), (1374088263,), (1374088277,), (1374088279,), (1374088280,), (1374088281,), (1374088282,), (1374088283,), (1374088297,), (1374088332,), (1374088334,), (1374088336,), (1374088338,), (1374088340,), (1374088342,), (1374088349,), (1374088359,), (1374088361,), (1374088363,), (1374088365,), (1374088380,), (1374088388,), (1374088408,), (1374088411,), (1374088413,), (1374088414,), (1374088417,), (1374088421,), (1374088436,), (1374088438,), (1374088439,), (1374088446,), (1374088459,), (1374088467,), (1374088482,), (1374088484,), (1374088486,), (1374088487,), (1374088489,), (1374088492,), (1374088504,), (1374088506,), (1374088514,), (1374088526,), (1374088536,), (1374088538,), (1374088581,), (1374088583,), (1374088584,), (1374088587,), (1374088589,), (1374088591,), (1374088604,), (1374088606,), (1374088607,), (1374088620,), (1374088627,), (1374088634,), (1374088646,), (1374088648,), (1374088649,), (1374088650,), (1374088651,), (1374088653,), (1374088670,), (1374088672,), (1374088684,), (1374088694,), (1374088701,), (1374088703,), (1374088715,), (1374088716,), (1374088717,), (1374088718,), (1374088719,), (1374088720,), (1374088729,), (1374088731,), (1374088739,), (1374088751,), (1374088758,), (1374088759,), (1374088771,), (1374088786,), (1374088787,), (1374088788,), (1374088800,), (1374088809,), (1374088814,), (1374088823,), (1374088824,), (1374088825,), (1374088827,), (1374088829,), (1374088830,), (1374088847,), (1374088848,), (1374088850,), (1374088864,), (1374088871,), (1374088879,), (1374088888,), (1374088891,), (1374088893,), (1374088894,), (1374088895,), (1374088897,), (1374088914,), (1374088916,), (1374088918,), (1374088919,), (1374088920,), (1374088921,), (1374088933,), (1374088951,), (1374088963,), (1374088965,), (1374088967,), (1374088968,), (1374088969,), (1374088999,), (1374089001,), (1374089004,), (1374089006,), (1374089008,), (1374089010,), (1374089044,), (1374089046,), (1374089048,), (1374089052,), (1374089064,), (1374089075,), (1374089083,), (1374089086,), (1374089087,), (1374089090,), (1374089091,), (1374089092,), (1374089098,), (1374089101,), (1374089107,), (1374089108,), (1374089110,), (1374089113,), (1374089126,), (1374089144,), (1374089155,), (1374089156,), (1374089157,), (1374089158,), (1374089159,), (1374089168,), (1374089170,), (1374089171,), (1374089173,), (1374089174,), (1374089175,), (1374089187,), (1374089189,), (1374089203,), (1374089211,), (1374089218,), (1374089220,), (1374089229,), (1374089244,), (1374089246,), (1374089250,), (1374089255,), (1374089257,), (1374089258,), (1374089266,), (1374089268,), (1374089271,), (1374089273,), (1374089274,), (1374089275,), (1374089286,), (1374089294,), (1374089301,), (1374089302,), (1374089303,), (1374089304,), (1374089314,), (1374089336,), (1374089340,), (1374089345,), (1374089347,), (1374089348,), (1374089349,), (1374089355,), (1374089356,), (1374089359,), (1374089361,), (1374089362,), (1374089364,), (1374089372,), (1374089374,), (1374089385,), (1374089395,), (1374089402,), (1374089404,), (1374089420,), (1374089435,), (1374089448,), (1374089450,), (1374089452,), (1374089453,), (1374089454,), (1374089455,), (1374089466,), (1374089472,), (1374089475,), (1374089477,), (1374089480,), (1374089482,), (1374089493,), (1374089496,), (1374089498,), (1374089499,), (1374089500,), (1374089502,), (1374089510,), (1374089514,), (1374089519,), (1374089526,), (1374089529,), (1374089531,), (1374089534,), (1374089536,), (1374089538,), (1374089539,), (1374089541,), (1374089543,), (1374089551,), (1374089552,), (1374089554,), (1374089561,), (1374089569,), (1374089574,), (1374089585,), (1374089586,), (1374089588,), (1374089590,), (1374089592,), (1374089593,), (1374089604,), (1374089606,), (1374089608,), (1374089610,), (1374089611,), (1374089613,), (1374089628,), (1374089665,), (1374089667,), (1374089668,), (1374089669,), (1374089670,), (1374089671,), (1374089692,), (1374089720,), (1374089748,), (1374089772,), (1374089796,), (1374089820,), (1374090014,), (1374090031,), (1374090054,), (1374090067,), (1374090069,), (1374090087,), (1374090127,), (1374090129,), (1374090132,), (1374090133,), (1374090135,), (1374090137,), (1374090144,), (1374090159,), (1374090186,), (1374090209,), (1374090231,), (1374090255,), (1374090699,), (1374090763,), (1374090831,), (1374090846,), (1374090847,), (1374090848,), (1374091126,), (1374091141,), (1374091158,), (1374091170,), (1374091172,), (1374091174,), (1374091185,), (1374091195,), (1374091197,), (1374091198,), (1374091199,), (1374091201,), (1374091211,), (1374091215,), (1374091217,), (1374091228,), (1374091238,), (1374091240,), (1374091257,), (1374091261,), (1374091263,), (1374091266,), (1374091269,), (1374091271,), (1374091282,), (1374091283,), (1374091284,), (1374091285,), (1374091292,), (1374091306,), (1374091329,), (1374091331,), (1374091334,), (1374091337,), (1374091338,), (1374091340,), (1374091351,), (1374091353,), (1374091355,), (1374091356,), (1374091358,), (1374091360,), (1374091369,), (1374091374,), (1374091376,), (1374091379,), (1374091382,), (1374091384,), (1374091389,), (1374091390,), (1374091392,), (1374091399,), (1374091402,), (1374091404,), (1374091420,), (1374091422,), (1374091431,), (1374091434,), (1374091436,), (1374091437,), (1374091445,), (1374091488,), (1374091489,), (1374091495,), (1374091502,), (1374091503,), (1374091505,), (1374091525,), (1374091526,), (1374091527,), (1374091534,), (1374091543,), (1374091552,), (1374091564,), (1374091569,), (1374091573,), (1374091575,), (1374091576,), (1374091578,), (1374091585,), (1374091587,), (1374091589,), (1374091594,), (1374091601,), (1374091607,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'28072025': {'nb_upload': 24, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25386460]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1374091607, 1374091601, 1374091594, 1374091589, 1374091587, 1374091585, 1374091578, 1374091576, 1374091575, 1374091573, 1374091569, 1374091564] map_info['map_portfolio_photo'] : {25386460: [1374091607, 1374091601, 1374091594, 1374091589, 1374091587, 1374091585, 1374091578, 1374091576, 1374091575, 1374091573, 1374091569, 1374091564, 1374091552, 1374091543, 1374091534, 1374091527, 1374091526, 1374091525, 1374091505, 1374091503, 1374091502, 1374091495, 1374091489, 1374091488]} final : True mtd_id 4302 list_pids : [1374091607, 1374091601, 1374091594, 1374091589, 1374091587, 1374091585, 1374091578, 1374091576, 1374091575, 1374091573, 1374091569, 1374091564] Looping around the photos to save general results len do output : 1 /25386460Didn'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, '3366149') ('4302', '25386460', '1374091607', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091601', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091594', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091589', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091587', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091585', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091578', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091576', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091575', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091573', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091569', None, None, None, None, None, '3366149') ('4302', None, None, None, None, None, None, None, '3366149') ('4302', '25386460', '1374091564', None, None, None, None, None, '3366149') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 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, '25386460', 'None', None, None, None, None, '3366149'), ('4302', '25386460', '1374091607', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091601', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091594', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091589', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091587', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091585', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091578', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091576', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091575', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091573', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091569', None, None, None, None, None, '3366149'), ('4302', '25386460', '1374091564', None, None, None, None, None, '3366149')] time used for this insertion : 0.01639103889465332 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.6315722465515137 time spend to save output : 0.016608476638793945 total time spend for step 5 : 0.6481807231903076 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 (3366149) 2.03user 2.43system 0:07.17elapsed 62%CPU (0avgtext+0avgdata 160952maxresident)k 224inputs+7392outputs (0major+64260minor)pagefaults 0swaps