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 : 434242 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 (3716197) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3716197) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26818468 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3716197'] with mtr_portfolio_ids : ['26818468'] and first list_photo_ids : [] new path : /proc/434242/ Name: python3 Umask: 0002 State: R (running) Tgid: 434242 Ngid: 0 Pid: 434242 PPid: 434241 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 434242 NSpid: 434242 NSpgid: 432297 NSsid: 432297 VmPeak: 1107252 kB VmSize: 1107252 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 97816 kB VmRSS: 97816 kB RssAnon: 60160 kB RssFile: 37656 kB RssShmem: 0 kB VmData: 866004 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 592 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: 49 nonvoluntary_ctxt_switches: 75 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '434242', 'Ngid': '0', 'Pid': '434242', 'PPid': '434241', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '434242', 'NSpid': '434242', 'NSpgid': '432297', 'NSsid': '432297', 'VmPeak': '1107252 kB', 'VmSize': '1107252 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '97816 kB', 'VmRSS': '97816 kB', 'RssAnon': '60160 kB', 'RssFile': '37656 kB', 'RssShmem': '0 kB', 'VmData': '866004 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '592 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': '49', 'nonvoluntary_ctxt_switches': '75'} ('datou_batch_current', '434242', '1107252', '0', '1107252', '866004', '97816', b'', 'marlene', '3716197') 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 (26818468) 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 (3716197 ) ) 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 (26818468) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1383600707, 'portfolio_id': 26818468}, {'photo_id': 1383600704, 'portfolio_id': 26818468}, {'photo_id': 1383600702, 'portfolio_id': 26818468}, {'photo_id': 1383600698, 'portfolio_id': 26818468}, {'photo_id': 1383600697, 'portfolio_id': 26818468}, {'photo_id': 1383600690, 'portfolio_id': 26818468}, {'photo_id': 1383600687, 'portfolio_id': 26818468}, {'photo_id': 1383600679, 'portfolio_id': 26818468}, {'photo_id': 1383600661, 'portfolio_id': 26818468}, {'photo_id': 1383600657, 'portfolio_id': 26818468}, {'photo_id': 1383600620, 'portfolio_id': 26818468}, {'photo_id': 1383600594, 'portfolio_id': 26818468}, {'photo_id': 1383600593, 'portfolio_id': 26818468}, {'photo_id': 1383600591, 'portfolio_id': 26818468}, {'photo_id': 1383600565, 'portfolio_id': 26818468}, {'photo_id': 1383600563, 'portfolio_id': 26818468}] map_portfolio_id_photo_id: {26818468: [1383600707, 1383600704, 1383600702, 1383600698, 1383600697, 1383600690, 1383600687, 1383600679, 1383600661, 1383600657, 1383600620, 1383600594, 1383600593, 1383600591, 1383600565, 1383600563]} ##### 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.014969348907470703 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Sat Sep 13 02:14:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26818468) 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 : 26818468 get user id for portfolio 26818468 get sub ptf for main ptf 26818468, type 3726 and hashtags ['autre_refus', 'mal_croppe', 'environnement', 'plastique', 'kraft', 'cartonnette', 'Teint_Dans_La_Masse', 'Carton_gris', 'flou', 'papier', 'metal', '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`=26818468 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','mal_croppe','environnement','plastique','kraft','cartonnette','Teint_Dans_La_Masse','Carton_gris','flou','papier','metal','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`=26818468 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','mal_croppe','environnement','plastique','kraft','cartonnette','Teint_Dans_La_Masse','Carton_gris','flou','papier','metal','Carton_brun')) AND mptpi.`min_score`=0.5 To do returned map {'environnement': {'main_port_id': 26818468, 'sub_port_id': 26818471, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18080818, 'last_updated_at': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 2, 12, 58)}, 'papier': {'main_port_id': 26818468, 'sub_port_id': 26818472, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18080819, 'last_updated_at': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 2, 12, 58)}, 'Carton_brun': {'main_port_id': 26818468, 'sub_port_id': 26818473, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18080820, 'last_updated_at': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 2, 12, 58)}, 'metal': {'main_port_id': 26818468, 'sub_port_id': 26818474, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18080821, 'last_updated_at': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 2, 12, 58)}, 'plastique': {'main_port_id': 26818468, 'sub_port_id': 26818475, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18080822, 'last_updated_at': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 2, 12, 58)}, 'autre_refus': {'main_port_id': 26818468, 'sub_port_id': 26818476, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18080823, 'last_updated_at': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 2, 12, 58)}, 'kraft': {'main_port_id': 26818468, 'sub_port_id': 26818477, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18080824, 'last_updated_at': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 2, 12, 58)}, 'Teint_Dans_La_Masse': {'main_port_id': 26818468, 'sub_port_id': 26818478, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18080825, 'last_updated_at': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 2, 12, 58)}, 'Carton_gris': {'main_port_id': 26818468, 'sub_port_id': 26818479, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18080826, 'last_updated_at': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 2, 12, 58)}, 'flou': {'main_port_id': 26818468, 'sub_port_id': 26818480, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18080827, 'last_updated_at': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 2, 12, 58)}, 'cartonnette': {'main_port_id': 26818468, 'sub_port_id': 26818481, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18080828, 'last_updated_at': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 2, 12, 58)}, 'mal_croppe': {'main_port_id': 26818468, 'sub_port_id': 26818482, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18080829, 'last_updated_at': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 2, 12, 58)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26818471 , 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=26818468 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 (26818471) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26818468) result : ((1383600563,), (1383600565,), (1383600591,), (1383600593,), (1383600594,), (1383600620,), (1383600657,), (1383600661,), (1383600679,), (1383600687,), (1383600690,), (1383600697,), (1383600698,), (1383600702,), (1383600704,), (1383600707,)) 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 26818472 , 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=26818468 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 (26818472) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26818468) result : ((1383600563,), (1383600565,), (1383600591,), (1383600593,), (1383600594,), (1383600620,), (1383600657,), (1383600661,), (1383600679,), (1383600687,), (1383600690,), (1383600697,), (1383600698,), (1383600702,), (1383600704,), (1383600707,)) 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 26818473 , 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=26818468 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 (26818473) result : ((1383600684,), (1383600685,), (1383600696,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26818468) result : ((1383600563,), (1383600565,), (1383600591,), (1383600593,), (1383600594,), (1383600620,), (1383600657,), (1383600661,), (1383600679,), (1383600687,), (1383600690,), (1383600697,), (1383600698,), (1383600702,), (1383600704,), (1383600707,)) 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 26818474 , 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=26818468 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 (26818474) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26818468) result : ((1383600563,), (1383600565,), (1383600591,), (1383600593,), (1383600594,), (1383600620,), (1383600657,), (1383600661,), (1383600679,), (1383600687,), (1383600690,), (1383600697,), (1383600698,), (1383600702,), (1383600704,), (1383600707,)) 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 26818475 , 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=26818468 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 (26818475) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26818468) result : ((1383600563,), (1383600565,), (1383600591,), (1383600593,), (1383600594,), (1383600620,), (1383600657,), (1383600661,), (1383600679,), (1383600687,), (1383600690,), (1383600697,), (1383600698,), (1383600702,), (1383600704,), (1383600707,)) 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 26818476 , 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=26818468 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 (26818476) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26818468) result : ((1383600563,), (1383600565,), (1383600591,), (1383600593,), (1383600594,), (1383600620,), (1383600657,), (1383600661,), (1383600679,), (1383600687,), (1383600690,), (1383600697,), (1383600698,), (1383600702,), (1383600704,), (1383600707,)) 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 26818477 , 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=26818468 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 (26818477) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26818468) result : ((1383600563,), (1383600565,), (1383600591,), (1383600593,), (1383600594,), (1383600620,), (1383600657,), (1383600661,), (1383600679,), (1383600687,), (1383600690,), (1383600697,), (1383600698,), (1383600702,), (1383600704,), (1383600707,)) 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 26818478 , 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=26818468 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 (26818478) result : ((1383600694,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26818468) result : ((1383600563,), (1383600565,), (1383600591,), (1383600593,), (1383600594,), (1383600620,), (1383600657,), (1383600661,), (1383600679,), (1383600687,), (1383600690,), (1383600697,), (1383600698,), (1383600702,), (1383600704,), (1383600707,)) 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 26818479 , 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=26818468 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 (26818479) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26818468) result : ((1383600563,), (1383600565,), (1383600591,), (1383600593,), (1383600594,), (1383600620,), (1383600657,), (1383600661,), (1383600679,), (1383600687,), (1383600690,), (1383600697,), (1383600698,), (1383600702,), (1383600704,), (1383600707,)) 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 26818480 , 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=26818468 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 (26818480) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26818468) result : ((1383600563,), (1383600565,), (1383600591,), (1383600593,), (1383600594,), (1383600620,), (1383600657,), (1383600661,), (1383600679,), (1383600687,), (1383600690,), (1383600697,), (1383600698,), (1383600702,), (1383600704,), (1383600707,)) 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 26818481 , 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=26818468 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 (26818481) result : ((1383600680,), (1383600681,), (1383600695,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26818468) result : ((1383600563,), (1383600565,), (1383600591,), (1383600593,), (1383600594,), (1383600620,), (1383600657,), (1383600661,), (1383600679,), (1383600687,), (1383600690,), (1383600697,), (1383600698,), (1383600702,), (1383600704,), (1383600707,)) 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 26818482 , 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=26818468 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 (26818482) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26818468) result : ((1383600563,), (1383600565,), (1383600591,), (1383600593,), (1383600594,), (1383600620,), (1383600657,), (1383600661,), (1383600679,), (1383600687,), (1383600690,), (1383600697,), (1383600698,), (1383600702,), (1383600704,), (1383600707,)) 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`=26818468 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','mal_croppe','environnement','plastique','kraft','cartonnette','Teint_Dans_La_Masse','Carton_gris','flou','papier','metal','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`=26818468 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','mal_croppe','environnement','plastique','kraft','cartonnette','Teint_Dans_La_Masse','Carton_gris','flou','papier','metal','Carton_brun')) AND mptpi.`min_score`=0.5 To do returned map {'environnement': {'main_port_id': 26818468, 'sub_port_id': 26818483, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18080830, 'last_updated_at': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 2, 12, 59)}, 'papier': {'main_port_id': 26818468, 'sub_port_id': 26818484, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18080831, 'last_updated_at': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 2, 12, 59)}, 'Carton_brun': {'main_port_id': 26818468, 'sub_port_id': 26818485, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18080832, 'last_updated_at': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 2, 12, 59)}, 'metal': {'main_port_id': 26818468, 'sub_port_id': 26818486, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18080833, 'last_updated_at': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 2, 12, 59)}, 'plastique': {'main_port_id': 26818468, 'sub_port_id': 26818487, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18080834, 'last_updated_at': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 2, 12, 59)}, 'autre_refus': {'main_port_id': 26818468, 'sub_port_id': 26818488, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18080835, 'last_updated_at': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 2, 12, 59)}, 'kraft': {'main_port_id': 26818468, 'sub_port_id': 26818489, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18080836, 'last_updated_at': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 2, 12, 59)}, 'Teint_Dans_La_Masse': {'main_port_id': 26818468, 'sub_port_id': 26818490, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18080837, 'last_updated_at': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 2, 12, 59)}, 'Carton_gris': {'main_port_id': 26818468, 'sub_port_id': 26818491, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18080838, 'last_updated_at': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 2, 12, 59)}, 'flou': {'main_port_id': 26818468, 'sub_port_id': 26818492, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18080839, 'last_updated_at': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 2, 12, 59)}, 'cartonnette': {'main_port_id': 26818468, 'sub_port_id': 26818493, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18080840, 'last_updated_at': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 2, 12, 59)}, 'mal_croppe': {'main_port_id': 26818468, 'sub_port_id': 26818494, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18080841, 'last_updated_at': datetime.datetime(2025, 9, 13, 2, 13), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 2, 13), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 2, 12, 59)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26818483,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26818471 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26818484,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26818472 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26818485,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26818473 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26818486,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26818474 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26818487,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26818475 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26818488,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26818476 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26818489,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26818477 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26818490,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26818478 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26818491,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26818479 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26818492,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26818480 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26818493,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26818481 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26818494,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26818482 lien utilise dans velours : https://marlene.fotonower.com/velours/26818483,26818484,26818485,26818486,26818487,26818488,26818489,26818490,26818491,26818492,26818493,26818494?tags=environnement,papier,Carton_brun,metal,plastique,autre_refus,kraft,Teint_Dans_La_Masse,Carton_gris,flou,cartonnette,mal_croppe After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26818468]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1383600707, 1383600704, 1383600702, 1383600698, 1383600697, 1383600690, 1383600687, 1383600679, 1383600661, 1383600657, 1383600620] map_info['map_portfolio_photo'] : {26818468: [1383600707, 1383600704, 1383600702, 1383600698, 1383600697, 1383600690, 1383600687, 1383600679, 1383600661, 1383600657, 1383600620, 1383600594, 1383600593, 1383600591, 1383600565, 1383600563]} final : False mtd_id 4302 list_pids : [1383600707, 1383600704, 1383600702, 1383600698, 1383600697, 1383600690, 1383600687, 1383600679, 1383600661, 1383600657, 1383600620] Looping around the photos to save general results len do output : 1 /26818468. 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, '3716197') ('4302', '26818468', '1383600707', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600704', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600702', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600698', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600697', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600690', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600687', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600679', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600661', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600657', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600620', None, None, None, None, None, '3716197') 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', None, '26818468', "{'environnement': 26818471, 'papier': 26818472, 'Carton_brun': 26818473, 'metal': 26818474, 'plastique': 26818475, 'autre_refus': 26818476, 'kraft': 26818477, 'Teint_Dans_La_Masse': 26818478, 'Carton_gris': 26818479, 'flou': 26818480, 'cartonnette': 26818481, 'mal_croppe': 26818482}", None, None, None, None, '3716197'), ('4302', '26818468', '1383600707', None, None, None, None, None, '3716197'), ('4302', '26818468', '1383600704', None, None, None, None, None, '3716197'), ('4302', '26818468', '1383600702', None, None, None, None, None, '3716197'), ('4302', '26818468', '1383600698', None, None, None, None, None, '3716197'), ('4302', '26818468', '1383600697', None, None, None, None, None, '3716197'), ('4302', '26818468', '1383600690', None, None, None, None, None, '3716197'), ('4302', '26818468', '1383600687', None, None, None, None, None, '3716197'), ('4302', '26818468', '1383600679', None, None, None, None, None, '3716197'), ('4302', '26818468', '1383600661', None, None, None, None, None, '3716197'), ('4302', '26818468', '1383600657', None, None, None, None, None, '3716197'), ('4302', '26818468', '1383600620', None, None, None, None, None, '3716197')] time used for this insertion : 0.015202522277832031 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5306107997894287 time spend to save output : 0.015482902526855469 total time spend for step 1 : 1.5460937023162842 step2:final Sat Sep 13 02:15: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 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 (26818468) 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 26818468 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1383600565,1383600563,1383600594,1383600698,1383600593,1383600697,1383600591,1383600690,1383600687,1383600679,1383600661,1383600657,1383600620,1383600707,1383600704,1383600702); 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([26818468]) Inside saveOutput : final : False verbose : True original output for save of step final : {1383600707: ('0.0716726700593665',), 1383600704: ('0.0716726700593665',), 1383600702: ('0.0716726700593665',), 1383600698: ('0.0716726700593665',), 1383600697: ('0.0716726700593665',), 1383600690: ('0.0716726700593665',), 1383600687: ('0.0716726700593665',), 1383600679: ('0.0716726700593665',), 1383600661: ('0.0716726700593665',), 1383600657: ('0.0716726700593665',), 1383600620: ('0.0716726700593665',)} new output for save of step final : {1383600707: ('0.0716726700593665',), 1383600704: ('0.0716726700593665',), 1383600702: ('0.0716726700593665',), 1383600698: ('0.0716726700593665',), 1383600697: ('0.0716726700593665',), 1383600690: ('0.0716726700593665',), 1383600687: ('0.0716726700593665',), 1383600679: ('0.0716726700593665',), 1383600661: ('0.0716726700593665',), 1383600657: ('0.0716726700593665',), 1383600620: ('0.0716726700593665',)} [1383600707, 1383600704, 1383600702, 1383600698, 1383600697, 1383600690, 1383600687, 1383600679, 1383600661, 1383600657, 1383600620] map_info['map_portfolio_photo'] : {26818468: [1383600707, 1383600704, 1383600702, 1383600698, 1383600697, 1383600690, 1383600687, 1383600679, 1383600661, 1383600657, 1383600620, 1383600594, 1383600593, 1383600591, 1383600565, 1383600563]} final : False mtd_id 4302 list_pids : [1383600707, 1383600704, 1383600702, 1383600698, 1383600697, 1383600690, 1383600687, 1383600679, 1383600661, 1383600657, 1383600620] Looping around the photos to save general results len do output : 11 /1383600707.Didn't retrieve data . /1383600704.Didn't retrieve data . /1383600702.Didn't retrieve data . /1383600698.Didn't retrieve data . /1383600697.Didn't retrieve data . /1383600690.Didn't retrieve data . /1383600687.Didn't retrieve data . /1383600679.Didn't retrieve data . /1383600661.Didn't retrieve data . /1383600657.Didn't retrieve data . /1383600620.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, '3716197') ('4302', '26818468', '1383600707', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600704', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600702', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600698', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600697', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600690', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600687', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600679', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600661', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600657', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600620', None, None, None, None, None, '3716197') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 33 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', '26818468', '1383600707', '0.0716726700593665', None, None, None, None, '3716197'), ('4302', '26818468', '1383600704', '0.0716726700593665', None, None, None, None, '3716197'), ('4302', '26818468', '1383600702', '0.0716726700593665', None, None, None, None, '3716197'), ('4302', '26818468', '1383600698', '0.0716726700593665', None, None, None, None, '3716197'), ('4302', '26818468', '1383600697', '0.0716726700593665', None, None, None, None, '3716197'), ('4302', '26818468', '1383600690', '0.0716726700593665', None, None, None, None, '3716197'), ('4302', '26818468', '1383600687', '0.0716726700593665', None, None, None, None, '3716197'), ('4302', '26818468', '1383600679', '0.0716726700593665', None, None, None, None, '3716197'), ('4302', '26818468', '1383600661', '0.0716726700593665', None, None, None, None, '3716197'), ('4302', '26818468', '1383600657', '0.0716726700593665', None, None, None, None, '3716197'), ('4302', '26818468', '1383600620', '0.0716726700593665', None, None, None, None, '3716197')] time used for this insertion : 0.013200521469116211 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06376981735229492 time spend to save output : 0.013711214065551758 total time spend for step 2 : 0.07748103141784668 step3:velours_tree Sat Sep 13 02:15: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 : {26818468: [{'environnement': 26818471, 'papier': 26818472, 'Carton_brun': 26818473, 'metal': 26818474, 'plastique': 26818475, 'autre_refus': 26818476, 'kraft': 26818477, 'Teint_Dans_La_Masse': 26818478, 'Carton_gris': 26818479, 'flou': 26818480, 'cartonnette': 26818481, 'mal_croppe': 26818482}]} input_args_next_step : {26818468: ()} output_args : {26818468: [{'environnement': 26818471, 'papier': 26818472, 'Carton_brun': 26818473, 'metal': 26818474, 'plastique': 26818475, 'autre_refus': 26818476, 'kraft': 26818477, 'Teint_Dans_La_Masse': 26818478, 'Carton_gris': 26818479, 'flou': 26818480, 'cartonnette': 26818481, 'mal_croppe': 26818482}]} args : 26818468 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'environnement': 26818471, 'papier': 26818472, 'Carton_brun': 26818473, 'metal': 26818474, 'plastique': 26818475, 'autre_refus': 26818476, 'kraft': 26818477, 'Teint_Dans_La_Masse': 26818478, 'Carton_gris': 26818479, 'flou': 26818480, 'cartonnette': 26818481, 'mal_croppe': 26818482},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26818468) 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([26818468]) 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.2755088806152344 time spend to save output : 4.839897155761719e-05 total time spend for step 3 : 0.275557279586792 step4:send_mail_cod Sat Sep 13 02:15: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 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 : {1383600707: ('0.0716726700593665',), 1383600704: ('0.0716726700593665',), 1383600702: ('0.0716726700593665',), 1383600698: ('0.0716726700593665',), 1383600697: ('0.0716726700593665',), 1383600690: ('0.0716726700593665',), 1383600687: ('0.0716726700593665',), 1383600679: ('0.0716726700593665',), 1383600661: ('0.0716726700593665',), 1383600657: ('0.0716726700593665',), 1383600620: ('0.0716726700593665',)} input_args_next_step : {1383600707: ()} output_args : {1383600707: ('0.0716726700593665',), 1383600704: ('0.0716726700593665',), 1383600702: ('0.0716726700593665',), 1383600698: ('0.0716726700593665',), 1383600697: ('0.0716726700593665',), 1383600690: ('0.0716726700593665',), 1383600687: ('0.0716726700593665',), 1383600679: ('0.0716726700593665',), 1383600661: ('0.0716726700593665',), 1383600657: ('0.0716726700593665',), 1383600620: ('0.0716726700593665',)} args : 1383600707 depend.output_id : 0 input_args_next_step : {1383600707: ('0.0716726700593665',), 1383600704: ()} output_args : {1383600707: ('0.0716726700593665',), 1383600704: ('0.0716726700593665',), 1383600702: ('0.0716726700593665',), 1383600698: ('0.0716726700593665',), 1383600697: ('0.0716726700593665',), 1383600690: ('0.0716726700593665',), 1383600687: ('0.0716726700593665',), 1383600679: ('0.0716726700593665',), 1383600661: ('0.0716726700593665',), 1383600657: ('0.0716726700593665',), 1383600620: ('0.0716726700593665',)} args : 1383600704 depend.output_id : 0 input_args_next_step : {1383600707: ('0.0716726700593665',), 1383600704: ('0.0716726700593665',), 1383600702: ()} output_args : {1383600707: ('0.0716726700593665',), 1383600704: ('0.0716726700593665',), 1383600702: ('0.0716726700593665',), 1383600698: ('0.0716726700593665',), 1383600697: ('0.0716726700593665',), 1383600690: ('0.0716726700593665',), 1383600687: ('0.0716726700593665',), 1383600679: ('0.0716726700593665',), 1383600661: ('0.0716726700593665',), 1383600657: ('0.0716726700593665',), 1383600620: ('0.0716726700593665',)} args : 1383600702 depend.output_id : 0 input_args_next_step : {1383600707: ('0.0716726700593665',), 1383600704: ('0.0716726700593665',), 1383600702: ('0.0716726700593665',), 1383600698: ()} output_args : {1383600707: ('0.0716726700593665',), 1383600704: ('0.0716726700593665',), 1383600702: ('0.0716726700593665',), 1383600698: ('0.0716726700593665',), 1383600697: ('0.0716726700593665',), 1383600690: ('0.0716726700593665',), 1383600687: ('0.0716726700593665',), 1383600679: ('0.0716726700593665',), 1383600661: ('0.0716726700593665',), 1383600657: ('0.0716726700593665',), 1383600620: ('0.0716726700593665',)} args : 1383600698 depend.output_id : 0 input_args_next_step : {1383600707: ('0.0716726700593665',), 1383600704: ('0.0716726700593665',), 1383600702: ('0.0716726700593665',), 1383600698: ('0.0716726700593665',), 1383600697: ()} output_args : {1383600707: ('0.0716726700593665',), 1383600704: ('0.0716726700593665',), 1383600702: ('0.0716726700593665',), 1383600698: ('0.0716726700593665',), 1383600697: ('0.0716726700593665',), 1383600690: ('0.0716726700593665',), 1383600687: ('0.0716726700593665',), 1383600679: ('0.0716726700593665',), 1383600661: ('0.0716726700593665',), 1383600657: ('0.0716726700593665',), 1383600620: ('0.0716726700593665',)} args : 1383600697 depend.output_id : 0 input_args_next_step : {1383600707: ('0.0716726700593665',), 1383600704: ('0.0716726700593665',), 1383600702: ('0.0716726700593665',), 1383600698: ('0.0716726700593665',), 1383600697: ('0.0716726700593665',), 1383600690: ()} output_args : {1383600707: ('0.0716726700593665',), 1383600704: ('0.0716726700593665',), 1383600702: ('0.0716726700593665',), 1383600698: ('0.0716726700593665',), 1383600697: ('0.0716726700593665',), 1383600690: ('0.0716726700593665',), 1383600687: ('0.0716726700593665',), 1383600679: ('0.0716726700593665',), 1383600661: ('0.0716726700593665',), 1383600657: ('0.0716726700593665',), 1383600620: ('0.0716726700593665',)} args : 1383600690 depend.output_id : 0 input_args_next_step : {1383600707: ('0.0716726700593665',), 1383600704: ('0.0716726700593665',), 1383600702: ('0.0716726700593665',), 1383600698: ('0.0716726700593665',), 1383600697: ('0.0716726700593665',), 1383600690: ('0.0716726700593665',), 1383600687: ()} output_args : {1383600707: ('0.0716726700593665',), 1383600704: ('0.0716726700593665',), 1383600702: ('0.0716726700593665',), 1383600698: ('0.0716726700593665',), 1383600697: ('0.0716726700593665',), 1383600690: ('0.0716726700593665',), 1383600687: ('0.0716726700593665',), 1383600679: ('0.0716726700593665',), 1383600661: ('0.0716726700593665',), 1383600657: ('0.0716726700593665',), 1383600620: ('0.0716726700593665',)} args : 1383600687 depend.output_id : 0 input_args_next_step : {1383600707: ('0.0716726700593665',), 1383600704: ('0.0716726700593665',), 1383600702: ('0.0716726700593665',), 1383600698: ('0.0716726700593665',), 1383600697: ('0.0716726700593665',), 1383600690: ('0.0716726700593665',), 1383600687: ('0.0716726700593665',), 1383600679: ()} output_args : {1383600707: ('0.0716726700593665',), 1383600704: ('0.0716726700593665',), 1383600702: ('0.0716726700593665',), 1383600698: ('0.0716726700593665',), 1383600697: ('0.0716726700593665',), 1383600690: ('0.0716726700593665',), 1383600687: ('0.0716726700593665',), 1383600679: ('0.0716726700593665',), 1383600661: ('0.0716726700593665',), 1383600657: ('0.0716726700593665',), 1383600620: ('0.0716726700593665',)} args : 1383600679 depend.output_id : 0 input_args_next_step : {1383600707: ('0.0716726700593665',), 1383600704: ('0.0716726700593665',), 1383600702: ('0.0716726700593665',), 1383600698: ('0.0716726700593665',), 1383600697: ('0.0716726700593665',), 1383600690: ('0.0716726700593665',), 1383600687: ('0.0716726700593665',), 1383600679: ('0.0716726700593665',), 1383600661: ()} output_args : {1383600707: ('0.0716726700593665',), 1383600704: ('0.0716726700593665',), 1383600702: ('0.0716726700593665',), 1383600698: ('0.0716726700593665',), 1383600697: ('0.0716726700593665',), 1383600690: ('0.0716726700593665',), 1383600687: ('0.0716726700593665',), 1383600679: ('0.0716726700593665',), 1383600661: ('0.0716726700593665',), 1383600657: ('0.0716726700593665',), 1383600620: ('0.0716726700593665',)} args : 1383600661 depend.output_id : 0 input_args_next_step : {1383600707: ('0.0716726700593665',), 1383600704: ('0.0716726700593665',), 1383600702: ('0.0716726700593665',), 1383600698: ('0.0716726700593665',), 1383600697: ('0.0716726700593665',), 1383600690: ('0.0716726700593665',), 1383600687: ('0.0716726700593665',), 1383600679: ('0.0716726700593665',), 1383600661: ('0.0716726700593665',), 1383600657: ()} output_args : {1383600707: ('0.0716726700593665',), 1383600704: ('0.0716726700593665',), 1383600702: ('0.0716726700593665',), 1383600698: ('0.0716726700593665',), 1383600697: ('0.0716726700593665',), 1383600690: ('0.0716726700593665',), 1383600687: ('0.0716726700593665',), 1383600679: ('0.0716726700593665',), 1383600661: ('0.0716726700593665',), 1383600657: ('0.0716726700593665',), 1383600620: ('0.0716726700593665',)} args : 1383600657 depend.output_id : 0 input_args_next_step : {1383600707: ('0.0716726700593665',), 1383600704: ('0.0716726700593665',), 1383600702: ('0.0716726700593665',), 1383600698: ('0.0716726700593665',), 1383600697: ('0.0716726700593665',), 1383600690: ('0.0716726700593665',), 1383600687: ('0.0716726700593665',), 1383600679: ('0.0716726700593665',), 1383600661: ('0.0716726700593665',), 1383600657: ('0.0716726700593665',), 1383600620: ()} output_args : {1383600707: ('0.0716726700593665',), 1383600704: ('0.0716726700593665',), 1383600702: ('0.0716726700593665',), 1383600698: ('0.0716726700593665',), 1383600697: ('0.0716726700593665',), 1383600690: ('0.0716726700593665',), 1383600687: ('0.0716726700593665',), 1383600679: ('0.0716726700593665',), 1383600661: ('0.0716726700593665',), 1383600657: ('0.0716726700593665',), 1383600620: ('0.0716726700593665',)} args : 1383600620 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 : {26818468: [{'environnement': 26818471, 'papier': 26818472, 'Carton_brun': 26818473, 'metal': 26818474, 'plastique': 26818475, 'autre_refus': 26818476, 'kraft': 26818477, 'Teint_Dans_La_Masse': 26818478, 'Carton_gris': 26818479, 'flou': 26818480, 'cartonnette': 26818481, 'mal_croppe': 26818482}]} input_args_next_step : {1383600707: ('0.0716726700593665',), 1383600704: ('0.0716726700593665',), 1383600702: ('0.0716726700593665',), 1383600698: ('0.0716726700593665',), 1383600697: ('0.0716726700593665',), 1383600690: ('0.0716726700593665',), 1383600687: ('0.0716726700593665',), 1383600679: ('0.0716726700593665',), 1383600661: ('0.0716726700593665',), 1383600657: ('0.0716726700593665',), 1383600620: ('0.0716726700593665',), 26818468: ()} output_args : {26818468: [{'environnement': 26818471, 'papier': 26818472, 'Carton_brun': 26818473, 'metal': 26818474, 'plastique': 26818475, 'autre_refus': 26818476, 'kraft': 26818477, 'Teint_Dans_La_Masse': 26818478, 'Carton_gris': 26818479, 'flou': 26818480, 'cartonnette': 26818481, 'mal_croppe': 26818482}]} args : 26818468 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 :12, first value : ('0.0716726700593665',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26818468) 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 (1383600707,1383600704,1383600702,1383600698,1383600697,1383600690,1383600687,1383600679,1383600661,1383600657,1383600620) Found this number of photos: 11 ##### Call download_photos : nb_thread : 5 begin to download photo : 1383600620 begin to download photo : 1383600679 begin to download photo : 1383600697 begin to download photo : 1383600704 download finish for photo 1383600704 begin to download photo : 1383600707 download finish for photo 1383600679 begin to download photo : 1383600687 download finish for photo 1383600620 begin to download photo : 1383600657 download finish for photo 1383600697 begin to download photo : 1383600698 download finish for photo 1383600707 download finish for photo 1383600657 begin to download photo : 1383600661 download finish for photo 1383600698 begin to download photo : 1383600702 download finish for photo 1383600687 begin to download photo : 1383600690 download finish for photo 1383600661 download finish for photo 1383600702 download finish for photo 1383600690 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette268184741757722501/ imagette268184751757722501/ imagette268184761757722501/ imagette268184771757722501/ imagette268184801757722501/ length of list_filenames : 11 ; length of list_pids : 11 ; length of list_args : 11 results_Auto_P26818468_13-09-2025_02_15_01.pdf 26818474 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=26818474 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette268184741757722501 26818475 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=26818475 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette268184751757722501 26818476 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=26818476 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette268184761757722501 26818477 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=26818477 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette268184771757722501 26818480 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=26818480 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette268184801757722501 26818481 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=26818481 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1383600680: '1757722386_3895217_1383600594_4baeb48dc73bf134c898aab18f890303_rle_crop_3957908331_0.png', 1383600681: '1757722386_3895217_1383600563_64b01184f13cee25f70f877c0f8668e7_rle_crop_3957908343_0.png', 1383600695: '1757722405_3895654_1383600593_97f5cc09109b2eea4b7aa0c4b2e85fed_rle_crop_3957908399_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/46f9b8098620b402c63ce2f2ffe36df2_87426140.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/e1c84cd3038f92e83f18dbafa3fb1582_470206.png change filename to text .imagette268184811757722501/ imagette268184811757722501/1757722386_3895217_1383600594_4baeb48dc73bf134c898aab18f890303_rle_crop_3957908331_0.png.png imagette268184811757722501/1757722405_3895654_1383600593_97f5cc09109b2eea4b7aa0c4b2e85fed_rle_crop_3957908399_0.png.png imagette268184811757722501/1757722386_3895217_1383600563_64b01184f13cee25f70f877c0f8668e7_rle_crop_3957908343_0.png.png imagette268184821757722501/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/f572de90aad4af3223dbf2dbd62a8f28_43895292.png imagette268184811757722501 26818482 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=26818482 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette268184821757722501 26818473 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=26818473 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1383600684: '1757722386_3895217_1383600594_4baeb48dc73bf134c898aab18f890303_rle_crop_3957908337_0.png', 1383600685: '1757722386_3895217_1383600563_64b01184f13cee25f70f877c0f8668e7_rle_crop_3957908346_0.png', 1383600696: '1757722405_3895654_1383600593_97f5cc09109b2eea4b7aa0c4b2e85fed_rle_crop_3957908405_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/3d300345e71a9486286b7eb3e3f4a5c3_44082927.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/9d597a768a1b0577609efcfd85d2c4ad_3184842.png change filename to text .imagette268184731757722501/ imagette268184731757722501/1757722386_3895217_1383600594_4baeb48dc73bf134c898aab18f890303_rle_crop_3957908337_0.png.png imagette268184731757722501/1757722386_3895217_1383600563_64b01184f13cee25f70f877c0f8668e7_rle_crop_3957908346_0.png.png imagette268184731757722501/1757722405_3895654_1383600593_97f5cc09109b2eea4b7aa0c4b2e85fed_rle_crop_3957908405_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/5b0d99f18aeac5537da066fa222a7e85_94858210.png imagette268184731757722501 26818478 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=26818478 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1383600694: '1757722405_3895654_1383600593_97f5cc09109b2eea4b7aa0c4b2e85fed_rle_crop_3957908402_0.png'} change filename to text .imagette268184781757722501/ imagette268184781757722501/1757722405_3895654_1383600593_97f5cc09109b2eea4b7aa0c4b2e85fed_rle_crop_3957908402_0.png.png imagette268184791757722501/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/71f939a9466a284de1dc8ca99e960445_22107783.png imagette268184781757722501 26818479 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=26818479 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette268184791757722501 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=26818468 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/26818483,26818484,26818485,26818486,26818487,26818488,26818489,26818490,26818491,26818492,26818493,26818494?tags=environnement,papier,Carton_brun,metal,plastique,autre_refus,kraft,Teint_Dans_La_Masse,Carton_gris,flou,cartonnette,mal_croppe your option no_mail is active, we will not send the real mail to your client args[1383600707] : ('0.0716726700593665',) no score found for photo 1383600707 We are sending mail with results at report@fotonower.com args[1383600704] : ('0.0716726700593665',) no score found for photo 1383600704 We are sending mail with results at report@fotonower.com args[1383600702] : ('0.0716726700593665',) no score found for photo 1383600702 We are sending mail with results at report@fotonower.com args[1383600698] : ('0.0716726700593665',) no score found for photo 1383600698 We are sending mail with results at report@fotonower.com args[1383600697] : ('0.0716726700593665',) no score found for photo 1383600697 We are sending mail with results at report@fotonower.com args[1383600690] : ('0.0716726700593665',) no score found for photo 1383600690 We are sending mail with results at report@fotonower.com args[1383600687] : ('0.0716726700593665',) no score found for photo 1383600687 We are sending mail with results at report@fotonower.com args[1383600679] : ('0.0716726700593665',) no score found for photo 1383600679 We are sending mail with results at report@fotonower.com args[1383600661] : ('0.0716726700593665',) no score found for photo 1383600661 We are sending mail with results at report@fotonower.com args[1383600657] : ('0.0716726700593665',) no score found for photo 1383600657 We are sending mail with results at report@fotonower.com args[1383600620] : ('0.0716726700593665',) no score found for photo 1383600620 We are sending mail with results at report@fotonower.com refus_total : 0.0716726700593665 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=26818468 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_P26818468_13-09-2025_02_15_01.pdf results_Auto_P26818468_13-09-2025_02_15_01.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26818468_13-09-2025_02_15_01.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','26818468','results_Auto_P26818468_13-09-2025_02_15_01.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26818468_13-09-2025_02_15_01.pdf','pdf','','0.11','0.0716726700593665') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26818468]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1383600707, 1383600704, 1383600702, 1383600698, 1383600697, 1383600690, 1383600687, 1383600679, 1383600661, 1383600657, 1383600620] map_info['map_portfolio_photo'] : {26818468: [1383600707, 1383600704, 1383600702, 1383600698, 1383600697, 1383600690, 1383600687, 1383600679, 1383600661, 1383600657, 1383600620, 1383600594, 1383600593, 1383600591, 1383600565, 1383600563]} final : False mtd_id 4302 list_pids : [1383600707, 1383600704, 1383600702, 1383600698, 1383600697, 1383600690, 1383600687, 1383600679, 1383600661, 1383600657, 1383600620] 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, '3716197') ('4302', '26818468', '1383600707', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600704', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600702', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600698', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600697', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600690', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600687', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600679', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600661', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600657', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600620', None, None, None, None, None, '3716197') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '26818468', '1383600707', None, None, None, None, None, '3716197'), ('4302', '26818468', '1383600704', None, None, None, None, None, '3716197'), ('4302', '26818468', '1383600702', None, None, None, None, None, '3716197'), ('4302', '26818468', '1383600698', None, None, None, None, None, '3716197'), ('4302', '26818468', '1383600697', None, None, None, None, None, '3716197'), ('4302', '26818468', '1383600690', None, None, None, None, None, '3716197'), ('4302', '26818468', '1383600687', None, None, None, None, None, '3716197'), ('4302', '26818468', '1383600679', None, None, None, None, None, '3716197'), ('4302', '26818468', '1383600661', None, None, None, None, None, '3716197'), ('4302', '26818468', '1383600657', None, None, None, None, None, '3716197'), ('4302', '26818468', '1383600620', None, None, None, None, None, '3716197')] time used for this insertion : 0.012852191925048828 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.9554147720336914 time spend to save output : 0.013071060180664062 total time spend for step 4 : 1.9684858322143555 step5:split_time_score Sat Sep 13 02:15:02 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['26818468'] 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 : [('26818468',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26818468) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1383600704: {'path': 'temp/1757722500_434242_1383600704_6e27b3f41c86a906149dffd0de38a711.jpg', 'extension': 'jpg'}, 1383600707: {'path': 'temp/1757722500_434242_1383600707_67a9eb131756d87bfe132ce4572b7449.jpg', 'extension': 'jpg'}, 1383600620: {'path': 'temp/1757722500_434242_1383600620_d9475c2d6fd45df69d42a97a324801dc.jpg', 'extension': 'jpg'}, 1383600657: {'path': 'temp/1757722500_434242_1383600657_702e6affd364396a01523abf7268bbe6.jpg', 'extension': 'jpg'}, 1383600661: {'path': 'temp/1757722500_434242_1383600661_73a9b70fadf95600f2f61330375a7175.jpg', 'extension': 'jpg'}, 1383600697: {'path': 'temp/1757722500_434242_1383600697_1538365eb018fcfaeba01f475f87a669.jpg', 'extension': 'jpg'}, 1383600698: {'path': 'temp/1757722500_434242_1383600698_7a90e27fd70a3124d2ac8333082a5bde.jpg', 'extension': 'jpg'}, 1383600702: {'path': 'temp/1757722500_434242_1383600702_7f7b457e7c3ac86e28be412577cc4e67.jpg', 'extension': 'jpg'}, 1383600679: {'path': 'temp/1757722500_434242_1383600679_514b5f00f6601ae9c9a15267f881a6d2.jpg', 'extension': 'jpg'}, 1383600687: {'path': 'temp/1757722500_434242_1383600687_137966bbb282df926bc9aaa0089f4fda.jpg', 'extension': 'jpg'}, 1383600690: {'path': 'temp/1757722500_434242_1383600690_99f0e58daff04a8856226a100c746899.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 = 26818468; (('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 = 26818468 group by h (('02', 16),) 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=26818468 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 (26818468) 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 (26818468) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 13092025 26818468 Nombre de photos uploadées : 16 / 23040 (0%) 13092025 26818468 Nombre de photos taguées (types de déchets): 0 / 16 (0%) 13092025 26818468 Nombre de photos taguées (volume) : 0 / 16 (0%) [{'photo_id': 1383600565, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/3c7c470d574edc63b60ecf93d5cca550.jpg', 'username': None, 'uploaded_at': 1757722267, 'text': 'image_13092025_02_08_53_10137.jpg'}, {'photo_id': 1383600563, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/64b01184f13cee25f70f877c0f8668e7.jpg', 'username': None, 'uploaded_at': 1757722267, 'text': 'image_13092025_02_10_34_10146.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1383600594, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/4baeb48dc73bf134c898aab18f890303.jpg', 'username': None, 'uploaded_at': 1757722327, 'text': 'image_13092025_02_10_53_9125.jpg 2e-05 for time 1, id_amount 3 this amount prod time diff : 1e-05'}, {'photo_id': 1383600698, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/7a90e27fd70a3124d2ac8333082a5bde.jpg', 'username': None, 'uploaded_at': 1757722432, 'text': 'image_13092025_02_10_53_9125.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.430511474609375e-06 elapsed_time : order_list_meta_photo_and_scores 5.4836273193359375e-06 ???????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0008833408355712891 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 26818468, '2025-09-13' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 10 and date = '2025-09-13' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2280961,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.20078372955322266 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= 2280961 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2280961, 'dashboard_run_id': 2288737, 'mtr_portfolio_id': 26815062, 'dashboard_result_id': 15118767, '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_P26815062_13-09-2025_00_18_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26815100, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26815101, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26815102, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26815103, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26815104, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26815105, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26815106, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26815107, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26815108, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26815109, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26815110, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26815111, 'pht': 3726}}"}, {'dashboat_entry_day': 2280961, 'dashboard_run_id': 2288737, 'mtr_portfolio_id': 26815697, 'dashboard_result_id': 15118768, '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_P26815697_13-09-2025_00_37_29.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26815704, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26815705, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26815706, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26815707, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26815708, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26815709, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26815710, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26815711, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26815712, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26815713, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26815714, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26815715, 'pht': 3726}}"}, {'dashboat_entry_day': 2280961, 'dashboard_run_id': 2288737, 'mtr_portfolio_id': 26816243, 'dashboard_result_id': 15118769, '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_P26816243_13-09-2025_00_48_29.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26816289, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26816290, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26816291, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26816292, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26816293, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26816294, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26816295, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26816296, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26816297, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26816298, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26816299, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26816300, 'pht': 3726}}"}, {'dashboat_entry_day': 2280961, 'dashboard_run_id': 2288737, 'mtr_portfolio_id': 26816834, 'dashboard_result_id': 15118770, '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_P26816834_13-09-2025_01_34_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26816845, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26816846, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26816847, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26816848, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26816849, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26816850, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26816851, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26816852, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26816853, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26816854, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26816855, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26816856, 'pht': 3726}}"}, {'dashboat_entry_day': 2280961, 'dashboard_run_id': 2288737, 'mtr_portfolio_id': 26817679, 'dashboard_result_id': 15118771, '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_P26817679_13-09-2025_01_31_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26817680, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26817681, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26817682, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26817683, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26817684, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26817685, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26817686, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26817687, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26817688, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26817689, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26817690, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26817691, 'pht': 3726}}"}, {'dashboat_entry_day': 2280961, 'dashboard_run_id': 2288737, 'mtr_portfolio_id': 26817728, 'dashboard_result_id': 15118772, '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_P26817728_13-09-2025_01_48_57.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26817731, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26817732, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26817733, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26817734, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26817735, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26817736, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26817737, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26817738, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26817739, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26817740, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26817741, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26817742, 'pht': 3726}}"}, {'dashboat_entry_day': 2280961, 'dashboard_run_id': 2288737, 'mtr_portfolio_id': 26818070, 'dashboard_result_id': 15118773, '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_P26818070_13-09-2025_02_11_01.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26818076, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26818077, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26818078, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26818079, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26818080, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26818081, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26818082, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26818083, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26818084, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26818085, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26818086, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26818087, 'pht': 3726}}"}, {'dashboat_entry_day': 2280961, 'dashboard_run_id': 2288737, 'mtr_portfolio_id': 26818468, 'dashboard_result_id': 15118774, '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_P26818468_13-09-2025_02_13_00.pdf'}"}] SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26815062 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': 3715693, 'mtr_portfolio_id': 26815062, 'created_at': datetime.datetime(2025, 9, 13, 0, 18, 58), 'result': '0.0474983149780897', 'result_long': None, 'result_double': None}] Qualite : 0.0474983149780897 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26815062 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26815062_13-09-2025_00_18_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26815062 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_P26815062_13-09-2025_00_18_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26815100, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26815101, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26815102, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26815103, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26815104, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26815105, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26815106, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26815107, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26815108, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26815109, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26815110, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26815111, 'pht': 3726}}" where mtr_portfolio_id = 26815062 and dashboard_run_id = 2288737 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`=26815062 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15118767, 0.0474983149780897, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26815062_13-09-2025_00_18_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26815100, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26815101, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26815102, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26815103, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26815104, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26815105, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26815106, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26815107, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26815108, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26815109, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26815110, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26815111, '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 = 26815697 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': 3715751, 'mtr_portfolio_id': 26815697, 'created_at': datetime.datetime(2025, 9, 13, 0, 37, 29), 'result': '0.059643097243093766', 'result_long': None, 'result_double': None}] Qualite : 0.059643097243093766 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26815697 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26815697_13-09-2025_00_37_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26815697 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_P26815697_13-09-2025_00_37_29.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26815704, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26815705, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26815706, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26815707, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26815708, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26815709, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26815710, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26815711, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26815712, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26815713, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26815714, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26815715, 'pht': 3726}}" where mtr_portfolio_id = 26815697 and dashboard_run_id = 2288737 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`=26815697 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15118768, 0.059643097243093766, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26815697_13-09-2025_00_37_29.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26815704, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26815705, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26815706, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26815707, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26815708, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26815709, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26815710, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26815711, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26815712, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26815713, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26815714, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26815715, '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 = 26816243 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': 3715826, 'mtr_portfolio_id': 26816243, 'created_at': datetime.datetime(2025, 9, 13, 0, 48, 29), 'result': '0.05248491001381296', 'result_long': None, 'result_double': None}] Qualite : 0.05248491001381296 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26816243 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26816243_13-09-2025_00_48_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26816243 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_P26816243_13-09-2025_00_48_29.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26816289, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26816290, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26816291, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26816292, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26816293, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26816294, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26816295, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26816296, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26816297, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26816298, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26816299, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26816300, 'pht': 3726}}" where mtr_portfolio_id = 26816243 and dashboard_run_id = 2288737 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`=26816243 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15118769, 0.05248491001381296, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26816243_13-09-2025_00_48_29.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26816289, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26816290, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26816291, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26816292, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26816293, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26816294, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26816295, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26816296, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26816297, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26816298, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26816299, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26816300, '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 = 26816834 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': 3715914, 'mtr_portfolio_id': 26816834, 'created_at': datetime.datetime(2025, 9, 13, 1, 34, 58), 'result': '0.03442522857592694', 'result_long': None, 'result_double': None}] Qualite : 0.03442522857592694 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26816834 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26816834_13-09-2025_01_34_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26816834 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_P26816834_13-09-2025_01_34_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26816845, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26816846, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26816847, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26816848, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26816849, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26816850, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26816851, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26816852, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26816853, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26816854, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26816855, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26816856, 'pht': 3726}}" where mtr_portfolio_id = 26816834 and dashboard_run_id = 2288737 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`=26816834 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15118770, 0.03442522857592694, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26816834_13-09-2025_01_34_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26816845, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26816846, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26816847, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26816848, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26816849, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26816850, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26816851, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26816852, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26816853, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26816854, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26816855, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26816856, '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 = 26817679 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26817679 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 26817679 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26817679 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26817679 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26817679 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26817679_13-09-2025_01_31_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26817679 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_P26817679_13-09-2025_01_31_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26817680, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26817681, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26817682, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26817683, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26817684, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26817685, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26817686, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26817687, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26817688, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26817689, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26817690, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26817691, 'pht': 3726}}" where mtr_portfolio_id = 26817679 and dashboard_run_id = 2288740 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 = 26817728 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': 3716095, 'mtr_portfolio_id': 26817728, 'created_at': datetime.datetime(2025, 9, 13, 1, 48, 56), 'result': '0.05199660081697772', 'result_long': None, 'result_double': None}] Qualite : 0.05199660081697772 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26817728 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26817728_13-09-2025_01_48_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26817728 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_P26817728_13-09-2025_01_48_57.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26817731, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26817732, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26817733, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26817734, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26817735, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26817736, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26817737, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26817738, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26817739, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26817740, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26817741, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26817742, 'pht': 3726}}" where mtr_portfolio_id = 26817728 and dashboard_run_id = 2288740 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`=26817728 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15118772, 0.05199660081697772, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26817728_13-09-2025_01_48_57.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26817731, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26817732, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26817733, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26817734, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26817735, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26817736, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26817737, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26817738, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26817739, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26817740, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26817741, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26817742, '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 = 26818070 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': 3716131, 'mtr_portfolio_id': 26818070, 'created_at': datetime.datetime(2025, 9, 13, 2, 11, 1), 'result': '0.03376596674172699', 'result_long': None, 'result_double': None}] Qualite : 0.03376596674172699 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26818070 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26818070_13-09-2025_02_11_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26818070 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_P26818070_13-09-2025_02_11_01.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26818076, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26818077, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26818078, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26818079, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26818080, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26818081, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26818082, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26818083, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26818084, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26818085, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26818086, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26818087, 'pht': 3726}}" where mtr_portfolio_id = 26818070 and dashboard_run_id = 2288740 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`=26818070 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15118773, 0.03376596674172699, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26818070_13-09-2025_02_11_01.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26818076, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26818077, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26818078, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26818079, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26818080, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26818081, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26818082, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26818083, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26818084, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26818085, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26818086, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26818087, '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 = 26818468 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': 3716197, 'mtr_portfolio_id': 26818468, 'created_at': datetime.datetime(2025, 9, 13, 2, 15), 'result': '0.0716726700593665', 'result_long': None, 'result_double': None}] Qualite : 0.0716726700593665 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26818468 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26818468_13-09-2025_02_15_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26818468 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_P26818468_13-09-2025_02_15_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26818471, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26818472, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26818473, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26818474, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26818475, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26818476, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26818477, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26818478, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26818479, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26818480, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26818481, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26818482, 'pht': 3726}}" where mtr_portfolio_id = 26818468 and dashboard_run_id = 2288740 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`=26818468 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15118774, 0.0716726700593665, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26818468_13-09-2025_02_15_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26818471, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26818472, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26818473, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26818474, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26818475, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26818476, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26818477, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26818478, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26818479, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26818480, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26818481, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26818482, '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 (26815062,26815697,26816243,26816834,26817679,26817728,26818070,26818468) result : ((1383587771,), (1383587822,), (1383587863,), (1383587889,), (1383588188,), (1383588190,), (1383588192,), (1383588306,), (1383588310,), (1383588315,), (1383588319,), (1383588331,), (1383588334,), (1383588342,), (1383588343,), (1383588344,), (1383588355,), (1383588370,), (1383588399,), (1383588401,), (1383588402,), (1383588403,), (1383588408,), (1383588440,), (1383588442,), (1383588445,), (1383588448,), (1383588474,), (1383588476,), (1383588482,), (1383588495,), (1383588504,), (1383588508,), (1383588534,), (1383588624,), (1383588625,), (1383588626,), (1383588649,), (1383588651,), (1383588652,), (1383588654,), (1383588658,), (1383588662,), (1383588677,), (1383588679,), (1383588681,), (1383588685,), (1383588697,), (1383588984,), (1383589009,), (1383589034,), (1383589408,), (1383589436,), (1383589468,), (1383589492,), (1383589515,), (1383589818,), (1383589840,), (1383589867,), (1383589895,), (1383589923,), (1383589952,), (1383590051,), (1383590078,), (1383590095,), (1383590099,), (1383590101,), (1383590104,), (1383590108,), (1383590146,), (1383590177,), (1383590201,), (1383590505,), (1383590631,), (1383590460,), (1383590484,), (1383590500,), (1383590502,), (1383590601,), (1383590602,), (1383590604,), (1383590607,), (1383590611,), (1383590615,), (1383590623,), (1383590627,), (1383590630,), (1383590644,), (1383590646,), (1383590649,), (1383590653,), (1383590665,), (1383590666,), (1383590667,), (1383590669,), (1383590672,), (1383590939,), (1383590969,), (1383590998,), (1383591026,), (1383591350,), (1383591378,), (1383591403,), (1383591428,), (1383591738,), (1383591763,), (1383591787,), (1383591816,), (1383592143,), (1383592144,), (1383592147,), (1383592150,), (1383592154,), (1383592157,), (1383592173,), (1383592175,), (1383592181,), (1383592183,), (1383592185,), (1383592188,), (1383592463,), (1383592486,), (1383592529,), (1383592543,), (1383592546,), (1383592730,), (1383592755,), (1383592779,), (1383592808,), (1383592838,), (1383593135,), (1383593166,), (1383593193,), (1383593223,), (1383593315,), (1383593444,), (1383593539,), (1383593580,), (1383593624,), (1383593628,), (1383593633,), (1383593637,), (1383593774,), (1383593786,), (1383593789,), (1383593816,), (1383593826,), (1383593855,), (1383593856,), (1383593858,), (1383593860,), (1383593863,), (1383593901,), (1383593905,), (1383593930,), (1383593933,), (1383593949,), (1383593958,), (1383593994,), (1383593995,), (1383594031,), (1383594057,), (1383593889,), (1383593891,), (1383593893,), (1383593897,), (1383593989,), (1383593990,), (1383593991,), (1383593992,), (1383594008,), (1383594024,), (1383594027,), (1383594029,), (1383594030,), (1383594042,), (1383594044,), (1383594047,), (1383594051,), (1383594054,), (1383594073,), (1383594074,), (1383594075,), (1383594077,), (1383594362,), (1383594391,), (1383594416,), (1383594441,), (1383594469,), (1383594763,), (1383594787,), (1383594815,), (1383594842,), (1383594873,), (1383594901,), (1383595009,), (1383595035,), (1383595064,), (1383595066,), (1383595146,), (1383595180,), (1383595227,), (1383595282,), (1383595683,), (1383595710,), (1383595734,), (1383595763,), (1383595791,), (1383595822,), (1383596075,), (1383596100,), (1383596125,), (1383596140,), (1383596392,), (1383596424,), (1383596447,), (1383596490,), (1383596835,), (1383596865,), (1383596892,), (1383596919,), (1383597180,), (1383597203,), (1383597231,), (1383597258,), (1383597284,), (1383597303,), (1383597346,), (1383597362,), (1383597367,), (1383597377,), (1383597380,), (1383597382,), (1383597386,), (1383597392,), (1383597394,), (1383597409,), (1383597410,), (1383597411,), (1383597414,), (1383597417,), (1383597421,), (1383597447,), (1383597494,), (1383597443,), (1383597445,), (1383597465,), (1383597466,), (1383597469,), (1383597472,), (1383597475,), (1383597478,), (1383597498,), (1383597499,), (1383597500,), (1383597502,), (1383597506,), (1383597510,), (1383597525,), (1383597527,), (1383597528,), (1383597529,), (1383597559,), (1383597564,), (1383597565,), (1383597597,), (1383597599,), (1383597600,), (1383597603,), (1383597608,), (1383597612,), (1383597640,), (1383597646,), (1383597666,), (1383597667,), (1383597668,), (1383597670,), (1383597673,), (1383597676,), (1383597698,), (1383597707,), (1383597795,), (1383597798,), (1383597801,), (1383597805,), (1383597809,), (1383597823,), (1383597824,), (1383597825,), (1383597848,), (1383597851,), (1383597855,), (1383597859,), (1383597868,), (1383597873,), (1383597881,), (1383597888,), (1383599233,), (1383599263,), (1383598752,), (1383599158,), (1383599230,), (1383599232,), (1383599250,), (1383599251,), (1383599252,), (1383599255,), (1383599258,), (1383599274,), (1383599300,), (1383599301,), (1383599302,), (1383599341,), (1383599343,), (1383599344,), (1383599356,), (1383599357,), (1383599358,), (1383599365,), (1383599375,), (1383599381,), (1383599412,), (1383599415,), (1383599416,), (1383599439,), (1383599441,), (1383599442,), (1383599443,), (1383599474,), (1383599476,), (1383599478,), (1383599510,), (1383599511,), (1383599512,), (1383599513,), (1383599542,), (1383599548,), (1383599549,), (1383599577,), (1383599578,), (1383599579,), (1383599585,), (1383599589,), (1383599592,), (1383599611,), (1383599639,), (1383599643,), (1383599645,), (1383599647,), (1383599649,), (1383599653,), (1383599671,), (1383599673,), (1383599675,), (1383599676,), (1383599680,), (1383599714,), (1383599779,), (1383599710,), (1383599712,), (1383599713,), (1383599728,), (1383599729,), (1383599734,), (1383599742,), (1383599747,), (1383599766,), (1383599788,), (1383599790,), (1383599792,), (1383599795,), (1383599799,), (1383599804,), (1383599816,), (1383599819,), (1383599824,), (1383599827,), (1383599845,), (1383599847,), (1383599849,), (1383599852,), (1383599870,), (1383600103,), (1383600502,), (1383600563,), (1383600565,), (1383600591,), (1383600593,), (1383600594,), (1383600620,), (1383600657,), (1383600661,), (1383600679,), (1383600687,), (1383600690,), (1383600697,), (1383600698,), (1383600702,), (1383600704,), (1383600707,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'13092025': {'nb_upload': 16, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26818468]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1383600707, 1383600704, 1383600702, 1383600698, 1383600697, 1383600690, 1383600687, 1383600679, 1383600661, 1383600657, 1383600620] map_info['map_portfolio_photo'] : {26818468: [1383600707, 1383600704, 1383600702, 1383600698, 1383600697, 1383600690, 1383600687, 1383600679, 1383600661, 1383600657, 1383600620, 1383600594, 1383600593, 1383600591, 1383600565, 1383600563]} final : True mtd_id 4302 list_pids : [1383600707, 1383600704, 1383600702, 1383600698, 1383600697, 1383600690, 1383600687, 1383600679, 1383600661, 1383600657, 1383600620] Looping around the photos to save general results len do output : 1 /26818468Didn'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, '3716197') ('4302', '26818468', '1383600707', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600704', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600702', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600698', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600697', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600690', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600687', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600679', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600661', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600657', None, None, None, None, None, '3716197') ('4302', None, None, None, None, None, None, None, '3716197') ('4302', '26818468', '1383600620', None, None, None, None, None, '3716197') 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', None, '26818468', 'None', None, None, None, None, '3716197'), ('4302', '26818468', '1383600707', None, None, None, None, None, '3716197'), ('4302', '26818468', '1383600704', None, None, None, None, None, '3716197'), ('4302', '26818468', '1383600702', None, None, None, None, None, '3716197'), ('4302', '26818468', '1383600698', None, None, None, None, None, '3716197'), ('4302', '26818468', '1383600697', None, None, None, None, None, '3716197'), ('4302', '26818468', '1383600690', None, None, None, None, None, '3716197'), ('4302', '26818468', '1383600687', None, None, None, None, None, '3716197'), ('4302', '26818468', '1383600679', None, None, None, None, None, '3716197'), ('4302', '26818468', '1383600661', None, None, None, None, None, '3716197'), ('4302', '26818468', '1383600657', None, None, None, None, None, '3716197'), ('4302', '26818468', '1383600620', None, None, None, None, None, '3716197')] time used for this insertion : 0.014087200164794922 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.6856520175933838 time spend to save output : 0.014326095581054688 total time spend for step 5 : 0.6999781131744385 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 (3716197) 1.98user 2.48system 0:07.94elapsed 56%CPU (0avgtext+0avgdata 158504maxresident)k 256inputs+6376outputs (12major+64291minor)pagefaults 0swaps