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 : 1012794 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 (3381815) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3381815) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25432949 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3381815'] with mtr_portfolio_ids : ['25432949'] and first list_photo_ids : [] new path : /proc/1012794/ Name: python3 Umask: 0002 State: R (running) Tgid: 1012794 Ngid: 0 Pid: 1012794 PPid: 1012793 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1012794 NSpid: 1012794 NSpgid: 1012343 NSsid: 1012343 VmPeak: 1106964 kB VmSize: 1106964 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98600 kB VmRSS: 98600 kB RssAnon: 59820 kB RssFile: 38780 kB RssShmem: 0 kB VmData: 865716 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 580 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: 48 nonvoluntary_ctxt_switches: 121 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1012794', 'Ngid': '0', 'Pid': '1012794', 'PPid': '1012793', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1012794', 'NSpid': '1012794', 'NSpgid': '1012343', 'NSsid': '1012343', 'VmPeak': '1106964 kB', 'VmSize': '1106964 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98600 kB', 'VmRSS': '98600 kB', 'RssAnon': '59820 kB', 'RssFile': '38780 kB', 'RssShmem': '0 kB', 'VmData': '865716 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '580 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': '48', 'nonvoluntary_ctxt_switches': '121'} ('datou_batch_current', '1012794', '1106964', '0', '1106964', '865716', '98600', b'', 'marlene', '3381815') 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 (25432949) 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 (3381815 ) ) 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 (25432949) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1374232903, 'portfolio_id': 25432949}, {'photo_id': 1374232902, 'portfolio_id': 25432949}, {'photo_id': 1374232901, 'portfolio_id': 25432949}, {'photo_id': 1374232889, 'portfolio_id': 25432949}, {'photo_id': 1374232887, 'portfolio_id': 25432949}, {'photo_id': 1374232885, 'portfolio_id': 25432949}, {'photo_id': 1374232878, 'portfolio_id': 25432949}, {'photo_id': 1374232876, 'portfolio_id': 25432949}, {'photo_id': 1374232874, 'portfolio_id': 25432949}, {'photo_id': 1374232871, 'portfolio_id': 25432949}, {'photo_id': 1374232865, 'portfolio_id': 25432949}, {'photo_id': 1374232862, 'portfolio_id': 25432949}, {'photo_id': 1374232855, 'portfolio_id': 25432949}, {'photo_id': 1374232852, 'portfolio_id': 25432949}, {'photo_id': 1374232842, 'portfolio_id': 25432949}, {'photo_id': 1374232840, 'portfolio_id': 25432949}, {'photo_id': 1374232839, 'portfolio_id': 25432949}, {'photo_id': 1374232837, 'portfolio_id': 25432949}] map_portfolio_id_photo_id: {25432949: [1374232903, 1374232902, 1374232901, 1374232889, 1374232887, 1374232885, 1374232878, 1374232876, 1374232874, 1374232871, 1374232865, 1374232862, 1374232855, 1374232852, 1374232842, 1374232840, 1374232839, 1374232837]} ##### 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.014364480972290039 #### 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 Tue Jul 29 01:34:28 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 (25432949) 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 : 25432949 get user id for portfolio 25432949 get sub ptf for main ptf 25432949, type 3726 and hashtags ['papier', 'environnement', 'metal', 'mal_croppe', 'cartonnette', 'flou', 'plastique', 'Carton_brun', 'Carton_gris', 'Teint_Dans_La_Masse', 'kraft', 'autre_refus'] 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`=25432949 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','environnement','metal','mal_croppe','cartonnette','flou','plastique','Carton_brun','Carton_gris','Teint_Dans_La_Masse','kraft','autre_refus')) 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`=25432949 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','environnement','metal','mal_croppe','cartonnette','flou','plastique','Carton_brun','Carton_gris','Teint_Dans_La_Masse','kraft','autre_refus')) AND mptpi.`min_score`=0.5 To do returned map {'plastique': {'main_port_id': 25432949, 'sub_port_id': 25432983, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17148421, 'last_updated_at': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 7, 29, 1, 33, 28)}, 'Carton_brun': {'main_port_id': 25432949, 'sub_port_id': 25432984, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17148422, 'last_updated_at': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 7, 29, 1, 33, 28)}, 'environnement': {'main_port_id': 25432949, 'sub_port_id': 25432985, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17148423, 'last_updated_at': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 7, 29, 1, 33, 28)}, 'Carton_gris': {'main_port_id': 25432949, 'sub_port_id': 25432986, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17148424, 'last_updated_at': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 7, 29, 1, 33, 28)}, 'kraft': {'main_port_id': 25432949, 'sub_port_id': 25432987, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17148425, 'last_updated_at': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 7, 29, 1, 33, 28)}, 'mal_croppe': {'main_port_id': 25432949, 'sub_port_id': 25432988, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17148426, 'last_updated_at': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 7, 29, 1, 33, 28)}, 'flou': {'main_port_id': 25432949, 'sub_port_id': 25432989, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17148427, 'last_updated_at': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 7, 29, 1, 33, 28)}, 'cartonnette': {'main_port_id': 25432949, 'sub_port_id': 25432990, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17148428, 'last_updated_at': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 7, 29, 1, 33, 28)}, 'papier': {'main_port_id': 25432949, 'sub_port_id': 25432991, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17148429, 'last_updated_at': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 7, 29, 1, 33, 28)}, 'Teint_Dans_La_Masse': {'main_port_id': 25432949, 'sub_port_id': 25432992, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17148430, 'last_updated_at': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 7, 29, 1, 33, 28)}, 'autre_refus': {'main_port_id': 25432949, 'sub_port_id': 25432993, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17148431, 'last_updated_at': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 7, 29, 1, 33, 28)}, 'metal': {'main_port_id': 25432949, 'sub_port_id': 25432994, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17148432, 'last_updated_at': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 7, 29, 1, 33, 28)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25432983 , 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=25432949 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 (25432983) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25432949) result : ((1374232837,), (1374232839,), (1374232840,), (1374232842,), (1374232852,), (1374232855,), (1374232862,), (1374232865,), (1374232871,), (1374232874,), (1374232876,), (1374232878,), (1374232885,), (1374232887,), (1374232889,), (1374232901,), (1374232902,), (1374232903,)) 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 25432984 , 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=25432949 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 (25432984) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25432949) result : ((1374232837,), (1374232839,), (1374232840,), (1374232842,), (1374232852,), (1374232855,), (1374232862,), (1374232865,), (1374232871,), (1374232874,), (1374232876,), (1374232878,), (1374232885,), (1374232887,), (1374232889,), (1374232901,), (1374232902,), (1374232903,)) 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 25432985 , 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=25432949 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 (25432985) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25432949) result : ((1374232837,), (1374232839,), (1374232840,), (1374232842,), (1374232852,), (1374232855,), (1374232862,), (1374232865,), (1374232871,), (1374232874,), (1374232876,), (1374232878,), (1374232885,), (1374232887,), (1374232889,), (1374232901,), (1374232902,), (1374232903,)) 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 25432986 , 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=25432949 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 (25432986) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25432949) result : ((1374232837,), (1374232839,), (1374232840,), (1374232842,), (1374232852,), (1374232855,), (1374232862,), (1374232865,), (1374232871,), (1374232874,), (1374232876,), (1374232878,), (1374232885,), (1374232887,), (1374232889,), (1374232901,), (1374232902,), (1374232903,)) 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 25432987 , 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=25432949 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 (25432987) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25432949) result : ((1374232837,), (1374232839,), (1374232840,), (1374232842,), (1374232852,), (1374232855,), (1374232862,), (1374232865,), (1374232871,), (1374232874,), (1374232876,), (1374232878,), (1374232885,), (1374232887,), (1374232889,), (1374232901,), (1374232902,), (1374232903,)) 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 25432988 , 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=25432949 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 (25432988) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25432949) result : ((1374232837,), (1374232839,), (1374232840,), (1374232842,), (1374232852,), (1374232855,), (1374232862,), (1374232865,), (1374232871,), (1374232874,), (1374232876,), (1374232878,), (1374232885,), (1374232887,), (1374232889,), (1374232901,), (1374232902,), (1374232903,)) 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 25432989 , 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=25432949 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 (25432989) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25432949) result : ((1374232837,), (1374232839,), (1374232840,), (1374232842,), (1374232852,), (1374232855,), (1374232862,), (1374232865,), (1374232871,), (1374232874,), (1374232876,), (1374232878,), (1374232885,), (1374232887,), (1374232889,), (1374232901,), (1374232902,), (1374232903,)) 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 25432990 , 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=25432949 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 (25432990) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25432949) result : ((1374232837,), (1374232839,), (1374232840,), (1374232842,), (1374232852,), (1374232855,), (1374232862,), (1374232865,), (1374232871,), (1374232874,), (1374232876,), (1374232878,), (1374232885,), (1374232887,), (1374232889,), (1374232901,), (1374232902,), (1374232903,)) 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 25432991 , 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=25432949 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 (25432991) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25432949) result : ((1374232837,), (1374232839,), (1374232840,), (1374232842,), (1374232852,), (1374232855,), (1374232862,), (1374232865,), (1374232871,), (1374232874,), (1374232876,), (1374232878,), (1374232885,), (1374232887,), (1374232889,), (1374232901,), (1374232902,), (1374232903,)) 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 25432992 , 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=25432949 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 (25432992) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25432949) result : ((1374232837,), (1374232839,), (1374232840,), (1374232842,), (1374232852,), (1374232855,), (1374232862,), (1374232865,), (1374232871,), (1374232874,), (1374232876,), (1374232878,), (1374232885,), (1374232887,), (1374232889,), (1374232901,), (1374232902,), (1374232903,)) 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 25432993 , 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=25432949 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 (25432993) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25432949) result : ((1374232837,), (1374232839,), (1374232840,), (1374232842,), (1374232852,), (1374232855,), (1374232862,), (1374232865,), (1374232871,), (1374232874,), (1374232876,), (1374232878,), (1374232885,), (1374232887,), (1374232889,), (1374232901,), (1374232902,), (1374232903,)) 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 25432994 , 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=25432949 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 (25432994) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25432949) result : ((1374232837,), (1374232839,), (1374232840,), (1374232842,), (1374232852,), (1374232855,), (1374232862,), (1374232865,), (1374232871,), (1374232874,), (1374232876,), (1374232878,), (1374232885,), (1374232887,), (1374232889,), (1374232901,), (1374232902,), (1374232903,)) 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`=25432949 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','environnement','metal','mal_croppe','cartonnette','flou','plastique','Carton_brun','Carton_gris','Teint_Dans_La_Masse','kraft','autre_refus')) 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`=25432949 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','environnement','metal','mal_croppe','cartonnette','flou','plastique','Carton_brun','Carton_gris','Teint_Dans_La_Masse','kraft','autre_refus')) AND mptpi.`min_score`=0.5 To do returned map {'plastique': {'main_port_id': 25432949, 'sub_port_id': 25432996, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17148433, 'last_updated_at': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 7, 29, 1, 33, 29)}, 'Carton_brun': {'main_port_id': 25432949, 'sub_port_id': 25432997, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17148434, 'last_updated_at': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 7, 29, 1, 33, 29)}, 'environnement': {'main_port_id': 25432949, 'sub_port_id': 25432998, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17148435, 'last_updated_at': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 7, 29, 1, 33, 29)}, 'Carton_gris': {'main_port_id': 25432949, 'sub_port_id': 25432999, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17148436, 'last_updated_at': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 7, 29, 1, 33, 29)}, 'kraft': {'main_port_id': 25432949, 'sub_port_id': 25433000, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17148437, 'last_updated_at': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 7, 29, 1, 33, 29)}, 'mal_croppe': {'main_port_id': 25432949, 'sub_port_id': 25433001, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17148438, 'last_updated_at': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 7, 29, 1, 33, 29)}, 'flou': {'main_port_id': 25432949, 'sub_port_id': 25433002, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17148439, 'last_updated_at': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 7, 29, 1, 33, 29)}, 'cartonnette': {'main_port_id': 25432949, 'sub_port_id': 25433003, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17148440, 'last_updated_at': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 7, 29, 1, 33, 29)}, 'papier': {'main_port_id': 25432949, 'sub_port_id': 25433004, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17148441, 'last_updated_at': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 7, 29, 1, 33, 29)}, 'Teint_Dans_La_Masse': {'main_port_id': 25432949, 'sub_port_id': 25433005, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17148442, 'last_updated_at': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 7, 29, 1, 33, 29)}, 'autre_refus': {'main_port_id': 25432949, 'sub_port_id': 25433006, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17148443, 'last_updated_at': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 7, 29, 1, 33, 29)}, 'metal': {'main_port_id': 25432949, 'sub_port_id': 25433007, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17148444, 'last_updated_at': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 7, 29, 1, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 7, 29, 1, 33, 29)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25432996,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25432983 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25432997,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25432984 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25432998,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25432985 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25432999,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25432986 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25433000,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25432987 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25433001,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25432988 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25433002,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25432989 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25433003,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25432990 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25433004,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25432991 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25433005,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25432992 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25433006,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25432993 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25433007,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25432994 lien utilise dans velours : https://www.fotonower.com/velours/25432996,25432997,25432998,25432999,25433000,25433001,25433002,25433003,25433004,25433005,25433006,25433007?tags=plastique,Carton_brun,environnement,Carton_gris,kraft,mal_croppe,flou,cartonnette,papier,Teint_Dans_La_Masse,autre_refus,metal After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25432949]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1374232903, 1374232902, 1374232901, 1374232889, 1374232887, 1374232885, 1374232878, 1374232876, 1374232874, 1374232871, 1374232865, 1374232862] map_info['map_portfolio_photo'] : {25432949: [1374232903, 1374232902, 1374232901, 1374232889, 1374232887, 1374232885, 1374232878, 1374232876, 1374232874, 1374232871, 1374232865, 1374232862, 1374232855, 1374232852, 1374232842, 1374232840, 1374232839, 1374232837]} final : False mtd_id 4302 list_pids : [1374232903, 1374232902, 1374232901, 1374232889, 1374232887, 1374232885, 1374232878, 1374232876, 1374232874, 1374232871, 1374232865, 1374232862] Looping around the photos to save general results len do output : 1 /25432949. 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, '3381815') ('4302', '25432949', '1374232903', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232902', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232901', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232889', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232887', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232885', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232878', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232876', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232874', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232871', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232865', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232862', None, None, None, None, None, '3381815') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '25432949', "{'plastique': 25432983, 'Carton_brun': 25432984, 'environnement': 25432985, 'Carton_gris': 25432986, 'kraft': 25432987, 'mal_croppe': 25432988, 'flou': 25432989, 'cartonnette': 25432990, 'papier': 25432991, 'Teint_Dans_La_Masse': 25432992, 'autre_refus': 25432993, 'metal': 25432994}", None, None, None, None, '3381815'), ('4302', '25432949', '1374232903', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232902', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232901', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232889', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232887', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232885', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232878', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232876', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232874', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232871', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232865', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232862', None, None, None, None, None, '3381815')] time used for this insertion : 0.01700878143310547 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.4303686618804932 time spend to save output : 0.0173032283782959 total time spend for step 1 : 1.447671890258789 step2:final Tue Jul 29 01:34:30 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 (25432949) 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 25432949 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1374232855,1374232852,1374232842,1374232840,1374232839,1374232837,1374232878,1374232876,1374232874,1374232871,1374232865,1374232862,1374232903,1374232902,1374232901,1374232889,1374232887,1374232885); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25432949]) Inside saveOutput : final : False verbose : True original output for save of step final : {1374232903: ('0.0',), 1374232902: ('0.0',), 1374232901: ('0.0',), 1374232889: ('0.0',), 1374232887: ('0.0',), 1374232885: ('0.0',), 1374232878: ('0.0',), 1374232876: ('0.0',), 1374232874: ('0.0',), 1374232871: ('0.0',), 1374232865: ('0.0',), 1374232862: ('0.0',)} new output for save of step final : {1374232903: ('0.0',), 1374232902: ('0.0',), 1374232901: ('0.0',), 1374232889: ('0.0',), 1374232887: ('0.0',), 1374232885: ('0.0',), 1374232878: ('0.0',), 1374232876: ('0.0',), 1374232874: ('0.0',), 1374232871: ('0.0',), 1374232865: ('0.0',), 1374232862: ('0.0',)} [1374232903, 1374232902, 1374232901, 1374232889, 1374232887, 1374232885, 1374232878, 1374232876, 1374232874, 1374232871, 1374232865, 1374232862] map_info['map_portfolio_photo'] : {25432949: [1374232903, 1374232902, 1374232901, 1374232889, 1374232887, 1374232885, 1374232878, 1374232876, 1374232874, 1374232871, 1374232865, 1374232862, 1374232855, 1374232852, 1374232842, 1374232840, 1374232839, 1374232837]} final : False mtd_id 4302 list_pids : [1374232903, 1374232902, 1374232901, 1374232889, 1374232887, 1374232885, 1374232878, 1374232876, 1374232874, 1374232871, 1374232865, 1374232862] Looping around the photos to save general results len do output : 12 /1374232903.Didn't retrieve data . /1374232902.Didn't retrieve data . /1374232901.Didn't retrieve data . /1374232889.Didn't retrieve data . /1374232887.Didn't retrieve data . /1374232885.Didn't retrieve data . /1374232878.Didn't retrieve data . /1374232876.Didn't retrieve data . /1374232874.Didn't retrieve data . /1374232871.Didn't retrieve data . /1374232865.Didn't retrieve data . /1374232862.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, '3381815') ('4302', '25432949', '1374232903', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232902', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232901', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232889', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232887', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232885', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232878', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232876', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232874', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232871', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232865', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232862', None, None, None, None, None, '3381815') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 36 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '25432949', '1374232903', '0.0', None, None, None, None, '3381815'), ('4302', '25432949', '1374232902', '0.0', None, None, None, None, '3381815'), ('4302', '25432949', '1374232901', '0.0', None, None, None, None, '3381815'), ('4302', '25432949', '1374232889', '0.0', None, None, None, None, '3381815'), ('4302', '25432949', '1374232887', '0.0', None, None, None, None, '3381815'), ('4302', '25432949', '1374232885', '0.0', None, None, None, None, '3381815'), ('4302', '25432949', '1374232878', '0.0', None, None, None, None, '3381815'), ('4302', '25432949', '1374232876', '0.0', None, None, None, None, '3381815'), ('4302', '25432949', '1374232874', '0.0', None, None, None, None, '3381815'), ('4302', '25432949', '1374232871', '0.0', None, None, None, None, '3381815'), ('4302', '25432949', '1374232865', '0.0', None, None, None, None, '3381815'), ('4302', '25432949', '1374232862', '0.0', None, None, None, None, '3381815')] time used for this insertion : 0.016622066497802734 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.05070209503173828 time spend to save output : 0.017323017120361328 total time spend for step 2 : 0.06802511215209961 step3:velours_tree Tue Jul 29 01:34:30 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 : {25432949: [{'plastique': 25432983, 'Carton_brun': 25432984, 'environnement': 25432985, 'Carton_gris': 25432986, 'kraft': 25432987, 'mal_croppe': 25432988, 'flou': 25432989, 'cartonnette': 25432990, 'papier': 25432991, 'Teint_Dans_La_Masse': 25432992, 'autre_refus': 25432993, 'metal': 25432994}]} input_args_next_step : {25432949: ()} output_args : {25432949: [{'plastique': 25432983, 'Carton_brun': 25432984, 'environnement': 25432985, 'Carton_gris': 25432986, 'kraft': 25432987, 'mal_croppe': 25432988, 'flou': 25432989, 'cartonnette': 25432990, 'papier': 25432991, 'Teint_Dans_La_Masse': 25432992, 'autre_refus': 25432993, 'metal': 25432994}]} args : 25432949 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 : ({'plastique': 25432983, 'Carton_brun': 25432984, 'environnement': 25432985, 'Carton_gris': 25432986, 'kraft': 25432987, 'mal_croppe': 25432988, 'flou': 25432989, 'cartonnette': 25432990, 'papier': 25432991, 'Teint_Dans_La_Masse': 25432992, 'autre_refus': 25432993, 'metal': 25432994},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25432949) 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([25432949]) 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.3060789108276367 time spend to save output : 5.316734313964844e-05 total time spend for step 3 : 0.30613207817077637 step4:send_mail_cod Tue Jul 29 01:34:30 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 : {1374232903: ('0.0',), 1374232902: ('0.0',), 1374232901: ('0.0',), 1374232889: ('0.0',), 1374232887: ('0.0',), 1374232885: ('0.0',), 1374232878: ('0.0',), 1374232876: ('0.0',), 1374232874: ('0.0',), 1374232871: ('0.0',), 1374232865: ('0.0',), 1374232862: ('0.0',)} input_args_next_step : {1374232903: ()} output_args : {1374232903: ('0.0',), 1374232902: ('0.0',), 1374232901: ('0.0',), 1374232889: ('0.0',), 1374232887: ('0.0',), 1374232885: ('0.0',), 1374232878: ('0.0',), 1374232876: ('0.0',), 1374232874: ('0.0',), 1374232871: ('0.0',), 1374232865: ('0.0',), 1374232862: ('0.0',)} args : 1374232903 depend.output_id : 0 input_args_next_step : {1374232903: ('0.0',), 1374232902: ()} output_args : {1374232903: ('0.0',), 1374232902: ('0.0',), 1374232901: ('0.0',), 1374232889: ('0.0',), 1374232887: ('0.0',), 1374232885: ('0.0',), 1374232878: ('0.0',), 1374232876: ('0.0',), 1374232874: ('0.0',), 1374232871: ('0.0',), 1374232865: ('0.0',), 1374232862: ('0.0',)} args : 1374232902 depend.output_id : 0 input_args_next_step : {1374232903: ('0.0',), 1374232902: ('0.0',), 1374232901: ()} output_args : {1374232903: ('0.0',), 1374232902: ('0.0',), 1374232901: ('0.0',), 1374232889: ('0.0',), 1374232887: ('0.0',), 1374232885: ('0.0',), 1374232878: ('0.0',), 1374232876: ('0.0',), 1374232874: ('0.0',), 1374232871: ('0.0',), 1374232865: ('0.0',), 1374232862: ('0.0',)} args : 1374232901 depend.output_id : 0 input_args_next_step : {1374232903: ('0.0',), 1374232902: ('0.0',), 1374232901: ('0.0',), 1374232889: ()} output_args : {1374232903: ('0.0',), 1374232902: ('0.0',), 1374232901: ('0.0',), 1374232889: ('0.0',), 1374232887: ('0.0',), 1374232885: ('0.0',), 1374232878: ('0.0',), 1374232876: ('0.0',), 1374232874: ('0.0',), 1374232871: ('0.0',), 1374232865: ('0.0',), 1374232862: ('0.0',)} args : 1374232889 depend.output_id : 0 input_args_next_step : {1374232903: ('0.0',), 1374232902: ('0.0',), 1374232901: ('0.0',), 1374232889: ('0.0',), 1374232887: ()} output_args : {1374232903: ('0.0',), 1374232902: ('0.0',), 1374232901: ('0.0',), 1374232889: ('0.0',), 1374232887: ('0.0',), 1374232885: ('0.0',), 1374232878: ('0.0',), 1374232876: ('0.0',), 1374232874: ('0.0',), 1374232871: ('0.0',), 1374232865: ('0.0',), 1374232862: ('0.0',)} args : 1374232887 depend.output_id : 0 input_args_next_step : {1374232903: ('0.0',), 1374232902: ('0.0',), 1374232901: ('0.0',), 1374232889: ('0.0',), 1374232887: ('0.0',), 1374232885: ()} output_args : {1374232903: ('0.0',), 1374232902: ('0.0',), 1374232901: ('0.0',), 1374232889: ('0.0',), 1374232887: ('0.0',), 1374232885: ('0.0',), 1374232878: ('0.0',), 1374232876: ('0.0',), 1374232874: ('0.0',), 1374232871: ('0.0',), 1374232865: ('0.0',), 1374232862: ('0.0',)} args : 1374232885 depend.output_id : 0 input_args_next_step : {1374232903: ('0.0',), 1374232902: ('0.0',), 1374232901: ('0.0',), 1374232889: ('0.0',), 1374232887: ('0.0',), 1374232885: ('0.0',), 1374232878: ()} output_args : {1374232903: ('0.0',), 1374232902: ('0.0',), 1374232901: ('0.0',), 1374232889: ('0.0',), 1374232887: ('0.0',), 1374232885: ('0.0',), 1374232878: ('0.0',), 1374232876: ('0.0',), 1374232874: ('0.0',), 1374232871: ('0.0',), 1374232865: ('0.0',), 1374232862: ('0.0',)} args : 1374232878 depend.output_id : 0 input_args_next_step : {1374232903: ('0.0',), 1374232902: ('0.0',), 1374232901: ('0.0',), 1374232889: ('0.0',), 1374232887: ('0.0',), 1374232885: ('0.0',), 1374232878: ('0.0',), 1374232876: ()} output_args : {1374232903: ('0.0',), 1374232902: ('0.0',), 1374232901: ('0.0',), 1374232889: ('0.0',), 1374232887: ('0.0',), 1374232885: ('0.0',), 1374232878: ('0.0',), 1374232876: ('0.0',), 1374232874: ('0.0',), 1374232871: ('0.0',), 1374232865: ('0.0',), 1374232862: ('0.0',)} args : 1374232876 depend.output_id : 0 input_args_next_step : {1374232903: ('0.0',), 1374232902: ('0.0',), 1374232901: ('0.0',), 1374232889: ('0.0',), 1374232887: ('0.0',), 1374232885: ('0.0',), 1374232878: ('0.0',), 1374232876: ('0.0',), 1374232874: ()} output_args : {1374232903: ('0.0',), 1374232902: ('0.0',), 1374232901: ('0.0',), 1374232889: ('0.0',), 1374232887: ('0.0',), 1374232885: ('0.0',), 1374232878: ('0.0',), 1374232876: ('0.0',), 1374232874: ('0.0',), 1374232871: ('0.0',), 1374232865: ('0.0',), 1374232862: ('0.0',)} args : 1374232874 depend.output_id : 0 input_args_next_step : {1374232903: ('0.0',), 1374232902: ('0.0',), 1374232901: ('0.0',), 1374232889: ('0.0',), 1374232887: ('0.0',), 1374232885: ('0.0',), 1374232878: ('0.0',), 1374232876: ('0.0',), 1374232874: ('0.0',), 1374232871: ()} output_args : {1374232903: ('0.0',), 1374232902: ('0.0',), 1374232901: ('0.0',), 1374232889: ('0.0',), 1374232887: ('0.0',), 1374232885: ('0.0',), 1374232878: ('0.0',), 1374232876: ('0.0',), 1374232874: ('0.0',), 1374232871: ('0.0',), 1374232865: ('0.0',), 1374232862: ('0.0',)} args : 1374232871 depend.output_id : 0 input_args_next_step : {1374232903: ('0.0',), 1374232902: ('0.0',), 1374232901: ('0.0',), 1374232889: ('0.0',), 1374232887: ('0.0',), 1374232885: ('0.0',), 1374232878: ('0.0',), 1374232876: ('0.0',), 1374232874: ('0.0',), 1374232871: ('0.0',), 1374232865: ()} output_args : {1374232903: ('0.0',), 1374232902: ('0.0',), 1374232901: ('0.0',), 1374232889: ('0.0',), 1374232887: ('0.0',), 1374232885: ('0.0',), 1374232878: ('0.0',), 1374232876: ('0.0',), 1374232874: ('0.0',), 1374232871: ('0.0',), 1374232865: ('0.0',), 1374232862: ('0.0',)} args : 1374232865 depend.output_id : 0 input_args_next_step : {1374232903: ('0.0',), 1374232902: ('0.0',), 1374232901: ('0.0',), 1374232889: ('0.0',), 1374232887: ('0.0',), 1374232885: ('0.0',), 1374232878: ('0.0',), 1374232876: ('0.0',), 1374232874: ('0.0',), 1374232871: ('0.0',), 1374232865: ('0.0',), 1374232862: ()} output_args : {1374232903: ('0.0',), 1374232902: ('0.0',), 1374232901: ('0.0',), 1374232889: ('0.0',), 1374232887: ('0.0',), 1374232885: ('0.0',), 1374232878: ('0.0',), 1374232876: ('0.0',), 1374232874: ('0.0',), 1374232871: ('0.0',), 1374232865: ('0.0',), 1374232862: ('0.0',)} args : 1374232862 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 : {25432949: [{'plastique': 25432983, 'Carton_brun': 25432984, 'environnement': 25432985, 'Carton_gris': 25432986, 'kraft': 25432987, 'mal_croppe': 25432988, 'flou': 25432989, 'cartonnette': 25432990, 'papier': 25432991, 'Teint_Dans_La_Masse': 25432992, 'autre_refus': 25432993, 'metal': 25432994}]} input_args_next_step : {1374232903: ('0.0',), 1374232902: ('0.0',), 1374232901: ('0.0',), 1374232889: ('0.0',), 1374232887: ('0.0',), 1374232885: ('0.0',), 1374232878: ('0.0',), 1374232876: ('0.0',), 1374232874: ('0.0',), 1374232871: ('0.0',), 1374232865: ('0.0',), 1374232862: ('0.0',), 25432949: ()} output_args : {25432949: [{'plastique': 25432983, 'Carton_brun': 25432984, 'environnement': 25432985, 'Carton_gris': 25432986, 'kraft': 25432987, 'mal_croppe': 25432988, 'flou': 25432989, 'cartonnette': 25432990, 'papier': 25432991, 'Teint_Dans_La_Masse': 25432992, 'autre_refus': 25432993, 'metal': 25432994}]} args : 25432949 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :13, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25432949) 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 (1374232903,1374232902,1374232901,1374232889,1374232887,1374232885,1374232878,1374232876,1374232874,1374232871,1374232865,1374232862) Found this number of photos: 12 ##### Call download_photos : nb_thread : 5 begin to download photo : 1374232862 begin to download photo : 1374232874 begin to download photo : 1374232885 begin to download photo : 1374232901 download finish for photo 1374232874 begin to download photo : 1374232876 download finish for photo 1374232901 begin to download photo : 1374232902 download finish for photo 1374232885 begin to download photo : 1374232887 download finish for photo 1374232862 begin to download photo : 1374232865 download finish for photo 1374232876 begin to download photo : 1374232878 download finish for photo 1374232902 begin to download photo : 1374232903 download finish for photo 1374232887 begin to download photo : 1374232889 download finish for photo 1374232865 begin to download photo : 1374232871 download finish for photo 1374232878 download finish for photo 1374232889 download finish for photo 1374232903 download finish for photo 1374232871 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette254329831753745671/ imagette254329871753745671/ imagette254329881753745671/ imagette254329891753745671/ imagette254329901753745671/ imagette254329931753745671/ imagette254329941753745671/ imagette254329841753745671/ imagette254329861753745671/ imagette254329921753745671/ length of list_filenames : 12 ; length of list_pids : 12 ; length of list_args : 12 results_Auto_P25432949_29-07-2025_01_34_31.pdf 25432983 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=25432983 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette254329831753745671 25432987 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=25432987 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette254329871753745671 25432988 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=25432988 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette254329881753745671 25432989 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=25432989 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette254329891753745671 25432990 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=25432990 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette254329901753745671 25432993 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=25432993 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette254329931753745671 25432994 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=25432994 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette254329941753745671 25432984 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=25432984 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette254329841753745671 25432986 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=25432986 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette254329861753745671 25432992 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=25432992 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette254329921753745671 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=25432949 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/25432996,25432997,25432998,25432999,25433000,25433001,25433002,25433003,25433004,25433005,25433006,25433007?tags=plastique,Carton_brun,environnement,Carton_gris,kraft,mal_croppe,flou,cartonnette,papier,Teint_Dans_La_Masse,autre_refus,metal your option no_mail is active, we will not send the real mail to your client args[1374232903] : ('0.0',) no score found for photo 1374232903 We are sending mail with results at report@fotonower.com args[1374232902] : ('0.0',) no score found for photo 1374232902 We are sending mail with results at report@fotonower.com args[1374232901] : ('0.0',) no score found for photo 1374232901 We are sending mail with results at report@fotonower.com args[1374232889] : ('0.0',) no score found for photo 1374232889 We are sending mail with results at report@fotonower.com args[1374232887] : ('0.0',) no score found for photo 1374232887 We are sending mail with results at report@fotonower.com args[1374232885] : ('0.0',) no score found for photo 1374232885 We are sending mail with results at report@fotonower.com args[1374232878] : ('0.0',) no score found for photo 1374232878 We are sending mail with results at report@fotonower.com args[1374232876] : ('0.0',) no score found for photo 1374232876 We are sending mail with results at report@fotonower.com args[1374232874] : ('0.0',) no score found for photo 1374232874 We are sending mail with results at report@fotonower.com args[1374232871] : ('0.0',) no score found for photo 1374232871 We are sending mail with results at report@fotonower.com args[1374232865] : ('0.0',) no score found for photo 1374232865 We are sending mail with results at report@fotonower.com args[1374232862] : ('0.0',) no score found for photo 1374232862 We are sending mail with results at report@fotonower.com refus_total : 0.0 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=25432949 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_P25432949_29-07-2025_01_34_31.pdf results_Auto_P25432949_29-07-2025_01_34_31.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25432949_29-07-2025_01_34_31.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','25432949','results_Auto_P25432949_29-07-2025_01_34_31.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25432949_29-07-2025_01_34_31.pdf','pdf','','0.11','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25432949]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1374232903, 1374232902, 1374232901, 1374232889, 1374232887, 1374232885, 1374232878, 1374232876, 1374232874, 1374232871, 1374232865, 1374232862] map_info['map_portfolio_photo'] : {25432949: [1374232903, 1374232902, 1374232901, 1374232889, 1374232887, 1374232885, 1374232878, 1374232876, 1374232874, 1374232871, 1374232865, 1374232862, 1374232855, 1374232852, 1374232842, 1374232840, 1374232839, 1374232837]} final : False mtd_id 4302 list_pids : [1374232903, 1374232902, 1374232901, 1374232889, 1374232887, 1374232885, 1374232878, 1374232876, 1374232874, 1374232871, 1374232865, 1374232862] 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, '3381815') ('4302', '25432949', '1374232903', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232902', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232901', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232889', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232887', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232885', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232878', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232876', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232874', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232871', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232865', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232862', None, None, None, None, None, '3381815') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '25432949', '1374232903', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232902', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232901', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232889', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232887', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232885', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232878', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232876', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232874', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232871', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232865', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232862', None, None, None, None, None, '3381815')] time used for this insertion : 0.017848968505859375 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5960464477539062 time spend to save output : 0.01812911033630371 total time spend for step 4 : 1.61417555809021 step5:split_time_score Tue Jul 29 01:34:32 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 : ['25432949'] 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 : [('25432949',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25432949) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1374232874: {'path': 'temp/1753745670_1012794_1374232874_caccae8e0b7ec10434011baa7bbaf843.jpg', 'extension': 'jpg'}, 1374232876: {'path': 'temp/1753745670_1012794_1374232876_16935f2cb6660b90e923cc39f473a054.jpg', 'extension': 'jpg'}, 1374232878: {'path': 'temp/1753745670_1012794_1374232878_7b11b17b09ebeee4969572bb5f87f4cc.jpg', 'extension': 'jpg'}, 1374232885: {'path': 'temp/1753745670_1012794_1374232885_5434bf9b0d918a41502329040a58b592.jpg', 'extension': 'jpg'}, 1374232887: {'path': 'temp/1753745670_1012794_1374232887_db51f82263b631209000050e0f1157d3.jpg', 'extension': 'jpg'}, 1374232889: {'path': 'temp/1753745670_1012794_1374232889_e2d1873a9248a21c6f7be110190d44a8.jpg', 'extension': 'jpg'}, 1374232901: {'path': 'temp/1753745670_1012794_1374232901_3a5cd6e4a71a56099d07720765c0d3c3.jpg', 'extension': 'jpg'}, 1374232902: {'path': 'temp/1753745670_1012794_1374232902_2fee1e0eb84c5d7521ae17b3f0025f16.jpg', 'extension': 'jpg'}, 1374232903: {'path': 'temp/1753745670_1012794_1374232903_62897eeb141fa5f2bbbe75f919a9a3df.jpg', 'extension': 'jpg'}, 1374232862: {'path': 'temp/1753745670_1012794_1374232862_6c02f3b41dc9abb881109cd9514b3892.jpg', 'extension': 'jpg'}, 1374232865: {'path': 'temp/1753745670_1012794_1374232865_aa12a0044c452b335a8d1f33429ce29d.jpg', 'extension': 'jpg'}, 1374232871: {'path': 'temp/1753745670_1012794_1374232871_f1418406132aec540fe176711a3e62e5.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 = 25432949; (('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 = 25432949 group by h (('01', 18),) 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=25432949 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 (25432949) 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 (25432949) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 29072025 25432949 Nombre de photos uploadées : 18 / 23040 (0%) 29072025 25432949 Nombre de photos taguées (types de déchets): 0 / 18 (0%) 29072025 25432949 Nombre de photos taguées (volume) : 0 / 18 (0%) [{'photo_id': 1374232855, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/29/c41a431a1fdcd55c4a9695da3733518d.jpg', 'username': None, 'uploaded_at': 1753745523, 'text': 'image_29072025_01_31_04_10138.jpg'}, {'photo_id': 1374232852, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/29/410acd66bdb62676fc83b1bba8af14a1.jpg', 'username': None, 'uploaded_at': 1753745523, 'text': 'image_29072025_01_31_14_10141.jpg'}, {'photo_id': 1374232842, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/29/b6713bedcce9501060049a3ef206f7ee.jpg', 'username': None, 'uploaded_at': 1753745523, 'text': 'image_29072025_01_31_24_10187.jpg'}, {'photo_id': 1374232840, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/29/ed788174fe2c0b47ee29a27c76a29372.jpg', 'username': None, 'uploaded_at': 1753745523, 'text': 'image_29072025_01_31_33_9131.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.6689300537109375e-06 elapsed_time : order_list_meta_photo_and_scores 4.76837158203125e-06 ?????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0009560585021972656 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 25432949, '2025-07-29' ) 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-07-29' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2020203,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.20173263549804688 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= 2020203 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2020203, 'dashboard_run_id': 2027797, 'mtr_portfolio_id': 25430400, 'dashboard_result_id': 13254568, '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_P25430400_29-07-2025_00_16_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25430413, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25430414, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25430415, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25430416, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25430417, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25430418, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25430419, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25430420, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25430421, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25430422, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25430423, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25430424, 'pht': 3726}}"}, {'dashboat_entry_day': 2020203, 'dashboard_run_id': 2027797, 'mtr_portfolio_id': 25430666, 'dashboard_result_id': 13254569, '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_P25430666_29-07-2025_00_30_31.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25430676, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25430677, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25430678, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25430679, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25430680, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25430681, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25430682, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25430683, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25430684, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25430685, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25430686, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25430687, 'pht': 3726}}"}, {'dashboat_entry_day': 2020203, 'dashboard_run_id': 2027797, 'mtr_portfolio_id': 25431032, 'dashboard_result_id': 13254570, '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_P25431032_29-07-2025_00_47_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25431038, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25431039, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25431040, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25431041, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25431042, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25431043, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25431044, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25431045, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25431046, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25431047, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25431048, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25431049, 'pht': 3726}}"}, {'dashboat_entry_day': 2020203, 'dashboard_run_id': 2027797, 'mtr_portfolio_id': 25431373, 'dashboard_result_id': 13254571, '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_P25431373_29-07-2025_01_04_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25431406, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25431407, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25431408, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25431409, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25431410, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25431411, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25431412, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25431414, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25431415, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25431416, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25431417, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25431418, 'pht': 3726}}"}, {'dashboat_entry_day': 2020203, 'dashboard_run_id': 2027797, 'mtr_portfolio_id': 25431850, 'dashboard_result_id': 13254572, '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_P25431850_29-07-2025_01_17_00.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25431877, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25431878, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25431879, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25431880, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25431881, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25431882, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25431883, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25431884, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25431885, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25431886, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25431887, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25431888, 'pht': 3726}}"}, {'dashboat_entry_day': 2020203, 'dashboard_run_id': 2027797, 'mtr_portfolio_id': 25432485, 'dashboard_result_id': 13254573, '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_P25432485_29-07-2025_01_32_57.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25432490, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25432491, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25432492, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25432494, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25432495, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25432496, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25432497, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25432498, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25432499, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25432500, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25432501, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25432502, 'pht': 3726}}"}, {'dashboat_entry_day': 2020203, 'dashboard_run_id': 2027797, 'mtr_portfolio_id': 25432949, 'dashboard_result_id': 13254574, '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_P25432949_29-07-2025_01_33_30.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25432983, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25432984, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25432985, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25432986, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25432987, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25432988, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25432989, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25432990, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25432991, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25432992, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25432993, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25432994, '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 = 25430400 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': 3381114, 'mtr_portfolio_id': 25430400, 'created_at': datetime.datetime(2025, 7, 29, 0, 16, 59), 'result': '0.01828367481735243', 'result_long': None, 'result_double': None}] Qualite : 0.01828367481735243 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25430400 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25430400_29-07-2025_00_16_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25430400 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_P25430400_29-07-2025_00_16_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25430413, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25430414, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25430415, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25430416, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25430417, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25430418, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25430419, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25430420, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25430421, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25430422, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25430423, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25430424, 'pht': 3726}}" where mtr_portfolio_id = 25430400 and dashboard_run_id = 2027797 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`=25430400 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13254568, 0.01828367481735243, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25430400_29-07-2025_00_16_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25430413, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25430414, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25430415, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25430416, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25430417, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25430418, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25430419, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25430420, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25430421, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25430422, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25430423, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25430424, '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 = 25430666 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 25430666 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 25430666 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 25430666 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 25430666 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3381165, 'mtr_portfolio_id': 25430666, 'created_at': datetime.datetime(2025, 7, 29, 0, 30, 31), 'result': 0.0, 'result_long': None, 'result_double': None}] Qualite : 0.0 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25430666 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25430666_29-07-2025_00_30_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25430666 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_P25430666_29-07-2025_00_30_31.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25430676, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25430677, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25430678, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25430679, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25430680, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25430681, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25430682, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25430683, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25430684, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25430685, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25430686, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25430687, 'pht': 3726}}" where mtr_portfolio_id = 25430666 and dashboard_run_id = 2027797 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`=25430666 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13254569, 0.0, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25430666_29-07-2025_00_30_31.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25430676, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25430677, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25430678, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25430679, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25430680, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25430681, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25430682, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25430683, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25430684, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25430685, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25430686, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25430687, '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 = 25431032 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': 3381283, 'mtr_portfolio_id': 25431032, 'created_at': datetime.datetime(2025, 7, 29, 0, 47), 'result': '0.04848225972664177', 'result_long': None, 'result_double': None}] Qualite : 0.04848225972664177 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25431032 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25431032_29-07-2025_00_47_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25431032 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_P25431032_29-07-2025_00_47_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25431038, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25431039, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25431040, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25431041, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25431042, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25431043, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25431044, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25431045, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25431046, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25431047, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25431048, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25431049, 'pht': 3726}}" where mtr_portfolio_id = 25431032 and dashboard_run_id = 2027797 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`=25431032 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13254570, 0.04848225972664177, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25431032_29-07-2025_00_47_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25431038, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25431039, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25431040, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25431041, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25431042, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25431043, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25431044, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25431045, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25431046, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25431047, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25431048, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25431049, '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 = 25431373 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': 3381349, 'mtr_portfolio_id': 25431373, 'created_at': datetime.datetime(2025, 7, 29, 1, 4, 58), 'result': '0.06400657193758429', 'result_long': None, 'result_double': None}] Qualite : 0.06400657193758429 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25431373 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25431373_29-07-2025_01_04_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25431373 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_P25431373_29-07-2025_01_04_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25431406, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25431407, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25431408, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25431409, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25431410, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25431411, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25431412, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25431414, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25431415, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25431416, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25431417, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25431418, 'pht': 3726}}" where mtr_portfolio_id = 25431373 and dashboard_run_id = 2027797 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`=25431373 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13254571, 0.06400657193758429, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25431373_29-07-2025_01_04_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25431406, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25431407, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25431408, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25431409, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25431410, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25431411, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25431412, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25431414, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25431415, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25431416, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25431417, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25431418, '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 = 25431850 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': 3381473, 'mtr_portfolio_id': 25431850, 'created_at': datetime.datetime(2025, 7, 29, 1, 16, 59), 'result': '0.06037611458582402', 'result_long': None, 'result_double': None}] Qualite : 0.06037611458582402 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25431850 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25431850_29-07-2025_01_17_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25431850 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_P25431850_29-07-2025_01_17_00.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25431877, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25431878, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25431879, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25431880, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25431881, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25431882, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25431883, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25431884, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25431885, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25431886, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25431887, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25431888, 'pht': 3726}}" where mtr_portfolio_id = 25431850 and dashboard_run_id = 2027797 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`=25431850 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13254572, 0.06037611458582402, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25431850_29-07-2025_01_17_00.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25431877, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25431878, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25431879, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25431880, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25431881, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25431882, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25431883, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25431884, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25431885, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25431886, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25431887, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25431888, '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 = 25432485 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': 3381654, 'mtr_portfolio_id': 25432485, 'created_at': datetime.datetime(2025, 7, 29, 1, 32, 57), 'result': '0.05155107287824031', 'result_long': None, 'result_double': None}] Qualite : 0.05155107287824031 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25432485 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25432485_29-07-2025_01_32_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25432485 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_P25432485_29-07-2025_01_32_57.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25432490, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25432491, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25432492, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25432494, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25432495, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25432496, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25432497, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25432498, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25432499, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25432500, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25432501, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25432502, 'pht': 3726}}" where mtr_portfolio_id = 25432485 and dashboard_run_id = 2027797 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`=25432485 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13254573, 0.05155107287824031, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25432485_29-07-2025_01_32_57.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25432490, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25432491, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25432492, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25432494, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25432495, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25432496, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25432497, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25432498, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25432499, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25432500, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25432501, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25432502, '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 = 25432949 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 25432949 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 25432949 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 25432949 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 25432949 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25432949 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25432949_29-07-2025_01_34_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25432949 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_P25432949_29-07-2025_01_34_31.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25432983, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25432984, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25432985, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25432986, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25432987, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25432988, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25432989, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25432990, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25432991, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25432992, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25432993, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25432994, 'pht': 3726}}" where mtr_portfolio_id = 25432949 and dashboard_run_id = 2027797 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25430400,25430666,25431032,25431373,25431850,25432485,25432949) result : ((1374228231,), (1374228575,), (1374228582,), (1374228588,), (1374228604,), (1374228628,), (1374228654,), (1374228765,), (1374228766,), (1374228769,), (1374228770,), (1374228771,), (1374228773,), (1374228790,), (1374228793,), (1374228796,), (1374228799,), (1374228801,), (1374228804,), (1374228811,), (1374228814,), (1374228817,), (1374228819,), (1374228822,), (1374228824,), (1374228837,), (1374228850,), (1374228853,), (1374228855,), (1374228857,), (1374228859,), (1374228869,), (1374228870,), (1374228873,), (1374228875,), (1374228879,), (1374228883,), (1374228894,), (1374228908,), (1374228911,), (1374228913,), (1374228915,), (1374228917,), (1374228929,), (1374228932,), (1374228934,), (1374228935,), (1374228937,), (1374228939,), (1374228953,), (1374228965,), (1374228970,), (1374228972,), (1374228975,), (1374228978,), (1374228990,), (1374229004,), (1374229008,), (1374229010,), (1374229012,), (1374229013,), (1374229016,), (1374229032,), (1374229033,), (1374229034,), (1374229035,), (1374229036,), (1374229038,), (1374229053,), (1374229055,), (1374229057,), (1374229059,), (1374229061,), (1374229063,), (1374229078,), (1374229081,), (1374229084,), (1374229087,), (1374229091,), (1374229095,), (1374229107,), (1374229112,), (1374229113,), (1374229114,), (1374229115,), (1374229116,), (1374229135,), (1374229137,), (1374229139,), (1374229140,), (1374229141,), (1374229142,), (1374229167,), (1374229168,), (1374229169,), (1374229188,), (1374229189,), (1374229197,), (1374229216,), (1374229219,), (1374229221,), (1374229222,), (1374229224,), (1374229226,), (1374229243,), (1374229244,), (1374229246,), (1374229249,), (1374229253,), (1374229256,), (1374229268,), (1374229279,), (1374229281,), (1374229283,), (1374229284,), (1374229286,), (1374229289,), (1374229305,), (1374229308,), (1374229310,), (1374229312,), (1374229313,), (1374229317,), (1374229339,), (1374229348,), (1374229350,), (1374229352,), (1374229354,), (1374229357,), (1374229371,), (1374229390,), (1374229392,), (1374229394,), (1374229395,), (1374229397,), (1374229400,), (1374229413,), (1374229414,), (1374229415,), (1374229416,), (1374229418,), (1374229421,), (1374229434,), (1374229437,), (1374229439,), (1374229441,), (1374229444,), (1374229447,), (1374229460,), (1374229485,), (1374229487,), (1374229488,), (1374229490,), (1374229493,), (1374229494,), (1374229521,), (1374229532,), (1374229533,), (1374229534,), (1374229535,), (1374229537,), (1374229540,), (1374229554,), (1374229556,), (1374229558,), (1374229559,), (1374229561,), (1374229564,), (1374229583,), (1374229585,), (1374229588,), (1374229591,), (1374229595,), (1374229597,), (1374229607,), (1374229609,), (1374229611,), (1374229612,), (1374229615,), (1374229619,), (1374229639,), (1374229641,), (1374229642,), (1374229643,), (1374229645,), (1374229647,), (1374229665,), (1374229666,), (1374229667,), (1374229668,), (1374229670,), (1374229671,), (1374229691,), (1374229696,), (1374229699,), (1374229703,), (1374229707,), (1374229712,), (1374229755,), (1374229758,), (1374229761,), (1374229764,), (1374229765,), (1374229767,), (1374229783,), (1374229785,), (1374229787,), (1374229789,), (1374229791,), (1374229794,), (1374229807,), (1374229810,), (1374229817,), (1374229819,), (1374229822,), (1374229823,), (1374229849,), (1374229855,), (1374229857,), (1374229858,), (1374229860,), (1374229863,), (1374229909,), (1374229936,), (1374229937,), (1374229938,), (1374229939,), (1374229940,), (1374229942,), (1374229962,), (1374229963,), (1374229966,), (1374229968,), (1374229971,), (1374229973,), (1374229991,), (1374229999,), (1374230001,), (1374230003,), (1374230005,), (1374230008,), (1374230031,), (1374230034,), (1374230036,), (1374230038,), (1374230040,), (1374230042,), (1374230050,), (1374230052,), (1374230053,), (1374230054,), (1374230056,), (1374230058,), (1374230071,), (1374230078,), (1374230082,), (1374230084,), (1374230085,), (1374230088,), (1374230101,), (1374230109,), (1374230114,), (1374230115,), (1374230117,), (1374230119,), (1374230132,), (1374230158,), (1374230160,), (1374230161,), (1374230163,), (1374230166,), (1374230169,), (1374230179,), (1374230182,), (1374230184,), (1374230186,), (1374230189,), (1374230191,), (1374230202,), (1374230214,), (1374230220,), (1374230223,), (1374230226,), (1374230230,), (1374230243,), (1374230249,), (1374230258,), (1374230261,), (1374230265,), (1374230267,), (1374230277,), (1374230279,), (1374230280,), (1374230281,), (1374230282,), (1374230284,), (1374230294,), (1374230300,), (1374230307,), (1374230309,), (1374230312,), (1374230317,), (1374230326,), (1374230327,), (1374230330,), (1374230340,), (1374230343,), (1374230347,), (1374230366,), (1374230372,), (1374230395,), (1374230423,), (1374230448,), (1374230469,), (1374230752,), (1374231001,), (1374230925,), (1374230954,), (1374230957,), (1374230974,), (1374230992,), (1374230994,), (1374231053,), (1374231077,), (1374231102,), (1374231125,), (1374231149,), (1374231176,), (1374231368,), (1374231398,), (1374231404,), (1374231406,), (1374231427,), (1374231447,), (1374231464,), (1374231466,), (1374231468,), (1374231469,), (1374231471,), (1374231474,), (1374231501,), (1374231503,), (1374231504,), (1374231505,), (1374231508,), (1374231511,), (1374231725,), (1374231750,), (1374231778,), (1374231802,), (1374231824,), (1374231851,), (1374232062,), (1374232063,), (1374232065,), (1374232090,), (1374232116,), (1374232145,), (1374232258,), (1374232276,), (1374232278,), (1374232281,), (1374232293,), (1374232296,), (1374232300,), (1374232314,), (1374232325,), (1374232326,), (1374232327,), (1374232328,), (1374232340,), (1374232341,), (1374232350,), (1374232352,), (1374232354,), (1374232355,), (1374232357,), (1374232360,), (1374232372,), (1374232374,), (1374232376,), (1374232383,), (1374232386,), (1374232390,), (1374232401,), (1374232404,), (1374232408,), (1374232410,), (1374232413,), (1374232415,), (1374232429,), (1374232431,), (1374232439,), (1374232440,), (1374232442,), (1374232444,), (1374232456,), (1374232477,), (1374232480,), (1374232483,), (1374232495,), (1374232497,), (1374232500,), (1374232509,), (1374232511,), (1374232513,), (1374232515,), (1374232516,), (1374232519,), (1374232530,), (1374232531,), (1374232532,), (1374232533,), (1374232542,), (1374232545,), (1374232559,), (1374232568,), (1374232570,), (1374232572,), (1374232584,), (1374232588,), (1374232592,), (1374232599,), (1374232601,), (1374232603,), (1374232605,), (1374232606,), (1374232607,), (1374232618,), (1374232621,), (1374232623,), (1374232634,), (1374232636,), (1374232638,), (1374232653,), (1374232669,), (1374232672,), (1374232676,), (1374232679,), (1374232681,), (1374232696,), (1374232709,), (1374232712,), (1374232715,), (1374232718,), (1374232719,), (1374232723,), (1374232729,), (1374232732,), (1374232734,), (1374232744,), (1374232749,), (1374232751,), (1374232765,), (1374232780,), (1374232781,), (1374232783,), (1374232784,), (1374232795,), (1374232798,), (1374232827,), (1374232837,), (1374232839,), (1374232840,), (1374232842,), (1374232852,), (1374232855,), (1374232862,), (1374232865,), (1374232871,), (1374232874,), (1374232876,), (1374232878,), (1374232885,), (1374232887,), (1374232889,), (1374232901,), (1374232902,), (1374232903,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'29072025': {'nb_upload': 18, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25432949]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1374232903, 1374232902, 1374232901, 1374232889, 1374232887, 1374232885, 1374232878, 1374232876, 1374232874, 1374232871, 1374232865, 1374232862] map_info['map_portfolio_photo'] : {25432949: [1374232903, 1374232902, 1374232901, 1374232889, 1374232887, 1374232885, 1374232878, 1374232876, 1374232874, 1374232871, 1374232865, 1374232862, 1374232855, 1374232852, 1374232842, 1374232840, 1374232839, 1374232837]} final : True mtd_id 4302 list_pids : [1374232903, 1374232902, 1374232901, 1374232889, 1374232887, 1374232885, 1374232878, 1374232876, 1374232874, 1374232871, 1374232865, 1374232862] Looping around the photos to save general results len do output : 1 /25432949Didn'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, '3381815') ('4302', '25432949', '1374232903', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232902', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232901', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232889', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232887', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232885', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232878', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232876', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232874', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232871', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232865', None, None, None, None, None, '3381815') ('4302', None, None, None, None, None, None, None, '3381815') ('4302', '25432949', '1374232862', None, None, None, None, None, '3381815') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '25432949', 'None', None, None, None, None, '3381815'), ('4302', '25432949', '1374232903', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232902', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232901', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232889', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232887', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232885', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232878', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232876', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232874', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232871', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232865', None, None, None, None, None, '3381815'), ('4302', '25432949', '1374232862', None, None, None, None, None, '3381815')] time used for this insertion : 0.2924940586090088 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.7567646503448486 time spend to save output : 0.292773962020874 total time spend for step 5 : 1.0495386123657227 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 (3381815) 2.21user 2.03system 0:08.35elapsed 50%CPU (0avgtext+0avgdata 159756maxresident)k 24inputs+6744outputs (8major+73713minor)pagefaults 0swaps