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 : 561979 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 (3640319) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3640319) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26358007 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3640319'] with mtr_portfolio_ids : ['26358007'] and first list_photo_ids : [] new path : /proc/561979/ Name: python3 Umask: 0002 State: R (running) Tgid: 561979 Ngid: 0 Pid: 561979 PPid: 561978 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 561979 NSpid: 561979 NSpgid: 559509 NSsid: 559509 VmPeak: 1107248 kB VmSize: 1107248 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 100720 kB VmRSS: 100720 kB RssAnon: 60168 kB RssFile: 40552 kB RssShmem: 0 kB VmData: 866000 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 592 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 47 nonvoluntary_ctxt_switches: 87 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '561979', 'Ngid': '0', 'Pid': '561979', 'PPid': '561978', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '561979', 'NSpid': '561979', 'NSpgid': '559509', 'NSsid': '559509', 'VmPeak': '1107248 kB', 'VmSize': '1107248 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '100720 kB', 'VmRSS': '100720 kB', 'RssAnon': '60168 kB', 'RssFile': '40552 kB', 'RssShmem': '0 kB', 'VmData': '866000 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '592 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '47', 'nonvoluntary_ctxt_switches': '87'} ('datou_batch_current', '561979', '1107248', '0', '1107248', '866000', '100720', b'', 'marlene', '3640319') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (26358007) 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 (3640319 ) ) 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 (26358007) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1380226084, 'portfolio_id': 26358007}, {'photo_id': 1380226082, 'portfolio_id': 26358007}, {'photo_id': 1380225614, 'portfolio_id': 26358007}, {'photo_id': 1380225612, 'portfolio_id': 26358007}, {'photo_id': 1380225610, 'portfolio_id': 26358007}, {'photo_id': 1380225220, 'portfolio_id': 26358007}, {'photo_id': 1380225218, 'portfolio_id': 26358007}, {'photo_id': 1380225216, 'portfolio_id': 26358007}, {'photo_id': 1380225214, 'portfolio_id': 26358007}, {'photo_id': 1380224980, 'portfolio_id': 26358007}, {'photo_id': 1380224979, 'portfolio_id': 26358007}, {'photo_id': 1380224978, 'portfolio_id': 26358007}, {'photo_id': 1380224977, 'portfolio_id': 26358007}, {'photo_id': 1380224888, 'portfolio_id': 26358007}, {'photo_id': 1380224887, 'portfolio_id': 26358007}, {'photo_id': 1380224886, 'portfolio_id': 26358007}, {'photo_id': 1380224885, 'portfolio_id': 26358007}, {'photo_id': 1380224884, 'portfolio_id': 26358007}, {'photo_id': 1380224850, 'portfolio_id': 26358007}, {'photo_id': 1380224849, 'portfolio_id': 26358007}, {'photo_id': 1380224848, 'portfolio_id': 26358007}, {'photo_id': 1380224847, 'portfolio_id': 26358007}, {'photo_id': 1380224846, 'portfolio_id': 26358007}, {'photo_id': 1380224832, 'portfolio_id': 26358007}, {'photo_id': 1380224831, 'portfolio_id': 26358007}, {'photo_id': 1380224830, 'portfolio_id': 26358007}, {'photo_id': 1380224829, 'portfolio_id': 26358007}, {'photo_id': 1380224828, 'portfolio_id': 26358007}, {'photo_id': 1380224732, 'portfolio_id': 26358007}, {'photo_id': 1380224731, 'portfolio_id': 26358007}, {'photo_id': 1380224730, 'portfolio_id': 26358007}, {'photo_id': 1380224381, 'portfolio_id': 26358007}, {'photo_id': 1380224374, 'portfolio_id': 26358007}, {'photo_id': 1380224367, 'portfolio_id': 26358007}, {'photo_id': 1380224359, 'portfolio_id': 26358007}, {'photo_id': 1380224352, 'portfolio_id': 26358007}, {'photo_id': 1380224009, 'portfolio_id': 26358007}, {'photo_id': 1380224007, 'portfolio_id': 26358007}, {'photo_id': 1380224005, 'portfolio_id': 26358007}, {'photo_id': 1380224003, 'portfolio_id': 26358007}, {'photo_id': 1380224001, 'portfolio_id': 26358007}, {'photo_id': 1380223636, 'portfolio_id': 26358007}, {'photo_id': 1380223634, 'portfolio_id': 26358007}, {'photo_id': 1380223632, 'portfolio_id': 26358007}, {'photo_id': 1380223630, 'portfolio_id': 26358007}, {'photo_id': 1380223628, 'portfolio_id': 26358007}, {'photo_id': 1380223626, 'portfolio_id': 26358007}, {'photo_id': 1380223349, 'portfolio_id': 26358007}, {'photo_id': 1380223348, 'portfolio_id': 26358007}, {'photo_id': 1380223332, 'portfolio_id': 26358007}, {'photo_id': 1380223331, 'portfolio_id': 26358007}, {'photo_id': 1380223330, 'portfolio_id': 26358007}, {'photo_id': 1380223329, 'portfolio_id': 26358007}, {'photo_id': 1380223259, 'portfolio_id': 26358007}, {'photo_id': 1380223258, 'portfolio_id': 26358007}, {'photo_id': 1380223257, 'portfolio_id': 26358007}] map_portfolio_id_photo_id: {26358007: [1380226084, 1380226082, 1380225614, 1380225612, 1380225610, 1380225220, 1380225218, 1380225216, 1380225214, 1380224980, 1380224979, 1380224978, 1380224977, 1380224888, 1380224887, 1380224886, 1380224885, 1380224884, 1380224850, 1380224849, 1380224848, 1380224847, 1380224846, 1380224832, 1380224831, 1380224830, 1380224829, 1380224828, 1380224732, 1380224731, 1380224730, 1380224381, 1380224374, 1380224367, 1380224359, 1380224352, 1380224009, 1380224007, 1380224005, 1380224003, 1380224001, 1380223636, 1380223634, 1380223632, 1380223630, 1380223628, 1380223626, 1380223349, 1380223348, 1380223332, 1380223331, 1380223330, 1380223329, 1380223259, 1380223258, 1380223257]} ##### 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.015405416488647461 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Sat Aug 30 02:14:57 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 (26358007) 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 : 26358007 get user id for portfolio 26358007 get sub ptf for main ptf 26358007, type 3726 and hashtags ['Teint_Dans_La_Masse', 'papier', 'Carton_gris', 'kraft', 'environnement', 'plastique', 'metal', 'Carton_brun', 'mal_croppe', 'flou', 'autre_refus', 'cartonnette'] 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`=26358007 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','papier','Carton_gris','kraft','environnement','plastique','metal','Carton_brun','mal_croppe','flou','autre_refus','cartonnette')) 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`=26358007 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','papier','Carton_gris','kraft','environnement','plastique','metal','Carton_brun','mal_croppe','flou','autre_refus','cartonnette')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 26358007, 'sub_port_id': 26358069, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17733955, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 3, 27)}, 'flou': {'main_port_id': 26358007, 'sub_port_id': 26358070, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17733956, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 3, 27)}, 'environnement': {'main_port_id': 26358007, 'sub_port_id': 26358071, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17733957, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 3, 27)}, 'Teint_Dans_La_Masse': {'main_port_id': 26358007, 'sub_port_id': 26358072, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17733958, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 3, 27)}, 'mal_croppe': {'main_port_id': 26358007, 'sub_port_id': 26358073, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17733959, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 3, 27)}, 'cartonnette': {'main_port_id': 26358007, 'sub_port_id': 26358074, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17733960, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 3, 27)}, 'Carton_gris': {'main_port_id': 26358007, 'sub_port_id': 26358075, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17733961, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 3, 27)}, 'kraft': {'main_port_id': 26358007, 'sub_port_id': 26358076, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17733962, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 3, 27)}, 'Carton_brun': {'main_port_id': 26358007, 'sub_port_id': 26358077, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17733963, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 3, 27)}, 'plastique': {'main_port_id': 26358007, 'sub_port_id': 26358078, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17733964, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 3, 27)}, 'metal': {'main_port_id': 26358007, 'sub_port_id': 26358079, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17733965, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 3, 27)}, 'autre_refus': {'main_port_id': 26358007, 'sub_port_id': 26358080, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17733966, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 3, 27)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26358069 , 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=26358007 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 (26358069) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26358007) result : ((1380223257,), (1380223258,), (1380223259,), (1380223329,), (1380223330,), (1380223331,), (1380223332,), (1380223348,), (1380223349,), (1380223626,), (1380223628,), (1380223630,), (1380223632,), (1380223634,), (1380223636,), (1380224001,), (1380224003,), (1380224005,), (1380224007,), (1380224009,), (1380224352,), (1380224359,), (1380224367,), (1380224374,), (1380224381,), (1380224730,), (1380224731,), (1380224732,), (1380224828,), (1380224829,), (1380224830,), (1380224831,), (1380224832,), (1380224846,), (1380224847,), (1380224848,), (1380224849,), (1380224850,), (1380224884,), (1380224885,), (1380224886,), (1380224887,), (1380224888,), (1380224977,), (1380224978,), (1380224979,), (1380224980,), (1380225214,), (1380225216,), (1380225218,), (1380225220,), (1380225610,), (1380225612,), (1380225614,), (1380226082,), (1380226084,)) 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 26358070 , 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=26358007 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 (26358070) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26358007) result : ((1380223257,), (1380223258,), (1380223259,), (1380223329,), (1380223330,), (1380223331,), (1380223332,), (1380223348,), (1380223349,), (1380223626,), (1380223628,), (1380223630,), (1380223632,), (1380223634,), (1380223636,), (1380224001,), (1380224003,), (1380224005,), (1380224007,), (1380224009,), (1380224352,), (1380224359,), (1380224367,), (1380224374,), (1380224381,), (1380224730,), (1380224731,), (1380224732,), (1380224828,), (1380224829,), (1380224830,), (1380224831,), (1380224832,), (1380224846,), (1380224847,), (1380224848,), (1380224849,), (1380224850,), (1380224884,), (1380224885,), (1380224886,), (1380224887,), (1380224888,), (1380224977,), (1380224978,), (1380224979,), (1380224980,), (1380225214,), (1380225216,), (1380225218,), (1380225220,), (1380225610,), (1380225612,), (1380225614,), (1380226082,), (1380226084,)) 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 26358071 , 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=26358007 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 (26358071) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26358007) result : ((1380223257,), (1380223258,), (1380223259,), (1380223329,), (1380223330,), (1380223331,), (1380223332,), (1380223348,), (1380223349,), (1380223626,), (1380223628,), (1380223630,), (1380223632,), (1380223634,), (1380223636,), (1380224001,), (1380224003,), (1380224005,), (1380224007,), (1380224009,), (1380224352,), (1380224359,), (1380224367,), (1380224374,), (1380224381,), (1380224730,), (1380224731,), (1380224732,), (1380224828,), (1380224829,), (1380224830,), (1380224831,), (1380224832,), (1380224846,), (1380224847,), (1380224848,), (1380224849,), (1380224850,), (1380224884,), (1380224885,), (1380224886,), (1380224887,), (1380224888,), (1380224977,), (1380224978,), (1380224979,), (1380224980,), (1380225214,), (1380225216,), (1380225218,), (1380225220,), (1380225610,), (1380225612,), (1380225614,), (1380226082,), (1380226084,)) 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 26358072 , 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=26358007 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 (26358072) result : ((1380223345,), (1380224874,), (1380225048,), (1380225050,), (1380225052,), (1380225782,), (1380225784,), (1380225786,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26358007) result : ((1380223257,), (1380223258,), (1380223259,), (1380223329,), (1380223330,), (1380223331,), (1380223332,), (1380223348,), (1380223349,), (1380223626,), (1380223628,), (1380223630,), (1380223632,), (1380223634,), (1380223636,), (1380224001,), (1380224003,), (1380224005,), (1380224007,), (1380224009,), (1380224352,), (1380224359,), (1380224367,), (1380224374,), (1380224381,), (1380224730,), (1380224731,), (1380224732,), (1380224828,), (1380224829,), (1380224830,), (1380224831,), (1380224832,), (1380224846,), (1380224847,), (1380224848,), (1380224849,), (1380224850,), (1380224884,), (1380224885,), (1380224886,), (1380224887,), (1380224888,), (1380224977,), (1380224978,), (1380224979,), (1380224980,), (1380225214,), (1380225216,), (1380225218,), (1380225220,), (1380225610,), (1380225612,), (1380225614,), (1380226082,), (1380226084,)) 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 26358073 , 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=26358007 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 (26358073) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26358007) result : ((1380223257,), (1380223258,), (1380223259,), (1380223329,), (1380223330,), (1380223331,), (1380223332,), (1380223348,), (1380223349,), (1380223626,), (1380223628,), (1380223630,), (1380223632,), (1380223634,), (1380223636,), (1380224001,), (1380224003,), (1380224005,), (1380224007,), (1380224009,), (1380224352,), (1380224359,), (1380224367,), (1380224374,), (1380224381,), (1380224730,), (1380224731,), (1380224732,), (1380224828,), (1380224829,), (1380224830,), (1380224831,), (1380224832,), (1380224846,), (1380224847,), (1380224848,), (1380224849,), (1380224850,), (1380224884,), (1380224885,), (1380224886,), (1380224887,), (1380224888,), (1380224977,), (1380224978,), (1380224979,), (1380224980,), (1380225214,), (1380225216,), (1380225218,), (1380225220,), (1380225610,), (1380225612,), (1380225614,), (1380226082,), (1380226084,)) 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 26358074 , 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=26358007 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 (26358074) result : ((1380225803,), (1380225805,), (1380225952,), (1380225955,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26358007) result : ((1380223257,), (1380223258,), (1380223259,), (1380223329,), (1380223330,), (1380223331,), (1380223332,), (1380223348,), (1380223349,), (1380223626,), (1380223628,), (1380223630,), (1380223632,), (1380223634,), (1380223636,), (1380224001,), (1380224003,), (1380224005,), (1380224007,), (1380224009,), (1380224352,), (1380224359,), (1380224367,), (1380224374,), (1380224381,), (1380224730,), (1380224731,), (1380224732,), (1380224828,), (1380224829,), (1380224830,), (1380224831,), (1380224832,), (1380224846,), (1380224847,), (1380224848,), (1380224849,), (1380224850,), (1380224884,), (1380224885,), (1380224886,), (1380224887,), (1380224888,), (1380224977,), (1380224978,), (1380224979,), (1380224980,), (1380225214,), (1380225216,), (1380225218,), (1380225220,), (1380225610,), (1380225612,), (1380225614,), (1380226082,), (1380226084,)) 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 26358075 , 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=26358007 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 (26358075) result : ((1380224215,), (1380224217,), (1380224860,), (1380224861,), (1380224877,), (1380224878,), (1380225166,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26358007) result : ((1380223257,), (1380223258,), (1380223259,), (1380223329,), (1380223330,), (1380223331,), (1380223332,), (1380223348,), (1380223349,), (1380223626,), (1380223628,), (1380223630,), (1380223632,), (1380223634,), (1380223636,), (1380224001,), (1380224003,), (1380224005,), (1380224007,), (1380224009,), (1380224352,), (1380224359,), (1380224367,), (1380224374,), (1380224381,), (1380224730,), (1380224731,), (1380224732,), (1380224828,), (1380224829,), (1380224830,), (1380224831,), (1380224832,), (1380224846,), (1380224847,), (1380224848,), (1380224849,), (1380224850,), (1380224884,), (1380224885,), (1380224886,), (1380224887,), (1380224888,), (1380224977,), (1380224978,), (1380224979,), (1380224980,), (1380225214,), (1380225216,), (1380225218,), (1380225220,), (1380225610,), (1380225612,), (1380225614,), (1380226082,), (1380226084,)) 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 26358076 , 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=26358007 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 (26358076) result : ((1380225822,), (1380225824,), (1380225826,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26358007) result : ((1380223257,), (1380223258,), (1380223259,), (1380223329,), (1380223330,), (1380223331,), (1380223332,), (1380223348,), (1380223349,), (1380223626,), (1380223628,), (1380223630,), (1380223632,), (1380223634,), (1380223636,), (1380224001,), (1380224003,), (1380224005,), (1380224007,), (1380224009,), (1380224352,), (1380224359,), (1380224367,), (1380224374,), (1380224381,), (1380224730,), (1380224731,), (1380224732,), (1380224828,), (1380224829,), (1380224830,), (1380224831,), (1380224832,), (1380224846,), (1380224847,), (1380224848,), (1380224849,), (1380224850,), (1380224884,), (1380224885,), (1380224886,), (1380224887,), (1380224888,), (1380224977,), (1380224978,), (1380224979,), (1380224980,), (1380225214,), (1380225216,), (1380225218,), (1380225220,), (1380225610,), (1380225612,), (1380225614,), (1380226082,), (1380226084,)) 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 26358077 , 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=26358007 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 (26358077) result : ((1380224879,), (1380225812,), (1380225970,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26358007) result : ((1380223257,), (1380223258,), (1380223259,), (1380223329,), (1380223330,), (1380223331,), (1380223332,), (1380223348,), (1380223349,), (1380223626,), (1380223628,), (1380223630,), (1380223632,), (1380223634,), (1380223636,), (1380224001,), (1380224003,), (1380224005,), (1380224007,), (1380224009,), (1380224352,), (1380224359,), (1380224367,), (1380224374,), (1380224381,), (1380224730,), (1380224731,), (1380224732,), (1380224828,), (1380224829,), (1380224830,), (1380224831,), (1380224832,), (1380224846,), (1380224847,), (1380224848,), (1380224849,), (1380224850,), (1380224884,), (1380224885,), (1380224886,), (1380224887,), (1380224888,), (1380224977,), (1380224978,), (1380224979,), (1380224980,), (1380225214,), (1380225216,), (1380225218,), (1380225220,), (1380225610,), (1380225612,), (1380225614,), (1380226082,), (1380226084,)) 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 26358078 , 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=26358007 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 (26358078) result : ((1380224864,), (1380224865,), (1380225173,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26358007) result : ((1380223257,), (1380223258,), (1380223259,), (1380223329,), (1380223330,), (1380223331,), (1380223332,), (1380223348,), (1380223349,), (1380223626,), (1380223628,), (1380223630,), (1380223632,), (1380223634,), (1380223636,), (1380224001,), (1380224003,), (1380224005,), (1380224007,), (1380224009,), (1380224352,), (1380224359,), (1380224367,), (1380224374,), (1380224381,), (1380224730,), (1380224731,), (1380224732,), (1380224828,), (1380224829,), (1380224830,), (1380224831,), (1380224832,), (1380224846,), (1380224847,), (1380224848,), (1380224849,), (1380224850,), (1380224884,), (1380224885,), (1380224886,), (1380224887,), (1380224888,), (1380224977,), (1380224978,), (1380224979,), (1380224980,), (1380225214,), (1380225216,), (1380225218,), (1380225220,), (1380225610,), (1380225612,), (1380225614,), (1380226082,), (1380226084,)) 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 26358079 , 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=26358007 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 (26358079) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26358007) result : ((1380223257,), (1380223258,), (1380223259,), (1380223329,), (1380223330,), (1380223331,), (1380223332,), (1380223348,), (1380223349,), (1380223626,), (1380223628,), (1380223630,), (1380223632,), (1380223634,), (1380223636,), (1380224001,), (1380224003,), (1380224005,), (1380224007,), (1380224009,), (1380224352,), (1380224359,), (1380224367,), (1380224374,), (1380224381,), (1380224730,), (1380224731,), (1380224732,), (1380224828,), (1380224829,), (1380224830,), (1380224831,), (1380224832,), (1380224846,), (1380224847,), (1380224848,), (1380224849,), (1380224850,), (1380224884,), (1380224885,), (1380224886,), (1380224887,), (1380224888,), (1380224977,), (1380224978,), (1380224979,), (1380224980,), (1380225214,), (1380225216,), (1380225218,), (1380225220,), (1380225610,), (1380225612,), (1380225614,), (1380226082,), (1380226084,)) 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 26358080 , 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=26358007 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 (26358080) result : ((1380223346,), (1380223347,), (1380224875,), (1380224876,), (1380225793,), (1380225936,), (1380225939,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26358007) result : ((1380223257,), (1380223258,), (1380223259,), (1380223329,), (1380223330,), (1380223331,), (1380223332,), (1380223348,), (1380223349,), (1380223626,), (1380223628,), (1380223630,), (1380223632,), (1380223634,), (1380223636,), (1380224001,), (1380224003,), (1380224005,), (1380224007,), (1380224009,), (1380224352,), (1380224359,), (1380224367,), (1380224374,), (1380224381,), (1380224730,), (1380224731,), (1380224732,), (1380224828,), (1380224829,), (1380224830,), (1380224831,), (1380224832,), (1380224846,), (1380224847,), (1380224848,), (1380224849,), (1380224850,), (1380224884,), (1380224885,), (1380224886,), (1380224887,), (1380224888,), (1380224977,), (1380224978,), (1380224979,), (1380224980,), (1380225214,), (1380225216,), (1380225218,), (1380225220,), (1380225610,), (1380225612,), (1380225614,), (1380226082,), (1380226084,)) 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`=26358007 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','papier','Carton_gris','kraft','environnement','plastique','metal','Carton_brun','mal_croppe','flou','autre_refus','cartonnette')) 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`=26358007 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','papier','Carton_gris','kraft','environnement','plastique','metal','Carton_brun','mal_croppe','flou','autre_refus','cartonnette')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 26358007, 'sub_port_id': 26358082, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17733967, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 3, 33)}, 'flou': {'main_port_id': 26358007, 'sub_port_id': 26358083, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17733968, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 3, 33)}, 'environnement': {'main_port_id': 26358007, 'sub_port_id': 26358084, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17733969, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 3, 33)}, 'Teint_Dans_La_Masse': {'main_port_id': 26358007, 'sub_port_id': 26358085, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17733970, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 3, 33)}, 'mal_croppe': {'main_port_id': 26358007, 'sub_port_id': 26358086, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17733971, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 3, 33)}, 'cartonnette': {'main_port_id': 26358007, 'sub_port_id': 26358087, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17733972, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 3, 33)}, 'Carton_gris': {'main_port_id': 26358007, 'sub_port_id': 26358088, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17733973, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 3, 33)}, 'kraft': {'main_port_id': 26358007, 'sub_port_id': 26358089, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17733974, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 3, 33)}, 'Carton_brun': {'main_port_id': 26358007, 'sub_port_id': 26358090, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17733975, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 3, 33)}, 'plastique': {'main_port_id': 26358007, 'sub_port_id': 26358091, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17733976, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 3, 33)}, 'metal': {'main_port_id': 26358007, 'sub_port_id': 26358092, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17733977, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 3, 33)}, 'autre_refus': {'main_port_id': 26358007, 'sub_port_id': 26358093, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17733978, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 3, 33)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26358082,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26358069 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26358083,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26358070 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26358084,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26358071 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26358085,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26358072 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26358086,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26358073 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26358087,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26358074 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26358088,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26358075 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26358089,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26358076 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26358090,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26358077 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26358091,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26358078 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26358092,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26358079 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26358093,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26358080 lien utilise dans velours : https://marlene.fotonower.com/velours/26358082,26358083,26358084,26358085,26358086,26358087,26358088,26358089,26358090,26358091,26358092,26358093?tags=papier,flou,environnement,Teint_Dans_La_Masse,mal_croppe,cartonnette,Carton_gris,kraft,Carton_brun,plastique,metal,autre_refus After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26358007]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1380226084, 1380226082, 1380225614, 1380225612, 1380225610] map_info['map_portfolio_photo'] : {26358007: [1380226084, 1380226082, 1380225614, 1380225612, 1380225610, 1380225220, 1380225218, 1380225216, 1380225214, 1380224980, 1380224979, 1380224978, 1380224977, 1380224888, 1380224887, 1380224886, 1380224885, 1380224884, 1380224850, 1380224849, 1380224848, 1380224847, 1380224846, 1380224832, 1380224831, 1380224830, 1380224829, 1380224828, 1380224732, 1380224731, 1380224730, 1380224381, 1380224374, 1380224367, 1380224359, 1380224352, 1380224009, 1380224007, 1380224005, 1380224003, 1380224001, 1380223636, 1380223634, 1380223632, 1380223630, 1380223628, 1380223626, 1380223349, 1380223348, 1380223332, 1380223331, 1380223330, 1380223329, 1380223259, 1380223258, 1380223257]} final : False mtd_id 4302 list_pids : [1380226084, 1380226082, 1380225614, 1380225612, 1380225610] Looping around the photos to save general results len do output : 1 /26358007. 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, '3640319') ('4302', '26358007', '1380226084', None, None, None, None, None, '3640319') ('4302', None, None, None, None, None, None, None, '3640319') ('4302', '26358007', '1380226082', None, None, None, None, None, '3640319') ('4302', None, None, None, None, None, None, None, '3640319') ('4302', '26358007', '1380225614', None, None, None, None, None, '3640319') ('4302', None, None, None, None, None, None, None, '3640319') ('4302', '26358007', '1380225612', None, None, None, None, None, '3640319') ('4302', None, None, None, None, None, None, None, '3640319') ('4302', '26358007', '1380225610', None, None, None, None, None, '3640319') 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', None, '26358007', "{'papier': 26358069, 'flou': 26358070, 'environnement': 26358071, 'Teint_Dans_La_Masse': 26358072, 'mal_croppe': 26358073, 'cartonnette': 26358074, 'Carton_gris': 26358075, 'kraft': 26358076, 'Carton_brun': 26358077, 'plastique': 26358078, 'metal': 26358079, 'autre_refus': 26358080}", None, None, None, None, '3640319'), ('4302', '26358007', '1380226084', None, None, None, None, None, '3640319'), ('4302', '26358007', '1380226082', None, None, None, None, None, '3640319'), ('4302', '26358007', '1380225614', None, None, None, None, None, '3640319'), ('4302', '26358007', '1380225612', None, None, None, None, None, '3640319'), ('4302', '26358007', '1380225610', None, None, None, None, None, '3640319')] time used for this insertion : 0.016478300094604492 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.6222670078277588 time spend to save output : 0.01676321029663086 total time spend for step 1 : 1.6390302181243896 step2:final Sat Aug 30 02:14:59 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 (26358007) 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 26358007 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1380223259,1380223258,1380223257,1380223332,1380223331,1380223330,1380223329,1380223349,1380223348,1380223636,1380223634,1380223632,1380223630,1380223628,1380223626,1380224009,1380224007,1380224005,1380224003,1380224001,1380224381,1380224374,1380224367,1380224359,1380224352,1380224732,1380224731,1380224730,1380224832,1380224831,1380224830,1380224829,1380224828,1380224850,1380224849,1380224848,1380224847,1380224846,1380224888,1380224887,1380224886,1380224885,1380224884,1380224980,1380224979,1380224978,1380224977,1380225220,1380225218,1380225216,1380225214,1380225614,1380225612,1380225610,1380226084,1380226082); 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([26358007]) Inside saveOutput : final : False verbose : True original output for save of step final : {1380226084: ('0.049413730603211484',), 1380226082: ('0.049413730603211484',), 1380225614: ('0.049413730603211484',), 1380225612: ('0.049413730603211484',), 1380225610: ('0.049413730603211484',)} new output for save of step final : {1380226084: ('0.049413730603211484',), 1380226082: ('0.049413730603211484',), 1380225614: ('0.049413730603211484',), 1380225612: ('0.049413730603211484',), 1380225610: ('0.049413730603211484',)} [1380226084, 1380226082, 1380225614, 1380225612, 1380225610] map_info['map_portfolio_photo'] : {26358007: [1380226084, 1380226082, 1380225614, 1380225612, 1380225610, 1380225220, 1380225218, 1380225216, 1380225214, 1380224980, 1380224979, 1380224978, 1380224977, 1380224888, 1380224887, 1380224886, 1380224885, 1380224884, 1380224850, 1380224849, 1380224848, 1380224847, 1380224846, 1380224832, 1380224831, 1380224830, 1380224829, 1380224828, 1380224732, 1380224731, 1380224730, 1380224381, 1380224374, 1380224367, 1380224359, 1380224352, 1380224009, 1380224007, 1380224005, 1380224003, 1380224001, 1380223636, 1380223634, 1380223632, 1380223630, 1380223628, 1380223626, 1380223349, 1380223348, 1380223332, 1380223331, 1380223330, 1380223329, 1380223259, 1380223258, 1380223257]} final : False mtd_id 4302 list_pids : [1380226084, 1380226082, 1380225614, 1380225612, 1380225610] Looping around the photos to save general results len do output : 5 /1380226084.Didn't retrieve data . /1380226082.Didn't retrieve data . /1380225614.Didn't retrieve data . /1380225612.Didn't retrieve data . /1380225610.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, '3640319') ('4302', '26358007', '1380226084', None, None, None, None, None, '3640319') ('4302', None, None, None, None, None, None, None, '3640319') ('4302', '26358007', '1380226082', None, None, None, None, None, '3640319') ('4302', None, None, None, None, None, None, None, '3640319') ('4302', '26358007', '1380225614', None, None, None, None, None, '3640319') ('4302', None, None, None, None, None, None, None, '3640319') ('4302', '26358007', '1380225612', None, None, None, None, None, '3640319') ('4302', None, None, None, None, None, None, None, '3640319') ('4302', '26358007', '1380225610', None, None, None, None, None, '3640319') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '26358007', '1380226084', '0.049413730603211484', None, None, None, None, '3640319'), ('4302', '26358007', '1380226082', '0.049413730603211484', None, None, None, None, '3640319'), ('4302', '26358007', '1380225614', '0.049413730603211484', None, None, None, None, '3640319'), ('4302', '26358007', '1380225612', '0.049413730603211484', None, None, None, None, '3640319'), ('4302', '26358007', '1380225610', '0.049413730603211484', None, None, None, None, '3640319')] time used for this insertion : 0.012627363204956055 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06890678405761719 time spend to save output : 0.013033628463745117 total time spend for step 2 : 0.0819404125213623 step3:velours_tree Sat Aug 30 02:14:59 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 : {26358007: [{'papier': 26358069, 'flou': 26358070, 'environnement': 26358071, 'Teint_Dans_La_Masse': 26358072, 'mal_croppe': 26358073, 'cartonnette': 26358074, 'Carton_gris': 26358075, 'kraft': 26358076, 'Carton_brun': 26358077, 'plastique': 26358078, 'metal': 26358079, 'autre_refus': 26358080}]} input_args_next_step : {26358007: ()} output_args : {26358007: [{'papier': 26358069, 'flou': 26358070, 'environnement': 26358071, 'Teint_Dans_La_Masse': 26358072, 'mal_croppe': 26358073, 'cartonnette': 26358074, 'Carton_gris': 26358075, 'kraft': 26358076, 'Carton_brun': 26358077, 'plastique': 26358078, 'metal': 26358079, 'autre_refus': 26358080}]} args : 26358007 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 : ({'papier': 26358069, 'flou': 26358070, 'environnement': 26358071, 'Teint_Dans_La_Masse': 26358072, 'mal_croppe': 26358073, 'cartonnette': 26358074, 'Carton_gris': 26358075, 'kraft': 26358076, 'Carton_brun': 26358077, 'plastique': 26358078, 'metal': 26358079, 'autre_refus': 26358080},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26358007) 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([26358007]) 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.34467530250549316 time spend to save output : 6.723403930664062e-05 total time spend for step 3 : 0.3447425365447998 step4:send_mail_cod Sat Aug 30 02:14:59 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 : {1380226084: ('0.049413730603211484',), 1380226082: ('0.049413730603211484',), 1380225614: ('0.049413730603211484',), 1380225612: ('0.049413730603211484',), 1380225610: ('0.049413730603211484',)} input_args_next_step : {1380226084: ()} output_args : {1380226084: ('0.049413730603211484',), 1380226082: ('0.049413730603211484',), 1380225614: ('0.049413730603211484',), 1380225612: ('0.049413730603211484',), 1380225610: ('0.049413730603211484',)} args : 1380226084 depend.output_id : 0 input_args_next_step : {1380226084: ('0.049413730603211484',), 1380226082: ()} output_args : {1380226084: ('0.049413730603211484',), 1380226082: ('0.049413730603211484',), 1380225614: ('0.049413730603211484',), 1380225612: ('0.049413730603211484',), 1380225610: ('0.049413730603211484',)} args : 1380226082 depend.output_id : 0 input_args_next_step : {1380226084: ('0.049413730603211484',), 1380226082: ('0.049413730603211484',), 1380225614: ()} output_args : {1380226084: ('0.049413730603211484',), 1380226082: ('0.049413730603211484',), 1380225614: ('0.049413730603211484',), 1380225612: ('0.049413730603211484',), 1380225610: ('0.049413730603211484',)} args : 1380225614 depend.output_id : 0 input_args_next_step : {1380226084: ('0.049413730603211484',), 1380226082: ('0.049413730603211484',), 1380225614: ('0.049413730603211484',), 1380225612: ()} output_args : {1380226084: ('0.049413730603211484',), 1380226082: ('0.049413730603211484',), 1380225614: ('0.049413730603211484',), 1380225612: ('0.049413730603211484',), 1380225610: ('0.049413730603211484',)} args : 1380225612 depend.output_id : 0 input_args_next_step : {1380226084: ('0.049413730603211484',), 1380226082: ('0.049413730603211484',), 1380225614: ('0.049413730603211484',), 1380225612: ('0.049413730603211484',), 1380225610: ()} output_args : {1380226084: ('0.049413730603211484',), 1380226082: ('0.049413730603211484',), 1380225614: ('0.049413730603211484',), 1380225612: ('0.049413730603211484',), 1380225610: ('0.049413730603211484',)} args : 1380225610 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 : {26358007: [{'papier': 26358069, 'flou': 26358070, 'environnement': 26358071, 'Teint_Dans_La_Masse': 26358072, 'mal_croppe': 26358073, 'cartonnette': 26358074, 'Carton_gris': 26358075, 'kraft': 26358076, 'Carton_brun': 26358077, 'plastique': 26358078, 'metal': 26358079, 'autre_refus': 26358080}]} input_args_next_step : {1380226084: ('0.049413730603211484',), 1380226082: ('0.049413730603211484',), 1380225614: ('0.049413730603211484',), 1380225612: ('0.049413730603211484',), 1380225610: ('0.049413730603211484',), 26358007: ()} output_args : {26358007: [{'papier': 26358069, 'flou': 26358070, 'environnement': 26358071, 'Teint_Dans_La_Masse': 26358072, 'mal_croppe': 26358073, 'cartonnette': 26358074, 'Carton_gris': 26358075, 'kraft': 26358076, 'Carton_brun': 26358077, 'plastique': 26358078, 'metal': 26358079, 'autre_refus': 26358080}]} args : 26358007 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 :6, first value : ('0.049413730603211484',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26358007) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos ph WHERE photo_id IN (1380226084,1380226082,1380225614,1380225612,1380225610) Found this number of photos: 5 ##### Call download_photos : nb_thread : 5 begin to download photo : 1380225610 begin to download photo : 1380225614 begin to download photo : 1380226084 download finish for photo 1380226084 download finish for photo 1380225614 begin to download photo : 1380226082 download finish for photo 1380225610 begin to download photo : 1380225612 download finish for photo 1380225612 download finish for photo 1380226082 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette263580701756512899/ imagette263580731756512899/ length of list_filenames : 5 ; length of list_pids : 5 ; length of list_args : 5 results_Auto_P26358007_30-08-2025_02_14_59.pdf 26358070 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26358070 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette263580701756512899 26358073 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26358073 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette263580731756512899 26358074 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26358074 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1380225803: '1756512786_1309082_1380224886_ba064f97f85208109b07214fdcfcac1c_97411599_rle_crop_3936316496_0.png', 1380225805: '1756512786_1309082_1380224884_97255ea3706b92cc64ca66c6f14e6e81_72072103_rle_crop_3936316526_0.png', 1380225952: '1756512806_1309496_1380224848_5e909f477bd6af7949a439d7137599c9_24097409_rle_crop_3936316698_0.png', 1380225955: '1756512806_1309496_1380224847_b98b6349cabefe20ba67f4e43aa5968f_15748905_rle_crop_3936316709_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/dd0b904da1ef76211ed580dff7024f7d_33340962.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/bcd9ac4cee437062fb94eb9db0a05553_22169763.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/d3c9a72b64debf9e9f94d26b2f43ae93_40253346.png change filename to text .imagette263580741756512899/ imagette263580741756512899/1756512806_1309496_1380224848_5e909f477bd6af7949a439d7137599c9_24097409_rle_crop_3936316698_0.png.png imagette263580741756512899/1756512806_1309496_1380224847_b98b6349cabefe20ba67f4e43aa5968f_15748905_rle_crop_3936316709_0.png.png imagette263580741756512899/1756512786_1309082_1380224884_97255ea3706b92cc64ca66c6f14e6e81_72072103_rle_crop_3936316526_0.png.png imagette263580741756512899/1756512786_1309082_1380224886_ba064f97f85208109b07214fdcfcac1c_97411599_rle_crop_3936316496_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/2459648a2fbfb022b1031b562794616d_22554292.png imagette263580741756512899 26358076 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26358076 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1380225822: '1756512786_1309082_1380224887_8950d64a90f07ab0ca1c983e65ebc070_86103766_rle_crop_3936316484_0.png', 1380225824: '1756512786_1309082_1380224886_ba064f97f85208109b07214fdcfcac1c_97411599_rle_crop_3936316498_0.png', 1380225826: '1756512786_1309082_1380224884_97255ea3706b92cc64ca66c6f14e6e81_72072103_rle_crop_3936316533_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/13b7f5a55a03375c96649f7bb3265db5_82347704.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/d8f9330d734e294d22d57d522d2d9a22_77578100.png change filename to text .imagette263580761756512900/ imagette263580761756512900/1756512786_1309082_1380224886_ba064f97f85208109b07214fdcfcac1c_97411599_rle_crop_3936316498_0.png.png imagette263580761756512900/1756512786_1309082_1380224884_97255ea3706b92cc64ca66c6f14e6e81_72072103_rle_crop_3936316533_0.png.png imagette263580761756512900/1756512786_1309082_1380224887_8950d64a90f07ab0ca1c983e65ebc070_86103766_rle_crop_3936316484_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/4b205d3222adad9e577a6f879312b181_90795253.png imagette263580761756512900 26358078 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26358078 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1380224864: '1756512546_1297983_1380224374_609164ab646c584d40c0327576a05c9c_10286019_rle_crop_3936308760_0.png', 1380224865: '1756512546_1297983_1380224359_2fa55c5fec746080f3db94a5128d86ef_44217620_rle_crop_3936308794_0.png', 1380225173: '1756512687_1304138_1380224828_11b37e1e72ae3661ea61f436722519f7_545652_rle_crop_3936316226_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/5f8d5fc92df3af40f8d61eb9d674eb1e_80323098.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/a37578935a89460eecc7cbabf983a8e2_51552422.png change filename to text .imagette263580781756512900/ imagette263580781756512900/1756512687_1304138_1380224828_11b37e1e72ae3661ea61f436722519f7_545652_rle_crop_3936316226_0.png.png imagette263580781756512900/1756512546_1297983_1380224359_2fa55c5fec746080f3db94a5128d86ef_44217620_rle_crop_3936308794_0.png.png imagette263580781756512900/1756512546_1297983_1380224374_609164ab646c584d40c0327576a05c9c_10286019_rle_crop_3936308760_0.png.png imagette263580791756512900/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/f1a1a1a3b6ada7f3ffac59e212033149_51729069.png imagette263580781756512900 26358079 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26358079 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette263580791756512900 26358080 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26358080 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1380223346: '1756512146_1277824_1380223258_33cca86d21a44192a906f7243c4dad2b_15765865_rle_crop_3936298837_0.png', 1380223347: '1756512146_1277824_1380223257_78d73b617cfacb14cacdd9cd805476a3_93713403_rle_crop_3936298848_0.png', 1380224875: '1756512566_1298341_1380224381_41d7abc25baaa012f8e04fdd3e0e9a7b_48946562_rle_crop_3936308961_0.png', 1380224876: '1756512566_1298341_1380224001_c7c72874d6b7915c9bb41834d1344da7_10333393_rle_crop_3936309010_0.png', 1380225793: '1756512786_1309082_1380224885_d1269c26c3ddcb27735fe904798aa139_47859711_rle_crop_3936316512_0.png', 1380225936: '1756512806_1309496_1380224888_fb187506ed0ef1704da73b4dc13ddc58_29612958_rle_crop_3936316673_0.png', 1380225939: '1756512806_1309496_1380224846_d70cb19328bceaa26f97537911f40268_23104374_rle_crop_3936316720_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/7effc636199051d1856cd35a90d1a94f_54799624.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/78d53f061d719652936ff00e8045faa5_84501640.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/222da2a295a537b1f122e21e700494e0_26298355.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/44457907d026ef5b67bf887b9c91d642_44771139.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/b3983c6062e78a27aef64e71d49ae074_20791278.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/5b526e740d93dc9bf1270840ae552e04_84081254.png change filename to text .imagette263580801756512900/ imagette263580801756512900/1756512806_1309496_1380224846_d70cb19328bceaa26f97537911f40268_23104374_rle_crop_3936316720_0.png.png imagette263580801756512900/1756512566_1298341_1380224001_c7c72874d6b7915c9bb41834d1344da7_10333393_rle_crop_3936309010_0.png.png imagette263580801756512900/1756512806_1309496_1380224888_fb187506ed0ef1704da73b4dc13ddc58_29612958_rle_crop_3936316673_0.png.png imagette263580801756512900/1756512146_1277824_1380223257_78d73b617cfacb14cacdd9cd805476a3_93713403_rle_crop_3936298848_0.png.png imagette263580801756512900/1756512146_1277824_1380223258_33cca86d21a44192a906f7243c4dad2b_15765865_rle_crop_3936298837_0.png.png imagette263580801756512900/1756512566_1298341_1380224381_41d7abc25baaa012f8e04fdd3e0e9a7b_48946562_rle_crop_3936308961_0.png.png imagette263580801756512900/1756512786_1309082_1380224885_d1269c26c3ddcb27735fe904798aa139_47859711_rle_crop_3936316512_0.png.png wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/2054639a83f1556d3b17724e6af783f2_5442238.png imagette263580801756512900 26358072 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26358072 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1380223345: '1756512146_1277824_1380223258_33cca86d21a44192a906f7243c4dad2b_15765865_rle_crop_3936298840_0.png', 1380224874: '1756512566_1298341_1380224001_c7c72874d6b7915c9bb41834d1344da7_10333393_rle_crop_3936309015_0.png', 1380225048: '1756512667_1303703_1380224731_db7ed7aa72bc9e43bba09e3de976cad3_40766818_rle_crop_3936316129_0.png', 1380225050: '1756512667_1303703_1380224731_db7ed7aa72bc9e43bba09e3de976cad3_40766818_rle_crop_3936316124_0.png', 1380225052: '1756512667_1303703_1380224731_db7ed7aa72bc9e43bba09e3de976cad3_40766818_rle_crop_3936316130_0.png', 1380225782: '1756512786_1309082_1380224887_8950d64a90f07ab0ca1c983e65ebc070_86103766_rle_crop_3936316487_0.png', 1380225784: '1756512786_1309082_1380224886_ba064f97f85208109b07214fdcfcac1c_97411599_rle_crop_3936316502_0.png', 1380225786: '1756512786_1309082_1380224886_ba064f97f85208109b07214fdcfcac1c_97411599_rle_crop_3936316501_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/a200ae618beb6468660371136e89bec4_58533917.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/a2f54ef80f480adb81c5694784004da7_12732883.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/7e22e768767c9d37197169d2152cd1e2_60191143.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/dae556c4e978f7c9fa447dbed3c6ad98_15403489.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/1b61d12906acb2e0e185be054e3fe293_15694295.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/50d9700b333e82c208f686a3c70f3c37_97169896.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/78e05f19a438cab890c7b7df23047f6e_78661569.png change filename to text .imagette263580721756512900/ imagette263580721756512900/1756512667_1303703_1380224731_db7ed7aa72bc9e43bba09e3de976cad3_40766818_rle_crop_3936316130_0.png.png imagette263580721756512900/1756512786_1309082_1380224886_ba064f97f85208109b07214fdcfcac1c_97411599_rle_crop_3936316502_0.png.png imagette263580721756512900/1756512667_1303703_1380224731_db7ed7aa72bc9e43bba09e3de976cad3_40766818_rle_crop_3936316129_0.png.png imagette263580721756512900/1756512786_1309082_1380224886_ba064f97f85208109b07214fdcfcac1c_97411599_rle_crop_3936316501_0.png.png imagette263580721756512900/1756512146_1277824_1380223258_33cca86d21a44192a906f7243c4dad2b_15765865_rle_crop_3936298840_0.png.png imagette263580721756512900/1756512786_1309082_1380224887_8950d64a90f07ab0ca1c983e65ebc070_86103766_rle_crop_3936316487_0.png.png imagette263580721756512900/1756512667_1303703_1380224731_db7ed7aa72bc9e43bba09e3de976cad3_40766818_rle_crop_3936316124_0.png.png imagette263580721756512900/1756512566_1298341_1380224001_c7c72874d6b7915c9bb41834d1344da7_10333393_rle_crop_3936309015_0.png.png wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/29a21ed8e3a5f995ea8251b2b0532ca1_73418044.png imagette263580721756512900 26358075 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26358075 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1380224215: '1756512325_1287321_1380223332_b6153dd32e2e299673c9d83bb5e81fd0_44486129_rle_crop_3936300554_0.png', 1380224217: '1756512325_1287321_1380223332_b6153dd32e2e299673c9d83bb5e81fd0_44486129_rle_crop_3936300550_0.png', 1380224860: '1756512546_1297983_1380224367_dc7c2fade73dfa9f10e55e05ce4ce621_27794321_rle_crop_3936308786_0.png', 1380224861: '1756512546_1297983_1380224359_2fa55c5fec746080f3db94a5128d86ef_44217620_rle_crop_3936308791_0.png', 1380224877: '1756512566_1298341_1380224005_120e226b7ad84e5454f14a2e2db867f7_87541908_rle_crop_3936308987_0.png', 1380224878: '1756512566_1298341_1380224003_9ff2848769a6206a7fb8cb964236eb6c_38019002_rle_crop_3936308996_0.png', 1380225166: '1756512687_1304138_1380224828_11b37e1e72ae3661ea61f436722519f7_545652_rle_crop_3936316227_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/9a2d770e6b9a93b50378250d507557f3_36811615.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/fedc8ecda2db217585caa89dae0ec12a_66374035.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/b3681bbf3e855167e306e38a69479668_88954066.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/a0fe7fc7c0ae2be32f8c1941eaef4e15_61811754.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/6365a3825669335404f0ce8508922e82_22042229.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/97c490a789ed26f364d85f41cc3cf2b2_79116234.png change filename to text .imagette263580751756512901/ imagette263580751756512901/1756512566_1298341_1380224005_120e226b7ad84e5454f14a2e2db867f7_87541908_rle_crop_3936308987_0.png.png imagette263580751756512901/1756512566_1298341_1380224003_9ff2848769a6206a7fb8cb964236eb6c_38019002_rle_crop_3936308996_0.png.png imagette263580751756512901/1756512546_1297983_1380224359_2fa55c5fec746080f3db94a5128d86ef_44217620_rle_crop_3936308791_0.png.png imagette263580751756512901/1756512325_1287321_1380223332_b6153dd32e2e299673c9d83bb5e81fd0_44486129_rle_crop_3936300550_0.png.png imagette263580751756512901/1756512687_1304138_1380224828_11b37e1e72ae3661ea61f436722519f7_545652_rle_crop_3936316227_0.png.png imagette263580751756512901/1756512325_1287321_1380223332_b6153dd32e2e299673c9d83bb5e81fd0_44486129_rle_crop_3936300554_0.png.png imagette263580751756512901/1756512546_1297983_1380224367_dc7c2fade73dfa9f10e55e05ce4ce621_27794321_rle_crop_3936308786_0.png.png wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/cf2ac9c2bd28859ba94d8e03d860ec4c_86981123.png imagette263580751756512901 26358077 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26358077 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1380224879: '1756512566_1298341_1380224007_29802d5debbd5bbd595d19b338365982_78048326_rle_crop_3936308978_0.png', 1380225812: '1756512786_1309082_1380224885_d1269c26c3ddcb27735fe904798aa139_47859711_rle_crop_3936316520_0.png', 1380225970: '1756512806_1309496_1380224846_d70cb19328bceaa26f97537911f40268_23104374_rle_crop_3936316718_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/a1b08439c2cad3d7f217f9a7175f2bfa_77600896.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/f6ed60e812042e71d09c560794b8fc48_58140745.png change filename to text .imagette263580771756512901/ imagette263580771756512901/1756512566_1298341_1380224007_29802d5debbd5bbd595d19b338365982_78048326_rle_crop_3936308978_0.png.png imagette263580771756512901/1756512806_1309496_1380224846_d70cb19328bceaa26f97537911f40268_23104374_rle_crop_3936316718_0.png.png imagette263580771756512901/1756512786_1309082_1380224885_d1269c26c3ddcb27735fe904798aa139_47859711_rle_crop_3936316520_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/50e7c24460073f37cfc3dad3a16c0a9a_63118819.png imagette263580771756512901 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=26358007 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/26358082,26358083,26358084,26358085,26358086,26358087,26358088,26358089,26358090,26358091,26358092,26358093?tags=papier,flou,environnement,Teint_Dans_La_Masse,mal_croppe,cartonnette,Carton_gris,kraft,Carton_brun,plastique,metal,autre_refus your option no_mail is active, we will not send the real mail to your client args[1380226084] : ('0.049413730603211484',) no score found for photo 1380226084 We are sending mail with results at report@fotonower.com args[1380226082] : ('0.049413730603211484',) no score found for photo 1380226082 We are sending mail with results at report@fotonower.com args[1380225614] : ('0.049413730603211484',) no score found for photo 1380225614 We are sending mail with results at report@fotonower.com args[1380225612] : ('0.049413730603211484',) no score found for photo 1380225612 We are sending mail with results at report@fotonower.com args[1380225610] : ('0.049413730603211484',) no score found for photo 1380225610 We are sending mail with results at report@fotonower.com refus_total : 0.049413730603211484 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26358007 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_P26358007_30-08-2025_02_14_59.pdf results_Auto_P26358007_30-08-2025_02_14_59.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26358007_30-08-2025_02_14_59.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','26358007','results_Auto_P26358007_30-08-2025_02_14_59.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26358007_30-08-2025_02_14_59.pdf','pdf','','0.16','0.049413730603211484') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26358007]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1380226084, 1380226082, 1380225614, 1380225612, 1380225610] map_info['map_portfolio_photo'] : {26358007: [1380226084, 1380226082, 1380225614, 1380225612, 1380225610, 1380225220, 1380225218, 1380225216, 1380225214, 1380224980, 1380224979, 1380224978, 1380224977, 1380224888, 1380224887, 1380224886, 1380224885, 1380224884, 1380224850, 1380224849, 1380224848, 1380224847, 1380224846, 1380224832, 1380224831, 1380224830, 1380224829, 1380224828, 1380224732, 1380224731, 1380224730, 1380224381, 1380224374, 1380224367, 1380224359, 1380224352, 1380224009, 1380224007, 1380224005, 1380224003, 1380224001, 1380223636, 1380223634, 1380223632, 1380223630, 1380223628, 1380223626, 1380223349, 1380223348, 1380223332, 1380223331, 1380223330, 1380223329, 1380223259, 1380223258, 1380223257]} final : False mtd_id 4302 list_pids : [1380226084, 1380226082, 1380225614, 1380225612, 1380225610] 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, '3640319') ('4302', '26358007', '1380226084', None, None, None, None, None, '3640319') ('4302', None, None, None, None, None, None, None, '3640319') ('4302', '26358007', '1380226082', None, None, None, None, None, '3640319') ('4302', None, None, None, None, None, None, None, '3640319') ('4302', '26358007', '1380225614', None, None, None, None, None, '3640319') ('4302', None, None, None, None, None, None, None, '3640319') ('4302', '26358007', '1380225612', None, None, None, None, None, '3640319') ('4302', None, None, None, None, None, None, None, '3640319') ('4302', '26358007', '1380225610', None, None, None, None, None, '3640319') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 5 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', '26358007', '1380226084', None, None, None, None, None, '3640319'), ('4302', '26358007', '1380226082', None, None, None, None, None, '3640319'), ('4302', '26358007', '1380225614', None, None, None, None, None, '3640319'), ('4302', '26358007', '1380225612', None, None, None, None, None, '3640319'), ('4302', '26358007', '1380225610', None, None, None, None, None, '3640319')] time used for this insertion : 0.04373598098754883 save_final save missing photos in datou_result : time spend for datou_step_exec : 4.076664447784424 time spend to save output : 0.0440065860748291 total time spend for step 4 : 4.120671033859253 step5:split_time_score Sat Aug 30 02:15:03 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 : ['26358007'] 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 : [('26358007',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26358007) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1380226084: {'path': 'temp/1756512899_561979_1380226084_676ad46cf927f59ef5d36ca397480204_62850617.jpg', 'extension': 'jpg'}, 1380225610: {'path': 'temp/1756512899_561979_1380225610_16f654f9736f24e4e16161d98c8089e6_41769272.jpg', 'extension': 'jpg'}, 1380225612: {'path': 'temp/1756512899_561979_1380225612_e2ab119fa7f18c97b0d3437faa7e2460_52440015.jpg', 'extension': 'jpg'}, 1380225614: {'path': 'temp/1756512899_561979_1380225614_2a6880bd722f455e396c5c4821e6989d_51999431.jpg', 'extension': 'jpg'}, 1380226082: {'path': 'temp/1756512899_561979_1380226082_65f7d38b4516ec7241359ea397b21c46_47647737.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 = 26358007; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm',)) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 26358007 group by h (('02', 56),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26358007 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 (26358007) 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 (26358007) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 30082025 26358007 Nombre de photos uploadées : 56 / 23040 (0%) 30082025 26358007 Nombre de photos taguées (types de déchets): 0 / 56 (0%) 30082025 26358007 Nombre de photos taguées (volume) : 0 / 56 (0%) [{'photo_id': 1380223259, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/5ad01eae499c78655241726d511d8af9_2636801.jpg', 'username': None, 'uploaded_at': 1756512072, 'text': 'image_30082025_02_00_04_010145m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1380223258, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/33cca86d21a44192a906f7243c4dad2b_15765865.jpg', 'username': None, 'uploaded_at': 1756512072, 'text': 'image_30082025_02_00_14_010135m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1380223257, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/78d73b617cfacb14cacdd9cd805476a3_93713403.jpg', 'username': None, 'uploaded_at': 1756512072, 'text': 'image_30082025_02_00_43_010139m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1380223332, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/b6153dd32e2e299673c9d83bb5e81fd0_44486129.jpg', 'username': None, 'uploaded_at': 1756512132, 'text': 'image_30082025_02_00_54_010137m0.jpg 4e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 4.0531158447265625e-06 elapsed_time : order_list_meta_photo_and_scores 1.239776611328125e-05 ???????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0039000511169433594 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 26358007, '2025-08-30' ) 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-08-30' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2200963,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.24975824356079102 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= 2200963 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2200963, 'dashboard_run_id': 2208766, 'mtr_portfolio_id': 26354311, 'dashboard_result_id': 14483406, '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_P26354311_30-08-2025_00_17_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26354313, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26354314, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26354315, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26354316, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26354317, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26354318, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26354319, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26354320, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26354321, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26354322, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26354323, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26354324, 'pht': 3726}}"}, {'dashboat_entry_day': 2200963, 'dashboard_run_id': 2208766, 'mtr_portfolio_id': 26354941, 'dashboard_result_id': 14483407, '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_P26354941_30-08-2025_02_01_31.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26354982, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26354983, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26354984, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26354985, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26354986, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26354987, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26354988, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26354989, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26354990, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26354991, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26354992, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26354993, 'pht': 3726}}"}, {'dashboat_entry_day': 2200963, 'dashboard_run_id': 2208766, 'mtr_portfolio_id': 26355515, 'dashboard_result_id': 14483408, '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_P26355515_30-08-2025_00_47_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26355521, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26355522, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26355523, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26355524, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26355525, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26355526, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26355527, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26355528, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26355529, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26355530, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26355531, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26355532, 'pht': 3726}}"}, {'dashboat_entry_day': 2200963, 'dashboard_run_id': 2208766, 'mtr_portfolio_id': 26356029, 'dashboard_result_id': 14483409, '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_P26356029_30-08-2025_01_30_28.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26356038, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26356039, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26356040, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26356041, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26356042, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26356043, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26356044, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26356045, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26356046, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26356047, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26356048, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26356049, 'pht': 3726}}"}, {'dashboat_entry_day': 2200963, 'dashboard_run_id': 2208766, 'mtr_portfolio_id': 26357329, 'dashboard_result_id': 14483410, '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_P26357329_30-08-2025_01_47_01.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26357332, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26357333, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26357334, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26357335, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26357336, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26357337, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26357338, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26357339, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26357340, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26357341, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26357342, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26357343, 'pht': 3726}}"}, {'dashboat_entry_day': 2200963, 'dashboard_run_id': 2208766, 'mtr_portfolio_id': 26357677, 'dashboard_result_id': 14483411, '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_P26357677_30-08-2025_02_03_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26357682, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26357683, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26357684, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26357685, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26357686, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26357687, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26357688, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26357689, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26357690, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26357691, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26357692, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26357693, 'pht': 3726}}"}, {'dashboat_entry_day': 2200963, 'dashboard_run_id': 2208766, 'mtr_portfolio_id': 26358007, 'dashboard_result_id': 14483412, '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_P26358007_30-08-2025_02_13_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26358069, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26358070, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26358071, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26358072, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26358073, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26358074, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26358075, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26358076, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26358077, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26358078, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26358079, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26358080, '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 = 26354311 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': 3639788, 'mtr_portfolio_id': 26354311, 'created_at': datetime.datetime(2025, 8, 30, 0, 17), 'result': '0.05259478752757879', 'result_long': None, 'result_double': None}] Qualite : 0.05259478752757879 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26354311 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26354311_30-08-2025_00_17_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26354311 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_P26354311_30-08-2025_00_17_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26354313, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26354314, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26354315, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26354316, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26354317, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26354318, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26354319, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26354320, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26354321, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26354322, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26354323, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26354324, 'pht': 3726}}" where mtr_portfolio_id = 26354311 and dashboard_run_id = 2208766 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`=26354311 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14483406, 0.05259478752757879, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26354311_30-08-2025_00_17_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26354313, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26354314, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26354315, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26354316, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26354317, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26354318, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26354319, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26354320, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26354321, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26354322, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26354323, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26354324, '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 = 26354941 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': 3639846, 'mtr_portfolio_id': 26354941, 'created_at': datetime.datetime(2025, 8, 30, 2, 1, 30), 'result': '0.0541874581559304', 'result_long': None, 'result_double': None}] Qualite : 0.0541874581559304 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26354941 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26354941_30-08-2025_02_01_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26354941 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_P26354941_30-08-2025_02_01_31.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26354982, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26354983, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26354984, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26354985, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26354986, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26354987, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26354988, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26354989, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26354990, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26354991, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26354992, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26354993, 'pht': 3726}}" where mtr_portfolio_id = 26354941 and dashboard_run_id = 2208766 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`=26354941 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14483407, 0.0541874581559304, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26354941_30-08-2025_02_01_31.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26354982, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26354983, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26354984, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26354985, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26354986, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26354987, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26354988, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26354989, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26354990, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26354991, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26354992, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26354993, '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 = 26355515 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': 3639925, 'mtr_portfolio_id': 26355515, 'created_at': datetime.datetime(2025, 8, 30, 0, 47, 1), 'result': '0.038339709308548096', 'result_long': None, 'result_double': None}] Qualite : 0.038339709308548096 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26355515 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26355515_30-08-2025_00_47_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26355515 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_P26355515_30-08-2025_00_47_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26355521, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26355522, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26355523, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26355524, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26355525, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26355526, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26355527, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26355528, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26355529, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26355530, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26355531, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26355532, 'pht': 3726}}" where mtr_portfolio_id = 26355515 and dashboard_run_id = 2208766 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`=26355515 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14483408, 0.038339709308548096, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26355515_30-08-2025_00_47_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26355521, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26355522, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26355523, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26355524, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26355525, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26355526, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26355527, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26355528, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26355529, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26355530, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26355531, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26355532, '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 = 26356029 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': 3640011, 'mtr_portfolio_id': 26356029, 'created_at': datetime.datetime(2025, 8, 30, 1, 30, 28), 'result': '0.0645348043026146', 'result_long': None, 'result_double': None}] Qualite : 0.0645348043026146 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26356029 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26356029_30-08-2025_01_30_28.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26356029 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_P26356029_30-08-2025_01_30_28.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26356038, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26356039, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26356040, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26356041, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26356042, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26356043, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26356044, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26356045, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26356046, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26356047, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26356048, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26356049, 'pht': 3726}}" where mtr_portfolio_id = 26356029 and dashboard_run_id = 2208766 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`=26356029 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14483409, 0.0645348043026146, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26356029_30-08-2025_01_30_28.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26356038, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26356039, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26356040, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26356041, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26356042, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26356043, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26356044, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26356045, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26356046, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26356047, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26356048, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26356049, '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 = 26357329 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': 3640209, 'mtr_portfolio_id': 26357329, 'created_at': datetime.datetime(2025, 8, 30, 1, 47, 1), 'result': '0.034956030996926596', 'result_long': None, 'result_double': None}] Qualite : 0.034956030996926596 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26357329 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26357329_30-08-2025_01_47_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26357329 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_P26357329_30-08-2025_01_47_01.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26357332, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26357333, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26357334, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26357335, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26357336, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26357337, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26357338, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26357339, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26357340, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26357341, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26357342, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26357343, 'pht': 3726}}" where mtr_portfolio_id = 26357329 and dashboard_run_id = 2208766 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`=26357329 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14483410, 0.034956030996926596, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26357329_30-08-2025_01_47_01.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26357332, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26357333, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26357334, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26357335, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26357336, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26357337, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26357338, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26357339, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26357340, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26357341, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26357342, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26357343, '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 = 26357677 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': 3640245, 'mtr_portfolio_id': 26357677, 'created_at': datetime.datetime(2025, 8, 30, 2, 2, 59), 'result': '0.042465975591740306', 'result_long': None, 'result_double': None}] Qualite : 0.042465975591740306 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26357677 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26357677_30-08-2025_02_03_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26357677 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_P26357677_30-08-2025_02_03_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26357682, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26357683, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26357684, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26357685, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26357686, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26357687, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26357688, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26357689, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26357690, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26357691, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26357692, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26357693, 'pht': 3726}}" where mtr_portfolio_id = 26357677 and dashboard_run_id = 2208766 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`=26357677 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14483411, 0.042465975591740306, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26357677_30-08-2025_02_03_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26357682, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26357683, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26357684, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26357685, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26357686, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26357687, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26357688, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26357689, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26357690, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26357691, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26357692, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26357693, '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 = 26358007 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': 3640319, 'mtr_portfolio_id': 26358007, 'created_at': datetime.datetime(2025, 8, 30, 2, 14, 59), 'result': '0.049413730603211484', 'result_long': None, 'result_double': None}] Qualite : 0.049413730603211484 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26358007 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26358007_30-08-2025_02_14_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26358007 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_P26358007_30-08-2025_02_14_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26358069, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26358070, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26358071, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26358072, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26358073, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26358074, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26358075, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26358076, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26358077, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26358078, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26358079, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26358080, 'pht': 3726}}" where mtr_portfolio_id = 26358007 and dashboard_run_id = 2208766 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`=26358007 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14483412, 0.049413730603211484, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26358007_30-08-2025_02_14_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26358069, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26358070, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26358071, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26358072, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26358073, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26358074, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26358075, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26358076, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26358077, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26358078, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26358079, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26358080, '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 (26354311,26354941,26355515,26356029,26357329,26357677,26358007) result : ((1380209529,), (1380209532,), (1380210237,), (1380210240,), (1380210243,), (1380210649,), (1380210652,), (1380210655,), (1380210658,), (1380210661,), (1380211446,), (1380211447,), (1380211448,), (1380211449,), (1380211450,), (1380211649,), (1380211650,), (1380211651,), (1380211652,), (1380211653,), (1380211654,), (1380211705,), (1380211706,), (1380211707,), (1380211708,), (1380211709,), (1380211775,), (1380211776,), (1380211777,), (1380211778,), (1380211845,), (1380211846,), (1380211847,), (1380211848,), (1380211849,), (1380211850,), (1380211870,), (1380211871,), (1380211872,), (1380211873,), (1380211874,), (1380211917,), (1380211918,), (1380211919,), (1380211939,), (1380211940,), (1380211941,), (1380211942,), (1380211972,), (1380211973,), (1380211974,), (1380211975,), (1380211976,), (1380211977,), (1380212006,), (1380212008,), (1380212010,), (1380212063,), (1380212064,), (1380212065,), (1380212223,), (1380212224,), (1380212225,), (1380212226,), (1380212352,), (1380212349,), (1380212350,), (1380212351,), (1380212436,), (1380212437,), (1380212438,), (1380212439,), (1380212440,), (1380212731,), (1380212733,), (1380212734,), (1380212735,), (1380212736,), (1380212847,), (1380212848,), (1380213045,), (1380213047,), (1380213049,), (1380213051,), (1380213053,), (1380213055,), (1380213157,), (1380213158,), (1380213159,), (1380213160,), (1380213161,), (1380213210,), (1380213212,), (1380213214,), (1380213217,), (1380213219,), (1380213524,), (1380213525,), (1380213526,), (1380213527,), (1380213528,), (1380213529,), (1380213622,), (1380213623,), (1380213624,), (1380213773,), (1380213775,), (1380213777,), (1380213779,), (1380213899,), (1380213900,), (1380213901,), (1380213902,), (1380213903,), (1380213943,), (1380213944,), (1380213945,), (1380213946,), (1380213947,), (1380213948,), (1380214087,), (1380214088,), (1380214089,), (1380214090,), (1380214091,), (1380214114,), (1380214116,), (1380214118,), (1380214479,), (1380214480,), (1380214481,), (1380214586,), (1380214582,), (1380214583,), (1380214584,), (1380214585,), (1380214614,), (1380214615,), (1380214616,), (1380214617,), (1380214678,), (1380214680,), (1380214682,), (1380214684,), (1380215002,), (1380215004,), (1380215089,), (1380215090,), (1380215091,), (1380215092,), (1380215093,), (1380215160,), (1380215161,), (1380215162,), (1380215163,), (1380215164,), (1380215183,), (1380215184,), (1380215185,), (1380215186,), (1380215187,), (1380215209,), (1380215210,), (1380215212,), (1380215213,), (1380215214,), (1380215215,), (1380215240,), (1380215241,), (1380215242,), (1380215275,), (1380215276,), (1380215277,), (1380215278,), (1380215279,), (1380215299,), (1380215300,), (1380215301,), (1380215302,), (1380215303,), (1380215336,), (1380215337,), (1380215338,), (1380215423,), (1380215424,), (1380215489,), (1380215490,), (1380215491,), (1380215492,), (1380215528,), (1380215524,), (1380215525,), (1380215526,), (1380215527,), (1380215561,), (1380215562,), (1380215563,), (1380215564,), (1380215565,), (1380215566,), (1380215641,), (1380215642,), (1380215643,), (1380215668,), (1380215669,), (1380215670,), (1380215671,), (1380215672,), (1380215673,), (1380215700,), (1380215701,), (1380215702,), (1380215703,), (1380215704,), (1380215756,), (1380215757,), (1380215758,), (1380215901,), (1380215902,), (1380215903,), (1380215904,), (1380215905,), (1380215935,), (1380215936,), (1380215937,), (1380215938,), (1380215939,), (1380215940,), (1380215973,), (1380215974,), (1380215976,), (1380215978,), (1380216105,), (1380216106,), (1380216107,), (1380216108,), (1380216109,), (1380216110,), (1380216142,), (1380216143,), (1380216144,), (1380216145,), (1380216146,), (1380216147,), (1380216232,), (1380216233,), (1380216234,), (1380216272,), (1380216273,), (1380216274,), (1380216275,), (1380216276,), (1380216277,), (1380222266,), (1380222284,), (1380222285,), (1380222286,), (1380222287,), (1380222311,), (1380222312,), (1380222313,), (1380222314,), (1380222315,), (1380222316,), (1380222441,), (1380222442,), (1380222443,), (1380222460,), (1380222461,), (1380222482,), (1380222483,), (1380222484,), (1380222504,), (1380222505,), (1380222506,), (1380222507,), (1380222569,), (1380222570,), (1380222571,), (1380222590,), (1380222591,), (1380222592,), (1380222620,), (1380222621,), (1380222637,), (1380222638,), (1380222640,), (1380222668,), (1380222669,), (1380222670,), (1380222671,), (1380222697,), (1380222698,), (1380222699,), (1380222700,), (1380222722,), (1380222723,), (1380222724,), (1380222725,), (1380222726,), (1380222748,), (1380222749,), (1380222750,), (1380222794,), (1380222789,), (1380222790,), (1380222791,), (1380222792,), (1380222793,), (1380222823,), (1380222824,), (1380222825,), (1380222826,), (1380222827,), (1380222850,), (1380222851,), (1380222852,), (1380222853,), (1380222854,), (1380222872,), (1380222873,), (1380222874,), (1380222875,), (1380222977,), (1380222978,), (1380222979,), (1380222980,), (1380222981,), (1380222996,), (1380222997,), (1380222998,), (1380222999,), (1380223000,), (1380223021,), (1380223022,), (1380223023,), (1380223024,), (1380223045,), (1380223046,), (1380223047,), (1380223048,), (1380223068,), (1380223069,), (1380223070,), (1380223071,), (1380223072,), (1380223086,), (1380223087,), (1380223088,), (1380223140,), (1380223141,), (1380223142,), (1380223143,), (1380223162,), (1380223163,), (1380223164,), (1380223165,), (1380223166,), (1380223190,), (1380223191,), (1380223215,), (1380223216,), (1380223218,), (1380223219,), (1380223220,), (1380223225,), (1380223226,), (1380223227,), (1380223228,), (1380223260,), (1380223257,), (1380223258,), (1380223259,), (1380223329,), (1380223330,), (1380223331,), (1380223332,), (1380223348,), (1380223349,), (1380223626,), (1380223628,), (1380223630,), (1380223632,), (1380223634,), (1380223636,), (1380224001,), (1380224003,), (1380224005,), (1380224007,), (1380224009,), (1380224352,), (1380224359,), (1380224367,), (1380224374,), (1380224381,), (1380224730,), (1380224731,), (1380224732,), (1380224828,), (1380224829,), (1380224830,), (1380224831,), (1380224832,), (1380224846,), (1380224847,), (1380224848,), (1380224849,), (1380224850,), (1380224884,), (1380224885,), (1380224886,), (1380224887,), (1380224888,), (1380224977,), (1380224978,), (1380224979,), (1380224980,), (1380225214,), (1380225216,), (1380225218,), (1380225220,), (1380225610,), (1380225612,), (1380225614,), (1380226082,), (1380226084,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'30082025': {'nb_upload': 56, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26358007]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1380226084, 1380226082, 1380225614, 1380225612, 1380225610] map_info['map_portfolio_photo'] : {26358007: [1380226084, 1380226082, 1380225614, 1380225612, 1380225610, 1380225220, 1380225218, 1380225216, 1380225214, 1380224980, 1380224979, 1380224978, 1380224977, 1380224888, 1380224887, 1380224886, 1380224885, 1380224884, 1380224850, 1380224849, 1380224848, 1380224847, 1380224846, 1380224832, 1380224831, 1380224830, 1380224829, 1380224828, 1380224732, 1380224731, 1380224730, 1380224381, 1380224374, 1380224367, 1380224359, 1380224352, 1380224009, 1380224007, 1380224005, 1380224003, 1380224001, 1380223636, 1380223634, 1380223632, 1380223630, 1380223628, 1380223626, 1380223349, 1380223348, 1380223332, 1380223331, 1380223330, 1380223329, 1380223259, 1380223258, 1380223257]} final : True mtd_id 4302 list_pids : [1380226084, 1380226082, 1380225614, 1380225612, 1380225610] Looping around the photos to save general results len do output : 1 /26358007Didn'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, '3640319') ('4302', '26358007', '1380226084', None, None, None, None, None, '3640319') ('4302', None, None, None, None, None, None, None, '3640319') ('4302', '26358007', '1380226082', None, None, None, None, None, '3640319') ('4302', None, None, None, None, None, None, None, '3640319') ('4302', '26358007', '1380225614', None, None, None, None, None, '3640319') ('4302', None, None, None, None, None, None, None, '3640319') ('4302', '26358007', '1380225612', None, None, None, None, None, '3640319') ('4302', None, None, None, None, None, None, None, '3640319') ('4302', '26358007', '1380225610', None, None, None, None, None, '3640319') 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', None, '26358007', 'None', None, None, None, None, '3640319'), ('4302', '26358007', '1380226084', None, None, None, None, None, '3640319'), ('4302', '26358007', '1380226082', None, None, None, None, None, '3640319'), ('4302', '26358007', '1380225614', None, None, None, None, None, '3640319'), ('4302', '26358007', '1380225612', None, None, None, None, None, '3640319'), ('4302', '26358007', '1380225610', None, None, None, None, None, '3640319')] time used for this insertion : 0.014789104461669922 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.7515420913696289 time spend to save output : 0.014971256256103516 total time spend for step 5 : 0.7665133476257324 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 (3640319) 1.97user 2.30system 0:10.25elapsed 41%CPU (0avgtext+0avgdata 160672maxresident)k 2080inputs+7152outputs (20major+63931minor)pagefaults 0swaps