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 : 1265923 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 (4206339) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (4206339) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29323264 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['4206339'] with mtr_portfolio_ids : ['29323264'] and first list_photo_ids : [] new path : /proc/1265923/ Name: python3 Umask: 0002 State: R (running) Tgid: 1265923 Ngid: 0 Pid: 1265923 PPid: 1265922 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1265923 NSpid: 1265923 NSpgid: 1265200 NSsid: 1265200 VmPeak: 1113360 kB VmSize: 1113360 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 105964 kB VmRSS: 105964 kB RssAnon: 66312 kB RssFile: 39652 kB RssShmem: 0 kB VmData: 872088 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130476 kB VmPTE: 564 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: 44 nonvoluntary_ctxt_switches: 124 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1265923', 'Ngid': '0', 'Pid': '1265923', 'PPid': '1265922', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1265923', 'NSpid': '1265923', 'NSpgid': '1265200', 'NSsid': '1265200', 'VmPeak': '1113360 kB', 'VmSize': '1113360 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '105964 kB', 'VmRSS': '105964 kB', 'RssAnon': '66312 kB', 'RssFile': '39652 kB', 'RssShmem': '0 kB', 'VmData': '872088 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130476 kB', 'VmPTE': '564 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': '44', 'nonvoluntary_ctxt_switches': '124'} ('datou_batch_current', '1265923', '1113360', '0', '1113360', '872088', '105964', b'', 'marlene', '4206339') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos_view ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (29323264) 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 (4206339 ) ) 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 (29323264) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1398804185, 'portfolio_id': 29323264}, {'photo_id': 1398804184, 'portfolio_id': 29323264}, {'photo_id': 1398804181, 'portfolio_id': 29323264}, {'photo_id': 1398804180, 'portfolio_id': 29323264}, {'photo_id': 1398804178, 'portfolio_id': 29323264}, {'photo_id': 1398804177, 'portfolio_id': 29323264}, {'photo_id': 1398804161, 'portfolio_id': 29323264}, {'photo_id': 1398804158, 'portfolio_id': 29323264}, {'photo_id': 1398804155, 'portfolio_id': 29323264}, {'photo_id': 1398804152, 'portfolio_id': 29323264}, {'photo_id': 1398804134, 'portfolio_id': 29323264}, {'photo_id': 1398804132, 'portfolio_id': 29323264}, {'photo_id': 1398804039, 'portfolio_id': 29323264}, {'photo_id': 1398804024, 'portfolio_id': 29323264}, {'photo_id': 1398804021, 'portfolio_id': 29323264}, {'photo_id': 1398804018, 'portfolio_id': 29323264}, {'photo_id': 1398804015, 'portfolio_id': 29323264}, {'photo_id': 1398803996, 'portfolio_id': 29323264}, {'photo_id': 1398803992, 'portfolio_id': 29323264}, {'photo_id': 1398803990, 'portfolio_id': 29323264}, {'photo_id': 1398803988, 'portfolio_id': 29323264}, {'photo_id': 1398803973, 'portfolio_id': 29323264}] map_portfolio_id_photo_id: {29323264: [1398804185, 1398804184, 1398804181, 1398804180, 1398804178, 1398804177, 1398804161, 1398804158, 1398804155, 1398804152, 1398804134, 1398804132, 1398804039, 1398804024, 1398804021, 1398804018, 1398804015, 1398803996, 1398803992, 1398803990, 1398803988, 1398803973]} ##### 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.0171511173248291 #### 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 Thu Dec 11 01:46:29 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 (29323264) 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 : 29323264 get user id for portfolio 29323264 get sub ptf for main ptf 29323264, type 3726 and hashtags ['mal_croppe', 'papier', 'Carton_gris', 'environnement', 'cartonnette', 'autre_refus', 'Carton_brun', 'Teint_Dans_La_Masse', 'kraft', 'metal', 'flou', 'plastique'] 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`=29323264 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','papier','Carton_gris','environnement','cartonnette','autre_refus','Carton_brun','Teint_Dans_La_Masse','kraft','metal','flou','plastique')) 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`=29323264 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','papier','Carton_gris','environnement','cartonnette','autre_refus','Carton_brun','Teint_Dans_La_Masse','kraft','metal','flou','plastique')) AND mptpi.`min_score`=0.5 To do returned map {'Teint_Dans_La_Masse': {'main_port_id': 29323264, 'sub_port_id': 29323265, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19963420, 'last_updated_at': datetime.datetime(2025, 12, 11, 1, 44, 30), 'last_updated_at_desc': datetime.datetime(2025, 12, 11, 1, 44, 30), 'last_updated_at_asc': datetime.datetime(2025, 12, 11, 1, 36, 59)}, 'kraft': {'main_port_id': 29323264, 'sub_port_id': 29323266, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19963421, 'last_updated_at': datetime.datetime(2025, 12, 11, 1, 44, 30), 'last_updated_at_desc': datetime.datetime(2025, 12, 11, 1, 44, 30), 'last_updated_at_asc': datetime.datetime(2025, 12, 11, 1, 36, 59)}, 'metal': {'main_port_id': 29323264, 'sub_port_id': 29323267, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19963422, 'last_updated_at': datetime.datetime(2025, 12, 11, 1, 44, 30), 'last_updated_at_desc': datetime.datetime(2025, 12, 11, 1, 44, 30), 'last_updated_at_asc': datetime.datetime(2025, 12, 11, 1, 36, 59)}, 'papier': {'main_port_id': 29323264, 'sub_port_id': 29323268, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19963423, 'last_updated_at': datetime.datetime(2025, 12, 11, 1, 44, 30), 'last_updated_at_desc': datetime.datetime(2025, 12, 11, 1, 44, 30), 'last_updated_at_asc': datetime.datetime(2025, 12, 11, 1, 36, 59)}, 'environnement': {'main_port_id': 29323264, 'sub_port_id': 29323269, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19963424, 'last_updated_at': datetime.datetime(2025, 12, 11, 1, 44, 30), 'last_updated_at_desc': datetime.datetime(2025, 12, 11, 1, 44, 30), 'last_updated_at_asc': datetime.datetime(2025, 12, 11, 1, 36, 59)}, 'plastique': {'main_port_id': 29323264, 'sub_port_id': 29323270, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19963425, 'last_updated_at': datetime.datetime(2025, 12, 11, 1, 44, 30), 'last_updated_at_desc': datetime.datetime(2025, 12, 11, 1, 44, 30), 'last_updated_at_asc': datetime.datetime(2025, 12, 11, 1, 36, 59)}, 'mal_croppe': {'main_port_id': 29323264, 'sub_port_id': 29323271, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19963426, 'last_updated_at': datetime.datetime(2025, 12, 11, 1, 44, 30), 'last_updated_at_desc': datetime.datetime(2025, 12, 11, 1, 44, 30), 'last_updated_at_asc': datetime.datetime(2025, 12, 11, 1, 36, 59)}, 'flou': {'main_port_id': 29323264, 'sub_port_id': 29323272, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19963427, 'last_updated_at': datetime.datetime(2025, 12, 11, 1, 44, 30), 'last_updated_at_desc': datetime.datetime(2025, 12, 11, 1, 44, 30), 'last_updated_at_asc': datetime.datetime(2025, 12, 11, 1, 36, 59)}, 'Carton_gris': {'main_port_id': 29323264, 'sub_port_id': 29323273, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19963428, 'last_updated_at': datetime.datetime(2025, 12, 11, 1, 44, 30), 'last_updated_at_desc': datetime.datetime(2025, 12, 11, 1, 44, 30), 'last_updated_at_asc': datetime.datetime(2025, 12, 11, 1, 36, 59)}, 'cartonnette': {'main_port_id': 29323264, 'sub_port_id': 29323274, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19963429, 'last_updated_at': datetime.datetime(2025, 12, 11, 1, 44, 30), 'last_updated_at_desc': datetime.datetime(2025, 12, 11, 1, 44, 30), 'last_updated_at_asc': datetime.datetime(2025, 12, 11, 1, 36, 59)}, 'Carton_brun': {'main_port_id': 29323264, 'sub_port_id': 29323275, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19963430, 'last_updated_at': datetime.datetime(2025, 12, 11, 1, 44, 30), 'last_updated_at_desc': datetime.datetime(2025, 12, 11, 1, 44, 30), 'last_updated_at_asc': datetime.datetime(2025, 12, 11, 1, 36, 59)}, 'autre_refus': {'main_port_id': 29323264, 'sub_port_id': 29323276, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19963431, 'last_updated_at': datetime.datetime(2025, 12, 11, 1, 44, 30), 'last_updated_at_desc': datetime.datetime(2025, 12, 11, 1, 44, 30), 'last_updated_at_asc': datetime.datetime(2025, 12, 11, 1, 36, 59)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 29323265 , 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=29323264 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 (29323265) result : ((1398804065,), (1398804066,), (1398804067,), (1398804069,), (1398804070,), (1398804072,), (1398804073,), (1398804191,), (1398804200,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29323264) result : ((1398803973,), (1398803988,), (1398803990,), (1398803992,), (1398803996,), (1398804015,), (1398804018,), (1398804021,), (1398804024,), (1398804039,), (1398804132,), (1398804134,), (1398804152,), (1398804155,), (1398804158,), (1398804161,), (1398804177,), (1398804178,), (1398804180,), (1398804181,), (1398804184,), (1398804185,)) 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 29323266 , 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=29323264 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 (29323266) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29323264) result : ((1398803973,), (1398803988,), (1398803990,), (1398803992,), (1398803996,), (1398804015,), (1398804018,), (1398804021,), (1398804024,), (1398804039,), (1398804132,), (1398804134,), (1398804152,), (1398804155,), (1398804158,), (1398804161,), (1398804177,), (1398804178,), (1398804180,), (1398804181,), (1398804184,), (1398804185,)) 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 29323267 , 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=29323264 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 (29323267) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29323264) result : ((1398803973,), (1398803988,), (1398803990,), (1398803992,), (1398803996,), (1398804015,), (1398804018,), (1398804021,), (1398804024,), (1398804039,), (1398804132,), (1398804134,), (1398804152,), (1398804155,), (1398804158,), (1398804161,), (1398804177,), (1398804178,), (1398804180,), (1398804181,), (1398804184,), (1398804185,)) 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 29323268 , 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=29323264 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 (29323268) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29323264) result : ((1398803973,), (1398803988,), (1398803990,), (1398803992,), (1398803996,), (1398804015,), (1398804018,), (1398804021,), (1398804024,), (1398804039,), (1398804132,), (1398804134,), (1398804152,), (1398804155,), (1398804158,), (1398804161,), (1398804177,), (1398804178,), (1398804180,), (1398804181,), (1398804184,), (1398804185,)) 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 29323269 , 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=29323264 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 (29323269) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29323264) result : ((1398803973,), (1398803988,), (1398803990,), (1398803992,), (1398803996,), (1398804015,), (1398804018,), (1398804021,), (1398804024,), (1398804039,), (1398804132,), (1398804134,), (1398804152,), (1398804155,), (1398804158,), (1398804161,), (1398804177,), (1398804178,), (1398804180,), (1398804181,), (1398804184,), (1398804185,)) 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 29323270 , 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=29323264 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 (29323270) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29323264) result : ((1398803973,), (1398803988,), (1398803990,), (1398803992,), (1398803996,), (1398804015,), (1398804018,), (1398804021,), (1398804024,), (1398804039,), (1398804132,), (1398804134,), (1398804152,), (1398804155,), (1398804158,), (1398804161,), (1398804177,), (1398804178,), (1398804180,), (1398804181,), (1398804184,), (1398804185,)) 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 29323271 , 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=29323264 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 (29323271) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29323264) result : ((1398803973,), (1398803988,), (1398803990,), (1398803992,), (1398803996,), (1398804015,), (1398804018,), (1398804021,), (1398804024,), (1398804039,), (1398804132,), (1398804134,), (1398804152,), (1398804155,), (1398804158,), (1398804161,), (1398804177,), (1398804178,), (1398804180,), (1398804181,), (1398804184,), (1398804185,)) 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 29323272 , 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=29323264 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 (29323272) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29323264) result : ((1398803973,), (1398803988,), (1398803990,), (1398803992,), (1398803996,), (1398804015,), (1398804018,), (1398804021,), (1398804024,), (1398804039,), (1398804132,), (1398804134,), (1398804152,), (1398804155,), (1398804158,), (1398804161,), (1398804177,), (1398804178,), (1398804180,), (1398804181,), (1398804184,), (1398804185,)) 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 29323273 , 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=29323264 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 (29323273) result : ((1398804074,), (1398804192,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29323264) result : ((1398803973,), (1398803988,), (1398803990,), (1398803992,), (1398803996,), (1398804015,), (1398804018,), (1398804021,), (1398804024,), (1398804039,), (1398804132,), (1398804134,), (1398804152,), (1398804155,), (1398804158,), (1398804161,), (1398804177,), (1398804178,), (1398804180,), (1398804181,), (1398804184,), (1398804185,)) 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 29323274 , 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=29323264 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 (29323274) result : ((1398804079,), (1398804080,), (1398804193,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29323264) result : ((1398803973,), (1398803988,), (1398803990,), (1398803992,), (1398803996,), (1398804015,), (1398804018,), (1398804021,), (1398804024,), (1398804039,), (1398804132,), (1398804134,), (1398804152,), (1398804155,), (1398804158,), (1398804161,), (1398804177,), (1398804178,), (1398804180,), (1398804181,), (1398804184,), (1398804185,)) 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 29323275 , 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=29323264 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 (29323275) result : ((1398804075,), (1398804201,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29323264) result : ((1398803973,), (1398803988,), (1398803990,), (1398803992,), (1398803996,), (1398804015,), (1398804018,), (1398804021,), (1398804024,), (1398804039,), (1398804132,), (1398804134,), (1398804152,), (1398804155,), (1398804158,), (1398804161,), (1398804177,), (1398804178,), (1398804180,), (1398804181,), (1398804184,), (1398804185,)) 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 29323276 , 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=29323264 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 (29323276) result : ((1398804078,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29323264) result : ((1398803973,), (1398803988,), (1398803990,), (1398803992,), (1398803996,), (1398804015,), (1398804018,), (1398804021,), (1398804024,), (1398804039,), (1398804132,), (1398804134,), (1398804152,), (1398804155,), (1398804158,), (1398804161,), (1398804177,), (1398804178,), (1398804180,), (1398804181,), (1398804184,), (1398804185,)) 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`=29323264 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','papier','Carton_gris','environnement','cartonnette','autre_refus','Carton_brun','Teint_Dans_La_Masse','kraft','metal','flou','plastique')) 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`=29323264 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','papier','Carton_gris','environnement','cartonnette','autre_refus','Carton_brun','Teint_Dans_La_Masse','kraft','metal','flou','plastique')) AND mptpi.`min_score`=0.5 To do returned map {'Teint_Dans_La_Masse': {'main_port_id': 29323264, 'sub_port_id': 29323277, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19963432, 'last_updated_at': datetime.datetime(2025, 12, 11, 1, 37, 1), 'last_updated_at_desc': datetime.datetime(2025, 12, 11, 1, 37, 1), 'last_updated_at_asc': datetime.datetime(2025, 12, 11, 1, 37, 1)}, 'kraft': {'main_port_id': 29323264, 'sub_port_id': 29323278, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19963433, 'last_updated_at': datetime.datetime(2025, 12, 11, 1, 37, 1), 'last_updated_at_desc': datetime.datetime(2025, 12, 11, 1, 37, 1), 'last_updated_at_asc': datetime.datetime(2025, 12, 11, 1, 37, 1)}, 'metal': {'main_port_id': 29323264, 'sub_port_id': 29323279, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19963434, 'last_updated_at': datetime.datetime(2025, 12, 11, 1, 37, 1), 'last_updated_at_desc': datetime.datetime(2025, 12, 11, 1, 37, 1), 'last_updated_at_asc': datetime.datetime(2025, 12, 11, 1, 37, 1)}, 'papier': {'main_port_id': 29323264, 'sub_port_id': 29323280, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19963435, 'last_updated_at': datetime.datetime(2025, 12, 11, 1, 37, 1), 'last_updated_at_desc': datetime.datetime(2025, 12, 11, 1, 37, 1), 'last_updated_at_asc': datetime.datetime(2025, 12, 11, 1, 37, 1)}, 'environnement': {'main_port_id': 29323264, 'sub_port_id': 29323281, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19963436, 'last_updated_at': datetime.datetime(2025, 12, 11, 1, 37, 1), 'last_updated_at_desc': datetime.datetime(2025, 12, 11, 1, 37, 1), 'last_updated_at_asc': datetime.datetime(2025, 12, 11, 1, 37, 1)}, 'plastique': {'main_port_id': 29323264, 'sub_port_id': 29323282, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19963437, 'last_updated_at': datetime.datetime(2025, 12, 11, 1, 37, 1), 'last_updated_at_desc': datetime.datetime(2025, 12, 11, 1, 37, 1), 'last_updated_at_asc': datetime.datetime(2025, 12, 11, 1, 37, 1)}, 'mal_croppe': {'main_port_id': 29323264, 'sub_port_id': 29323283, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19963438, 'last_updated_at': datetime.datetime(2025, 12, 11, 1, 37, 1), 'last_updated_at_desc': datetime.datetime(2025, 12, 11, 1, 37, 1), 'last_updated_at_asc': datetime.datetime(2025, 12, 11, 1, 37, 1)}, 'flou': {'main_port_id': 29323264, 'sub_port_id': 29323284, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19963439, 'last_updated_at': datetime.datetime(2025, 12, 11, 1, 37, 1), 'last_updated_at_desc': datetime.datetime(2025, 12, 11, 1, 37, 1), 'last_updated_at_asc': datetime.datetime(2025, 12, 11, 1, 37, 1)}, 'Carton_gris': {'main_port_id': 29323264, 'sub_port_id': 29323285, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19963440, 'last_updated_at': datetime.datetime(2025, 12, 11, 1, 37, 1), 'last_updated_at_desc': datetime.datetime(2025, 12, 11, 1, 37, 1), 'last_updated_at_asc': datetime.datetime(2025, 12, 11, 1, 37, 1)}, 'cartonnette': {'main_port_id': 29323264, 'sub_port_id': 29323286, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19963441, 'last_updated_at': datetime.datetime(2025, 12, 11, 1, 37, 1), 'last_updated_at_desc': datetime.datetime(2025, 12, 11, 1, 37, 1), 'last_updated_at_asc': datetime.datetime(2025, 12, 11, 1, 37, 1)}, 'Carton_brun': {'main_port_id': 29323264, 'sub_port_id': 29323287, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19963442, 'last_updated_at': datetime.datetime(2025, 12, 11, 1, 37, 1), 'last_updated_at_desc': datetime.datetime(2025, 12, 11, 1, 37, 1), 'last_updated_at_asc': datetime.datetime(2025, 12, 11, 1, 37, 1)}, 'autre_refus': {'main_port_id': 29323264, 'sub_port_id': 29323288, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19963443, 'last_updated_at': datetime.datetime(2025, 12, 11, 1, 44, 30), 'last_updated_at_desc': datetime.datetime(2025, 12, 11, 1, 44, 30), 'last_updated_at_asc': datetime.datetime(2025, 12, 11, 1, 37, 1)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29323277,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29323265 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29323278,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29323266 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29323279,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29323267 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29323280,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29323268 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29323281,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29323269 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29323282,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29323270 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29323283,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29323271 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29323284,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29323272 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29323285,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29323273 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29323286,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29323274 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29323287,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29323275 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29323288,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29323276 lien utilise dans velours : https://marlene.fotonower.com/velours/29323277,29323278,29323279,29323280,29323281,29323282,29323283,29323284,29323285,29323286,29323287,29323288?tags=Teint_Dans_La_Masse,kraft,metal,papier,environnement,plastique,mal_croppe,flou,Carton_gris,cartonnette,Carton_brun,autre_refus After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29323264]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1398804185, 1398804184, 1398804181, 1398804180, 1398804178, 1398804177] map_info['map_portfolio_photo'] : {29323264: [1398804185, 1398804184, 1398804181, 1398804180, 1398804178, 1398804177, 1398804161, 1398804158, 1398804155, 1398804152, 1398804134, 1398804132, 1398804039, 1398804024, 1398804021, 1398804018, 1398804015, 1398803996, 1398803992, 1398803990, 1398803988, 1398803973]} final : False mtd_id 4302 list_pids : [1398804185, 1398804184, 1398804181, 1398804180, 1398804178, 1398804177] Looping around the photos to save general results len do output : 1 /29323264. 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, '4206339') ('4302', '29323264', '1398804185', None, None, None, None, None, '4206339') ('4302', None, None, None, None, None, None, None, '4206339') ('4302', '29323264', '1398804184', None, None, None, None, None, '4206339') ('4302', None, None, None, None, None, None, None, '4206339') ('4302', '29323264', '1398804181', None, None, None, None, None, '4206339') ('4302', None, None, None, None, None, None, None, '4206339') ('4302', '29323264', '1398804180', None, None, None, None, None, '4206339') ('4302', None, None, None, None, None, None, None, '4206339') ('4302', '29323264', '1398804178', None, None, None, None, None, '4206339') ('4302', None, None, None, None, None, None, None, '4206339') ('4302', '29323264', '1398804177', None, None, None, None, None, '4206339') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '29323264', "{'Teint_Dans_La_Masse': 29323265, 'kraft': 29323266, 'metal': 29323267, 'papier': 29323268, 'environnement': 29323269, 'plastique': 29323270, 'mal_croppe': 29323271, 'flou': 29323272, 'Carton_gris': 29323273, 'cartonnette': 29323274, 'Carton_brun': 29323275, 'autre_refus': 29323276}", None, None, None, None, '4206339'), ('4302', '29323264', '1398804185', None, None, None, None, None, '4206339'), ('4302', '29323264', '1398804184', None, None, None, None, None, '4206339'), ('4302', '29323264', '1398804181', None, None, None, None, None, '4206339'), ('4302', '29323264', '1398804180', None, None, None, None, None, '4206339'), ('4302', '29323264', '1398804178', None, None, None, None, None, '4206339'), ('4302', '29323264', '1398804177', None, None, None, None, None, '4206339')] time used for this insertion : 0.01370382308959961 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.9021437168121338 time spend to save output : 0.013957738876342773 total time spend for step 1 : 1.9161014556884766 step2:final Thu Dec 11 01:46:31 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 (29323264) 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 29323264 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1398803973,1398803996,1398803992,1398803990,1398803988,1398804024,1398804021,1398804018,1398804015,1398804039,1398804134,1398804132,1398804161,1398804158,1398804155,1398804152,1398804185,1398804184,1398804181,1398804180,1398804178,1398804177); 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([29323264]) Inside saveOutput : final : False verbose : True original output for save of step final : {1398804185: ('0.04240788600433971',), 1398804184: ('0.04240788600433971',), 1398804181: ('0.04240788600433971',), 1398804180: ('0.04240788600433971',), 1398804178: ('0.04240788600433971',), 1398804177: ('0.04240788600433971',)} new output for save of step final : {1398804185: ('0.04240788600433971',), 1398804184: ('0.04240788600433971',), 1398804181: ('0.04240788600433971',), 1398804180: ('0.04240788600433971',), 1398804178: ('0.04240788600433971',), 1398804177: ('0.04240788600433971',)} [1398804185, 1398804184, 1398804181, 1398804180, 1398804178, 1398804177] map_info['map_portfolio_photo'] : {29323264: [1398804185, 1398804184, 1398804181, 1398804180, 1398804178, 1398804177, 1398804161, 1398804158, 1398804155, 1398804152, 1398804134, 1398804132, 1398804039, 1398804024, 1398804021, 1398804018, 1398804015, 1398803996, 1398803992, 1398803990, 1398803988, 1398803973]} final : False mtd_id 4302 list_pids : [1398804185, 1398804184, 1398804181, 1398804180, 1398804178, 1398804177] Looping around the photos to save general results len do output : 6 /1398804185.Didn't retrieve data . /1398804184.Didn't retrieve data . /1398804181.Didn't retrieve data . /1398804180.Didn't retrieve data . /1398804178.Didn't retrieve data . /1398804177.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, '4206339') ('4302', '29323264', '1398804185', None, None, None, None, None, '4206339') ('4302', None, None, None, None, None, None, None, '4206339') ('4302', '29323264', '1398804184', None, None, None, None, None, '4206339') ('4302', None, None, None, None, None, None, None, '4206339') ('4302', '29323264', '1398804181', None, None, None, None, None, '4206339') ('4302', None, None, None, None, None, None, None, '4206339') ('4302', '29323264', '1398804180', None, None, None, None, None, '4206339') ('4302', None, None, None, None, None, None, None, '4206339') ('4302', '29323264', '1398804178', None, None, None, None, None, '4206339') ('4302', None, None, None, None, None, None, None, '4206339') ('4302', '29323264', '1398804177', None, None, None, None, None, '4206339') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 18 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '29323264', '1398804185', '0.04240788600433971', None, None, None, None, '4206339'), ('4302', '29323264', '1398804184', '0.04240788600433971', None, None, None, None, '4206339'), ('4302', '29323264', '1398804181', '0.04240788600433971', None, None, None, None, '4206339'), ('4302', '29323264', '1398804180', '0.04240788600433971', None, None, None, None, '4206339'), ('4302', '29323264', '1398804178', '0.04240788600433971', None, None, None, None, '4206339'), ('4302', '29323264', '1398804177', '0.04240788600433971', None, None, None, None, '4206339')] time used for this insertion : 0.01444244384765625 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.07808637619018555 time spend to save output : 0.014897584915161133 total time spend for step 2 : 0.09298396110534668 step3:velours_tree Thu Dec 11 01:46:31 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 : {29323264: [{'Teint_Dans_La_Masse': 29323265, 'kraft': 29323266, 'metal': 29323267, 'papier': 29323268, 'environnement': 29323269, 'plastique': 29323270, 'mal_croppe': 29323271, 'flou': 29323272, 'Carton_gris': 29323273, 'cartonnette': 29323274, 'Carton_brun': 29323275, 'autre_refus': 29323276}]} input_args_next_step : {29323264: ()} output_args : {29323264: [{'Teint_Dans_La_Masse': 29323265, 'kraft': 29323266, 'metal': 29323267, 'papier': 29323268, 'environnement': 29323269, 'plastique': 29323270, 'mal_croppe': 29323271, 'flou': 29323272, 'Carton_gris': 29323273, 'cartonnette': 29323274, 'Carton_brun': 29323275, 'autre_refus': 29323276}]} args : 29323264 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 : ({'Teint_Dans_La_Masse': 29323265, 'kraft': 29323266, 'metal': 29323267, 'papier': 29323268, 'environnement': 29323269, 'plastique': 29323270, 'mal_croppe': 29323271, 'flou': 29323272, 'Carton_gris': 29323273, 'cartonnette': 29323274, 'Carton_brun': 29323275, 'autre_refus': 29323276},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29323264) 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([29323264]) 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.2711219787597656 time spend to save output : 5.7220458984375e-05 total time spend for step 3 : 0.27117919921875 step4:send_mail_cod Thu Dec 11 01:46:31 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 : {1398804185: ('0.04240788600433971',), 1398804184: ('0.04240788600433971',), 1398804181: ('0.04240788600433971',), 1398804180: ('0.04240788600433971',), 1398804178: ('0.04240788600433971',), 1398804177: ('0.04240788600433971',)} input_args_next_step : {1398804185: ()} output_args : {1398804185: ('0.04240788600433971',), 1398804184: ('0.04240788600433971',), 1398804181: ('0.04240788600433971',), 1398804180: ('0.04240788600433971',), 1398804178: ('0.04240788600433971',), 1398804177: ('0.04240788600433971',)} args : 1398804185 depend.output_id : 0 input_args_next_step : {1398804185: ('0.04240788600433971',), 1398804184: ()} output_args : {1398804185: ('0.04240788600433971',), 1398804184: ('0.04240788600433971',), 1398804181: ('0.04240788600433971',), 1398804180: ('0.04240788600433971',), 1398804178: ('0.04240788600433971',), 1398804177: ('0.04240788600433971',)} args : 1398804184 depend.output_id : 0 input_args_next_step : {1398804185: ('0.04240788600433971',), 1398804184: ('0.04240788600433971',), 1398804181: ()} output_args : {1398804185: ('0.04240788600433971',), 1398804184: ('0.04240788600433971',), 1398804181: ('0.04240788600433971',), 1398804180: ('0.04240788600433971',), 1398804178: ('0.04240788600433971',), 1398804177: ('0.04240788600433971',)} args : 1398804181 depend.output_id : 0 input_args_next_step : {1398804185: ('0.04240788600433971',), 1398804184: ('0.04240788600433971',), 1398804181: ('0.04240788600433971',), 1398804180: ()} output_args : {1398804185: ('0.04240788600433971',), 1398804184: ('0.04240788600433971',), 1398804181: ('0.04240788600433971',), 1398804180: ('0.04240788600433971',), 1398804178: ('0.04240788600433971',), 1398804177: ('0.04240788600433971',)} args : 1398804180 depend.output_id : 0 input_args_next_step : {1398804185: ('0.04240788600433971',), 1398804184: ('0.04240788600433971',), 1398804181: ('0.04240788600433971',), 1398804180: ('0.04240788600433971',), 1398804178: ()} output_args : {1398804185: ('0.04240788600433971',), 1398804184: ('0.04240788600433971',), 1398804181: ('0.04240788600433971',), 1398804180: ('0.04240788600433971',), 1398804178: ('0.04240788600433971',), 1398804177: ('0.04240788600433971',)} args : 1398804178 depend.output_id : 0 input_args_next_step : {1398804185: ('0.04240788600433971',), 1398804184: ('0.04240788600433971',), 1398804181: ('0.04240788600433971',), 1398804180: ('0.04240788600433971',), 1398804178: ('0.04240788600433971',), 1398804177: ()} output_args : {1398804185: ('0.04240788600433971',), 1398804184: ('0.04240788600433971',), 1398804181: ('0.04240788600433971',), 1398804180: ('0.04240788600433971',), 1398804178: ('0.04240788600433971',), 1398804177: ('0.04240788600433971',)} args : 1398804177 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 : {29323264: [{'Teint_Dans_La_Masse': 29323265, 'kraft': 29323266, 'metal': 29323267, 'papier': 29323268, 'environnement': 29323269, 'plastique': 29323270, 'mal_croppe': 29323271, 'flou': 29323272, 'Carton_gris': 29323273, 'cartonnette': 29323274, 'Carton_brun': 29323275, 'autre_refus': 29323276}]} input_args_next_step : {1398804185: ('0.04240788600433971',), 1398804184: ('0.04240788600433971',), 1398804181: ('0.04240788600433971',), 1398804180: ('0.04240788600433971',), 1398804178: ('0.04240788600433971',), 1398804177: ('0.04240788600433971',), 29323264: ()} output_args : {29323264: [{'Teint_Dans_La_Masse': 29323265, 'kraft': 29323266, 'metal': 29323267, 'papier': 29323268, 'environnement': 29323269, 'plastique': 29323270, 'mal_croppe': 29323271, 'flou': 29323272, 'Carton_gris': 29323273, 'cartonnette': 29323274, 'Carton_brun': 29323275, 'autre_refus': 29323276}]} args : 29323264 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :7, first value : ('0.04240788600433971',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29323264) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos_view ph WHERE photo_id IN (1398804185,1398804184,1398804181,1398804180,1398804178,1398804177) Found this number of photos: 6 ##### Call download_photos : nb_thread : 5 begin to download photo : 1398804177 begin to download photo : 1398804180 begin to download photo : 1398804184 download finish for photo 1398804184 begin to download photo : 1398804185 download finish for photo 1398804177 begin to download photo : 1398804178 download finish for photo 1398804180 begin to download photo : 1398804181 download finish for photo 1398804185 download finish for photo 1398804178 download finish for photo 1398804181 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette293232661765413992/ imagette293232671765413992/ imagette293232701765413992/ imagette293232711765413992/ imagette293232721765413992/ length of list_filenames : 6 ; length of list_pids : 6 ; length of list_args : 6 results_Auto_P29323264_11-12-2025_01_46_32.pdf 29323266 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29323266 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette293232661765413992 29323267 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29323267 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette293232671765413992 29323270 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29323270 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette293232701765413992 29323271 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29323271 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette293232711765413992 29323272 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29323272 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette293232721765413992 29323274 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29323274 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1398804079: '1765413565_596482_1398803990_d66b08a11da0a6b81f810da17eca04e8_rle_crop_4065702407_0.png', 1398804080: '1765413565_596482_1398803988_b377729264ea88b93ddfaddf4a9fce3d_rle_crop_4065702420_0.png', 1398804193: '1765413906_603013_1398804152_58f5d2ecb45f49e4537301bcdc94bc55_rle_crop_4065702535_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/11/64ee4e1b460f8119ad4b84cac4e78421_27114828.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/11/137556f36519b91c6848abcd85c1843a_64011644.png change filename to text .imagette293232741765413992/ imagette293232741765413992/1765413565_596482_1398803988_b377729264ea88b93ddfaddf4a9fce3d_rle_crop_4065702420_0.png.png imagette293232741765413992/1765413565_596482_1398803990_d66b08a11da0a6b81f810da17eca04e8_rle_crop_4065702407_0.png.png imagette293232741765413992/1765413906_603013_1398804152_58f5d2ecb45f49e4537301bcdc94bc55_rle_crop_4065702535_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/11/935240d8510825773f0bf55e066e9e05_88711786.png imagette293232741765413992 29323276 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29323276 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1398804078: '1765413565_596482_1398803990_d66b08a11da0a6b81f810da17eca04e8_rle_crop_4065702408_0.png'} change filename to text .imagette293232761765413992/ imagette293232761765413992/1765413565_596482_1398803990_d66b08a11da0a6b81f810da17eca04e8_rle_crop_4065702408_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/11/92e4a306247fcf385d3c16d643c81f34_21881980.png imagette293232761765413992 29323265 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29323265 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1398804065: '1765413546_596127_1398804039_1d710773dd22a57339487f8a80bb03e6_rle_crop_4065702243_0.png', 1398804066: '1765413546_596127_1398804039_1d710773dd22a57339487f8a80bb03e6_rle_crop_4065702240_0.png', 1398804067: '1765413546_596127_1398804021_a36126ad4827cc5724e032f5ff20cd2d_rle_crop_4065702262_0.png', 1398804069: '1765413546_596127_1398804018_bf8d34141bd8dacac5527365f48af8fa_rle_crop_4065702276_0.png', 1398804070: '1765413546_596127_1398804018_bf8d34141bd8dacac5527365f48af8fa_rle_crop_4065702274_0.png', 1398804072: '1765413546_596127_1398804015_7a05d5274c6dea5e85891d5021e95881_rle_crop_4065702286_0.png', 1398804073: '1765413546_596127_1398804015_7a05d5274c6dea5e85891d5021e95881_rle_crop_4065702285_0.png', 1398804191: '1765413906_603013_1398804152_58f5d2ecb45f49e4537301bcdc94bc55_rle_crop_4065702546_0.png', 1398804200: '1765413927_603412_1398804132_38c28b782c99c7f15ac58340e4f02eb6_rle_crop_4065702636_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/11/26b7ef382d204c4a282ffc068a5e36eb_65439253.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/11/c31eb556c778a72f2bf1274c3427d9ed_67831194.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/11/5851b700b970c7e77fc2eb960e5f99a2_37877133.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/11/4b6effc0d6cdfef22681cb22d69212ef_48597983.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/11/c3a843b3d24a17ebb8a618c235878056_77168458.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/11/0d8d433101d1ff385fcfe346ca790949_54189412.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/11/b9716ec74eafddc0d548c0bf822ef26f_88206290.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/11/00a924bef593799df43ba2339399fae4_26799218.png change filename to text .imagette293232651765413992/ imagette293232651765413992/1765413546_596127_1398804018_bf8d34141bd8dacac5527365f48af8fa_rle_crop_4065702274_0.png.png imagette293232651765413992/1765413546_596127_1398804039_1d710773dd22a57339487f8a80bb03e6_rle_crop_4065702243_0.png.png imagette293232651765413992/1765413546_596127_1398804015_7a05d5274c6dea5e85891d5021e95881_rle_crop_4065702285_0.png.png imagette293232651765413992/1765413546_596127_1398804021_a36126ad4827cc5724e032f5ff20cd2d_rle_crop_4065702262_0.png.png imagette293232651765413992/1765413546_596127_1398804015_7a05d5274c6dea5e85891d5021e95881_rle_crop_4065702286_0.png.png imagette293232651765413992/1765413546_596127_1398804039_1d710773dd22a57339487f8a80bb03e6_rle_crop_4065702240_0.png.png imagette293232651765413992/1765413546_596127_1398804018_bf8d34141bd8dacac5527365f48af8fa_rle_crop_4065702276_0.png.png imagette293232651765413992/1765413906_603013_1398804152_58f5d2ecb45f49e4537301bcdc94bc55_rle_crop_4065702546_0.png.png imagette293232651765413992/1765413927_603412_1398804132_38c28b782c99c7f15ac58340e4f02eb6_rle_crop_4065702636_0.png.png wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/11/5a598d4d585e68e502f3c8a79b224904_16540941.png imagette293232651765413992 29323273 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29323273 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1398804074: '1765413546_596127_1398804018_bf8d34141bd8dacac5527365f48af8fa_rle_crop_4065702267_0.png', 1398804192: '1765413906_603013_1398804152_58f5d2ecb45f49e4537301bcdc94bc55_rle_crop_4065702537_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/11/9865de0594e7908cb2b9483d35fc6462_74137130.png change filename to text .imagette293232731765413993/ imagette293232731765413993/1765413546_596127_1398804018_bf8d34141bd8dacac5527365f48af8fa_rle_crop_4065702267_0.png.png imagette293232731765413993/1765413906_603013_1398804152_58f5d2ecb45f49e4537301bcdc94bc55_rle_crop_4065702537_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/11/15257ff010ae4ac039428b2b2d962b2e_38571979.png imagette293232731765413993 29323275 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29323275 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1398804075: '1765413546_596127_1398804018_bf8d34141bd8dacac5527365f48af8fa_rle_crop_4065702268_0.png', 1398804201: '1765413927_603412_1398804161_05c1a0d865af79dee98628c568dd6736_rle_crop_4065702615_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/11/741b119ca1b7a1b20ba7dbe4ac29c0b7_51193518.png change filename to text .imagette293232751765413993/ imagette293232751765413993/1765413927_603412_1398804161_05c1a0d865af79dee98628c568dd6736_rle_crop_4065702615_0.png.png imagette293232751765413993/1765413546_596127_1398804018_bf8d34141bd8dacac5527365f48af8fa_rle_crop_4065702268_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/11/38141134003d08e3242c32448e0ea8b2_65580450.png imagette293232751765413993 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=29323264 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/29323277,29323278,29323279,29323280,29323281,29323282,29323283,29323284,29323285,29323286,29323287,29323288?tags=Teint_Dans_La_Masse,kraft,metal,papier,environnement,plastique,mal_croppe,flou,Carton_gris,cartonnette,Carton_brun,autre_refus your option no_mail is active, we will not send the real mail to your client args[1398804185] : ('0.04240788600433971',) no score found for photo 1398804185 We are sending mail with results at report@fotonower.com args[1398804184] : ('0.04240788600433971',) no score found for photo 1398804184 We are sending mail with results at report@fotonower.com args[1398804181] : ('0.04240788600433971',) no score found for photo 1398804181 We are sending mail with results at report@fotonower.com args[1398804180] : ('0.04240788600433971',) no score found for photo 1398804180 We are sending mail with results at report@fotonower.com args[1398804178] : ('0.04240788600433971',) no score found for photo 1398804178 We are sending mail with results at report@fotonower.com args[1398804177] : ('0.04240788600433971',) no score found for photo 1398804177 We are sending mail with results at report@fotonower.com refus_total : 0.04240788600433971 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29323264 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_P29323264_11-12-2025_01_46_32.pdf results_Auto_P29323264_11-12-2025_01_46_32.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29323264_11-12-2025_01_46_32.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','29323264','results_Auto_P29323264_11-12-2025_01_46_32.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29323264_11-12-2025_01_46_32.pdf','pdf','','0.12','0.04240788600433971') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29323264]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1398804185, 1398804184, 1398804181, 1398804180, 1398804178, 1398804177] map_info['map_portfolio_photo'] : {29323264: [1398804185, 1398804184, 1398804181, 1398804180, 1398804178, 1398804177, 1398804161, 1398804158, 1398804155, 1398804152, 1398804134, 1398804132, 1398804039, 1398804024, 1398804021, 1398804018, 1398804015, 1398803996, 1398803992, 1398803990, 1398803988, 1398803973]} final : False mtd_id 4302 list_pids : [1398804185, 1398804184, 1398804181, 1398804180, 1398804178, 1398804177] 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, '4206339') ('4302', '29323264', '1398804185', None, None, None, None, None, '4206339') ('4302', None, None, None, None, None, None, None, '4206339') ('4302', '29323264', '1398804184', None, None, None, None, None, '4206339') ('4302', None, None, None, None, None, None, None, '4206339') ('4302', '29323264', '1398804181', None, None, None, None, None, '4206339') ('4302', None, None, None, None, None, None, None, '4206339') ('4302', '29323264', '1398804180', None, None, None, None, None, '4206339') ('4302', None, None, None, None, None, None, None, '4206339') ('4302', '29323264', '1398804178', None, None, None, None, None, '4206339') ('4302', None, None, None, None, None, None, None, '4206339') ('4302', '29323264', '1398804177', None, None, None, None, None, '4206339') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '29323264', '1398804185', None, None, None, None, None, '4206339'), ('4302', '29323264', '1398804184', None, None, None, None, None, '4206339'), ('4302', '29323264', '1398804181', None, None, None, None, None, '4206339'), ('4302', '29323264', '1398804180', None, None, None, None, None, '4206339'), ('4302', '29323264', '1398804178', None, None, None, None, None, '4206339'), ('4302', '29323264', '1398804177', None, None, None, None, None, '4206339')] time used for this insertion : 0.013612747192382812 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.6290276050567627 time spend to save output : 0.013799905776977539 total time spend for step 4 : 2.6428275108337402 step5:split_time_score Thu Dec 11 01:46:34 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 : ['29323264'] 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 : [('29323264',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29323264) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1398804184: {'path': 'temp/1765413991_1265923_1398804184_7c654a6929783085160cb8bf876866e9.jpg', 'extension': 'jpg'}, 1398804185: {'path': 'temp/1765413991_1265923_1398804185_c042ed43ec91d820596491e81fc15967.jpg', 'extension': 'jpg'}, 1398804177: {'path': 'temp/1765413991_1265923_1398804177_45de984e1d6651a1e6725e448018ceb2.jpg', 'extension': 'jpg'}, 1398804178: {'path': 'temp/1765413991_1265923_1398804178_88e3f378093fbdce6b68628aeb3ec235.jpg', 'extension': 'jpg'}, 1398804180: {'path': 'temp/1765413991_1265923_1398804180_6047d1cfdec354ced4b5a8834404b750.jpg', 'extension': 'jpg'}, 1398804181: {'path': 'temp/1765413991_1265923_1398804181_8743847afe28a4265ef2d420746cbb07.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 = 29323264; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm',)) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos_view ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 29323264 group by h (('01', 22),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29323264 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 (29323264) 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 (29323264) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 11122025 29323264 Nombre de photos uploadées : 22 / 23040 (0%) 11122025 29323264 Nombre de photos taguées (types de déchets): 0 / 22 (0%) 11122025 29323264 Nombre de photos taguées (volume) : 0 / 22 (0%) [{'photo_id': 1398803973, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/11/9ec5be59a46dd982f06c9bcf06b2c1f6.jpg', 'username': None, 'uploaded_at': 1765413312, 'text': 'image_11122025_01_33_54_10142.jpg'}, {'photo_id': 1398803996, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/11/45629a2ab6c06ca6dfa8c4f687f88b03.jpg', 'username': None, 'uploaded_at': 1765413373, 'text': 'image_11122025_01_34_04_10156.jpg'}, {'photo_id': 1398803992, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/11/d7de0ed46f08536d92c2595ac3e4f7cf.jpg', 'username': None, 'uploaded_at': 1765413373, 'text': 'image_11122025_01_35_24_010138m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1398803990, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/11/d66b08a11da0a6b81f810da17eca04e8.jpg', 'username': None, 'uploaded_at': 1765413373, 'text': 'image_11122025_01_35_34_010144m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 1.430511474609375e-06 elapsed_time : order_list_meta_photo_and_scores 4.76837158203125e-06 ?????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0009875297546386719 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 29323264, '2025-12-11' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 10 and date = '2025-12-11' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2719645,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.2377769947052002 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= 2719645 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2719645, 'dashboard_run_id': 2726588, 'mtr_portfolio_id': 29321646, 'dashboard_result_id': 18236270, '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_P29321646_11-12-2025_00_19_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29321650, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29321651, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29321652, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29321653, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29321654, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29321655, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29321656, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29321657, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29321658, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29321659, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29321660, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29321661, 'pht': 3726}}"}, {'dashboat_entry_day': 2719645, 'dashboard_run_id': 2726588, 'mtr_portfolio_id': 29322119, 'dashboard_result_id': 18236271, '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_P29322119_11-12-2025_00_32_31.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29322123, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29322124, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29322125, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29322126, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29322127, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29322128, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29322129, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29322130, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29322131, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29322132, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29322133, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29322134, 'pht': 3726}}"}, {'dashboat_entry_day': 2719645, 'dashboard_run_id': 2726588, 'mtr_portfolio_id': 29322398, 'dashboard_result_id': 18236272, '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_P29322398_11-12-2025_00_49_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29322400, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29322401, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29322402, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29322403, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29322404, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29322405, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29322406, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29322407, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29322408, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29322409, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29322410, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29322411, 'pht': 3726}}"}, {'dashboat_entry_day': 2719645, 'dashboard_run_id': 2726588, 'mtr_portfolio_id': 29322629, 'dashboard_result_id': 18236273, '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_P29322629_11-12-2025_00_56_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29322634, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29322635, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29322636, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29322637, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29322638, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29322639, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29322640, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29322641, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29322642, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29322643, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29322644, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29322645, 'pht': 3726}}"}, {'dashboat_entry_day': 2719645, 'dashboard_run_id': 2726588, 'mtr_portfolio_id': 29323264, 'dashboard_result_id': 18236274, '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_P29323264_11-12-2025_01_44_31.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29323265, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29323266, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29323267, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29323268, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29323269, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29323270, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29323271, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29323272, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29323273, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29323274, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29323275, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29323276, 'pht': 3726}}"}] SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 29321646 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': 4206107, 'mtr_portfolio_id': 29321646, 'created_at': datetime.datetime(2025, 12, 11, 0, 19, 1), 'result': '0.0748543639238975', 'result_long': None, 'result_double': None}] Qualite : 0.0748543639238975 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29321646 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29321646_11-12-2025_00_19_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29321646 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_P29321646_11-12-2025_00_19_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29321650, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29321651, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29321652, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29321653, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29321654, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29321655, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29321656, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29321657, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29321658, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29321659, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29321660, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29321661, 'pht': 3726}}" where mtr_portfolio_id = 29321646 and dashboard_run_id = 2726588 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`=29321646 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18236270, 0.0748543639238975, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29321646_11-12-2025_00_19_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29321650, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29321651, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29321652, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29321653, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29321654, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29321655, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29321656, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29321657, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29321658, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29321659, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29321660, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29321661, '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 = 29322119 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': 4206172, 'mtr_portfolio_id': 29322119, 'created_at': datetime.datetime(2025, 12, 11, 0, 32, 30), 'result': '0.0484988516330043', 'result_long': None, 'result_double': None}] Qualite : 0.0484988516330043 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29322119 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29322119_11-12-2025_00_32_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29322119 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_P29322119_11-12-2025_00_32_31.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29322123, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29322124, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29322125, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29322126, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29322127, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29322128, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29322129, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29322130, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29322131, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29322132, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29322133, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29322134, 'pht': 3726}}" where mtr_portfolio_id = 29322119 and dashboard_run_id = 2726588 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`=29322119 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18236271, 0.0484988516330043, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29322119_11-12-2025_00_32_31.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29322123, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29322124, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29322125, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29322126, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29322127, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29322128, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29322129, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29322130, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29322131, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29322132, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29322133, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29322134, '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 = 29322398 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': 4206214, 'mtr_portfolio_id': 29322398, 'created_at': datetime.datetime(2025, 12, 11, 0, 49), 'result': '0.05766641418264097', 'result_long': None, 'result_double': None}] Qualite : 0.05766641418264097 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29322398 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29322398_11-12-2025_00_49_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29322398 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_P29322398_11-12-2025_00_49_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29322400, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29322401, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29322402, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29322403, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29322404, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29322405, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29322406, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29322407, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29322408, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29322409, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29322410, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29322411, 'pht': 3726}}" where mtr_portfolio_id = 29322398 and dashboard_run_id = 2726588 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`=29322398 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18236272, 0.05766641418264097, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29322398_11-12-2025_00_49_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29322400, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29322401, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29322402, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29322403, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29322404, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29322405, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29322406, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29322407, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29322408, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29322409, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29322410, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29322411, '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 = 29322629 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': 4206243, 'mtr_portfolio_id': 29322629, 'created_at': datetime.datetime(2025, 12, 11, 1, 10, 32), 'result': '0.047590507341236356', 'result_long': None, 'result_double': None}] Qualite : 0.047590507341236356 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29322629 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29322629_11-12-2025_01_10_32.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29322629 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_P29322629_11-12-2025_01_10_32.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29322634, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29322635, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29322636, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29322637, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29322638, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29322639, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29322640, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29322641, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29322642, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29322643, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29322644, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29322645, 'pht': 3726}}" where mtr_portfolio_id = 29322629 and dashboard_run_id = 2726588 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`=29322629 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18236273, 0.047590507341236356, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29322629_11-12-2025_01_10_32.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29322634, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29322635, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29322636, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29322637, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29322638, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29322639, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29322640, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29322641, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29322642, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29322643, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29322644, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29322645, '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 = 29323264 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': 4206339, 'mtr_portfolio_id': 29323264, 'created_at': datetime.datetime(2025, 12, 11, 1, 46, 31), 'result': '0.04240788600433971', 'result_long': None, 'result_double': None}] Qualite : 0.04240788600433971 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29323264 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29323264_11-12-2025_01_46_32.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29323264 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_P29323264_11-12-2025_01_46_32.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29323265, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29323266, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29323267, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29323268, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29323269, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29323270, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29323271, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29323272, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29323273, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29323274, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29323275, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29323276, 'pht': 3726}}" where mtr_portfolio_id = 29323264 and dashboard_run_id = 2726588 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`=29323264 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18236274, 0.04240788600433971, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29323264_11-12-2025_01_46_32.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29323265, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29323266, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29323267, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29323268, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29323269, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29323270, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29323271, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29323272, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29323273, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29323274, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29323275, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29323276, '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 (29321646,29322119,29322398,29322629,29323264) result : ((1398797446,), (1398797448,), (1398797462,), (1398797465,), (1398797468,), (1398797471,), (1398797740,), (1398797838,), (1398797840,), (1398797842,), (1398797845,), (1398797847,), (1398798031,), (1398798106,), (1398798133,), (1398798136,), (1398798138,), (1398798150,), (1398798152,), (1398798154,), (1398798156,), (1398798159,), (1398798181,), (1398798184,), (1398798187,), (1398798190,), (1398798214,), (1398798216,), (1398798217,), (1398798218,), (1398798221,), (1398798234,), (1398798236,), (1398798238,), (1398798243,), (1398798250,), (1398798252,), (1398798258,), (1398798262,), (1398798263,), (1398798265,), (1398798304,), (1398798305,), (1398798306,), (1398798307,), (1398798310,), (1398798313,), (1398798322,), (1398798324,), (1398798326,), (1398798328,), (1398798355,), (1398798357,), (1398798359,), (1398798361,), (1398798364,), (1398798402,), (1398798403,), (1398798405,), (1398798408,), (1398798411,), (1398798412,), (1398798426,), (1398798429,), (1398798579,), (1398798580,), (1398798688,), (1398798684,), (1398798718,), (1398798719,), (1398798730,), (1398798732,), (1398798735,), (1398798737,), (1398798808,), (1398798815,), (1398798818,), (1398798820,), (1398799126,), (1398799147,), (1398799180,), (1398799183,), (1398799186,), (1398799199,), (1398799201,), (1398799203,), (1398799227,), (1398799228,), (1398799229,), (1398799255,), (1398799257,), (1398799260,), (1398799263,), (1398799290,), (1398799292,), (1398799294,), (1398799296,), (1398799508,), (1398799588,), (1398799591,), (1398799594,), (1398799617,), (1398799619,), (1398799621,), (1398799675,), (1398799689,), (1398799691,), (1398799693,), (1398799695,), (1398799725,), (1398799727,), (1398799729,), (1398799731,), (1398799734,), (1398799746,), (1398799748,), (1398799750,), (1398799754,), (1398799758,), (1398799778,), (1398799780,), (1398799782,), (1398799784,), (1398799787,), (1398799805,), (1398799807,), (1398799809,), (1398799811,), (1398799814,), (1398799816,), (1398799826,), (1398799828,), (1398799831,), (1398799834,), (1398799848,), (1398799849,), (1398799850,), (1398799852,), (1398799854,), (1398799856,), (1398799862,), (1398799865,), (1398799870,), (1398799879,), (1398799882,), (1398799887,), (1398799899,), (1398799901,), (1398799902,), (1398799913,), (1398799907,), (1398799908,), (1398799911,), (1398799915,), (1398799916,), (1398799917,), (1398799918,), (1398799921,), (1398799955,), (1398799957,), (1398799959,), (1398799961,), (1398799964,), (1398799986,), (1398799988,), (1398799990,), (1398799994,), (1398800030,), (1398800033,), (1398800036,), (1398800040,), (1398800044,), (1398800048,), (1398800050,), (1398800052,), (1398800054,), (1398800057,), (1398800086,), (1398800087,), (1398800088,), (1398800089,), (1398800092,), (1398800108,), (1398800111,), (1398800113,), (1398800116,), (1398800118,), (1398800119,), (1398800132,), (1398800134,), (1398800137,), (1398800141,), (1398800167,), (1398800171,), (1398800173,), (1398800176,), (1398800179,), (1398802635,), (1398803973,), (1398803988,), (1398803990,), (1398803992,), (1398803996,), (1398804015,), (1398804018,), (1398804021,), (1398804024,), (1398804039,), (1398804132,), (1398804134,), (1398804152,), (1398804155,), (1398804158,), (1398804161,), (1398804177,), (1398804178,), (1398804180,), (1398804181,), (1398804184,), (1398804185,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'11122025': {'nb_upload': 22, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29323264]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1398804185, 1398804184, 1398804181, 1398804180, 1398804178, 1398804177] map_info['map_portfolio_photo'] : {29323264: [1398804185, 1398804184, 1398804181, 1398804180, 1398804178, 1398804177, 1398804161, 1398804158, 1398804155, 1398804152, 1398804134, 1398804132, 1398804039, 1398804024, 1398804021, 1398804018, 1398804015, 1398803996, 1398803992, 1398803990, 1398803988, 1398803973]} final : True mtd_id 4302 list_pids : [1398804185, 1398804184, 1398804181, 1398804180, 1398804178, 1398804177] Looping around the photos to save general results len do output : 1 /29323264Didn'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, '4206339') ('4302', '29323264', '1398804185', None, None, None, None, None, '4206339') ('4302', None, None, None, None, None, None, None, '4206339') ('4302', '29323264', '1398804184', None, None, None, None, None, '4206339') ('4302', None, None, None, None, None, None, None, '4206339') ('4302', '29323264', '1398804181', None, None, None, None, None, '4206339') ('4302', None, None, None, None, None, None, None, '4206339') ('4302', '29323264', '1398804180', None, None, None, None, None, '4206339') ('4302', None, None, None, None, None, None, None, '4206339') ('4302', '29323264', '1398804178', None, None, None, None, None, '4206339') ('4302', None, None, None, None, None, None, None, '4206339') ('4302', '29323264', '1398804177', None, None, None, None, None, '4206339') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '29323264', 'None', None, None, None, None, '4206339'), ('4302', '29323264', '1398804185', None, None, None, None, None, '4206339'), ('4302', '29323264', '1398804184', None, None, None, None, None, '4206339'), ('4302', '29323264', '1398804181', None, None, None, None, None, '4206339'), ('4302', '29323264', '1398804180', None, None, None, None, None, '4206339'), ('4302', '29323264', '1398804178', None, None, None, None, None, '4206339'), ('4302', '29323264', '1398804177', None, None, None, None, None, '4206339')] time used for this insertion : 0.015174150466918945 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.6816737651824951 time spend to save output : 0.015345335006713867 total time spend for step 5 : 0.697019100189209 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 (4206339) 2.01user 2.11system 0:09.52elapsed 43%CPU (0avgtext+0avgdata 165952maxresident)k 456inputs+5496outputs (8major+67216minor)pagefaults 0swaps