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 : 297333 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 (4055854) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (4055854) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28591089 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['4055854'] with mtr_portfolio_ids : ['28591089'] and first list_photo_ids : [] new path : /proc/297333/ Name: python3 Umask: 0002 State: R (running) Tgid: 297333 Ngid: 0 Pid: 297333 PPid: 297332 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 297333 NSpid: 297333 NSpgid: 295668 NSsid: 295668 VmPeak: 1106908 kB VmSize: 1106884 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99568 kB VmRSS: 99568 kB RssAnon: 59900 kB RssFile: 39668 kB RssShmem: 0 kB VmData: 865636 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 596 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 42 nonvoluntary_ctxt_switches: 84 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '297333', 'Ngid': '0', 'Pid': '297333', 'PPid': '297332', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '297333', 'NSpid': '297333', 'NSpgid': '295668', 'NSsid': '295668', 'VmPeak': '1106908 kB', 'VmSize': '1106884 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99568 kB', 'VmRSS': '99568 kB', 'RssAnon': '59900 kB', 'RssFile': '39668 kB', 'RssShmem': '0 kB', 'VmData': '865636 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '596 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '42', 'nonvoluntary_ctxt_switches': '84'} ('datou_batch_current', '297333', '1106908', '0', '1106884', '865636', '99568', b'', 'marlene', '4055854') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos_view ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (28591089) 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 (4055854 ) ) 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 (28591089) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1394812914, 'portfolio_id': 28591089}, {'photo_id': 1394812912, 'portfolio_id': 28591089}, {'photo_id': 1394812911, 'portfolio_id': 28591089}, {'photo_id': 1394812901, 'portfolio_id': 28591089}, {'photo_id': 1394812899, 'portfolio_id': 28591089}, {'photo_id': 1394812895, 'portfolio_id': 28591089}, {'photo_id': 1394812891, 'portfolio_id': 28591089}, {'photo_id': 1394812889, 'portfolio_id': 28591089}, {'photo_id': 1394812887, 'portfolio_id': 28591089}, {'photo_id': 1394812840, 'portfolio_id': 28591089}, {'photo_id': 1394812837, 'portfolio_id': 28591089}, {'photo_id': 1394812835, 'portfolio_id': 28591089}, {'photo_id': 1394812834, 'portfolio_id': 28591089}, {'photo_id': 1394812819, 'portfolio_id': 28591089}, {'photo_id': 1394812817, 'portfolio_id': 28591089}, {'photo_id': 1394812813, 'portfolio_id': 28591089}, {'photo_id': 1394812809, 'portfolio_id': 28591089}, {'photo_id': 1394812805, 'portfolio_id': 28591089}, {'photo_id': 1394812804, 'portfolio_id': 28591089}, {'photo_id': 1394812755, 'portfolio_id': 28591089}, {'photo_id': 1394812754, 'portfolio_id': 28591089}] map_portfolio_id_photo_id: {28591089: [1394812914, 1394812912, 1394812911, 1394812901, 1394812899, 1394812895, 1394812891, 1394812889, 1394812887, 1394812840, 1394812837, 1394812835, 1394812834, 1394812819, 1394812817, 1394812813, 1394812809, 1394812805, 1394812804, 1394812755, 1394812754]} ##### 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.015735387802124023 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Mon Nov 17 06:36:56 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28591089) 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 : 28591089 get user id for portfolio 28591089 get sub ptf for main ptf 28591089, type 3726 and hashtags ['environnement', 'flou', 'autre_refus', 'kraft', 'metal', 'papier', 'Carton_gris', 'Teint_Dans_La_Masse', 'cartonnette', 'Carton_brun', 'plastique', 'mal_croppe'] 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`=28591089 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','flou','autre_refus','kraft','metal','papier','Carton_gris','Teint_Dans_La_Masse','cartonnette','Carton_brun','plastique','mal_croppe')) 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`=28591089 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','flou','autre_refus','kraft','metal','papier','Carton_gris','Teint_Dans_La_Masse','cartonnette','Carton_brun','plastique','mal_croppe')) AND mptpi.`min_score`=0.5 To do returned map {'mal_croppe': {'main_port_id': 28591089, 'sub_port_id': 28591115, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19382928, 'last_updated_at': datetime.datetime(2025, 11, 17, 6, 34, 30), 'last_updated_at_desc': datetime.datetime(2025, 11, 17, 6, 34, 30), 'last_updated_at_asc': datetime.datetime(2025, 11, 17, 6, 33, 26)}, 'Carton_brun': {'main_port_id': 28591089, 'sub_port_id': 28591116, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19382929, 'last_updated_at': datetime.datetime(2025, 11, 17, 6, 34, 30), 'last_updated_at_desc': datetime.datetime(2025, 11, 17, 6, 34, 30), 'last_updated_at_asc': datetime.datetime(2025, 11, 17, 6, 33, 26)}, 'environnement': {'main_port_id': 28591089, 'sub_port_id': 28591117, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19382930, 'last_updated_at': datetime.datetime(2025, 11, 17, 6, 34, 30), 'last_updated_at_desc': datetime.datetime(2025, 11, 17, 6, 34, 30), 'last_updated_at_asc': datetime.datetime(2025, 11, 17, 6, 33, 26)}, 'kraft': {'main_port_id': 28591089, 'sub_port_id': 28591118, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19382931, 'last_updated_at': datetime.datetime(2025, 11, 17, 6, 34, 30), 'last_updated_at_desc': datetime.datetime(2025, 11, 17, 6, 34, 30), 'last_updated_at_asc': datetime.datetime(2025, 11, 17, 6, 33, 26)}, 'flou': {'main_port_id': 28591089, 'sub_port_id': 28591119, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19382932, 'last_updated_at': datetime.datetime(2025, 11, 17, 6, 34, 30), 'last_updated_at_desc': datetime.datetime(2025, 11, 17, 6, 34, 30), 'last_updated_at_asc': datetime.datetime(2025, 11, 17, 6, 33, 26)}, 'Teint_Dans_La_Masse': {'main_port_id': 28591089, 'sub_port_id': 28591120, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19382933, 'last_updated_at': datetime.datetime(2025, 11, 17, 6, 34, 30), 'last_updated_at_desc': datetime.datetime(2025, 11, 17, 6, 34, 30), 'last_updated_at_asc': datetime.datetime(2025, 11, 17, 6, 33, 26)}, 'plastique': {'main_port_id': 28591089, 'sub_port_id': 28591121, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19382934, 'last_updated_at': datetime.datetime(2025, 11, 17, 6, 34, 30), 'last_updated_at_desc': datetime.datetime(2025, 11, 17, 6, 34, 30), 'last_updated_at_asc': datetime.datetime(2025, 11, 17, 6, 33, 26)}, 'cartonnette': {'main_port_id': 28591089, 'sub_port_id': 28591122, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19382935, 'last_updated_at': datetime.datetime(2025, 11, 17, 6, 34, 30), 'last_updated_at_desc': datetime.datetime(2025, 11, 17, 6, 34, 30), 'last_updated_at_asc': datetime.datetime(2025, 11, 17, 6, 33, 26)}, 'autre_refus': {'main_port_id': 28591089, 'sub_port_id': 28591123, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19382936, 'last_updated_at': datetime.datetime(2025, 11, 17, 6, 34, 30), 'last_updated_at_desc': datetime.datetime(2025, 11, 17, 6, 34, 30), 'last_updated_at_asc': datetime.datetime(2025, 11, 17, 6, 33, 26)}, 'papier': {'main_port_id': 28591089, 'sub_port_id': 28591124, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19382937, 'last_updated_at': datetime.datetime(2025, 11, 17, 6, 34, 30), 'last_updated_at_desc': datetime.datetime(2025, 11, 17, 6, 34, 30), 'last_updated_at_asc': datetime.datetime(2025, 11, 17, 6, 33, 26)}, 'Carton_gris': {'main_port_id': 28591089, 'sub_port_id': 28591125, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19382938, 'last_updated_at': datetime.datetime(2025, 11, 17, 6, 34, 30), 'last_updated_at_desc': datetime.datetime(2025, 11, 17, 6, 34, 30), 'last_updated_at_asc': datetime.datetime(2025, 11, 17, 6, 33, 26)}, 'metal': {'main_port_id': 28591089, 'sub_port_id': 28591126, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19382939, 'last_updated_at': datetime.datetime(2025, 11, 17, 6, 34, 30), 'last_updated_at_desc': datetime.datetime(2025, 11, 17, 6, 34, 30), 'last_updated_at_asc': datetime.datetime(2025, 11, 17, 6, 33, 26)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28591115 , 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=28591089 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 (28591115) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28591089) result : ((1394812754,), (1394812755,), (1394812804,), (1394812805,), (1394812809,), (1394812813,), (1394812817,), (1394812819,), (1394812834,), (1394812835,), (1394812837,), (1394812840,), (1394812887,), (1394812889,), (1394812891,), (1394812895,), (1394812899,), (1394812901,), (1394812911,), (1394812912,), (1394812914,)) 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 28591116 , 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=28591089 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 (28591116) result : ((1394812982,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28591089) result : ((1394812754,), (1394812755,), (1394812804,), (1394812805,), (1394812809,), (1394812813,), (1394812817,), (1394812819,), (1394812834,), (1394812835,), (1394812837,), (1394812840,), (1394812887,), (1394812889,), (1394812891,), (1394812895,), (1394812899,), (1394812901,), (1394812911,), (1394812912,), (1394812914,)) 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 28591117 , 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=28591089 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 (28591117) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28591089) result : ((1394812754,), (1394812755,), (1394812804,), (1394812805,), (1394812809,), (1394812813,), (1394812817,), (1394812819,), (1394812834,), (1394812835,), (1394812837,), (1394812840,), (1394812887,), (1394812889,), (1394812891,), (1394812895,), (1394812899,), (1394812901,), (1394812911,), (1394812912,), (1394812914,)) 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 28591118 , 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=28591089 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 (28591118) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28591089) result : ((1394812754,), (1394812755,), (1394812804,), (1394812805,), (1394812809,), (1394812813,), (1394812817,), (1394812819,), (1394812834,), (1394812835,), (1394812837,), (1394812840,), (1394812887,), (1394812889,), (1394812891,), (1394812895,), (1394812899,), (1394812901,), (1394812911,), (1394812912,), (1394812914,)) 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 28591119 , 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=28591089 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 (28591119) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28591089) result : ((1394812754,), (1394812755,), (1394812804,), (1394812805,), (1394812809,), (1394812813,), (1394812817,), (1394812819,), (1394812834,), (1394812835,), (1394812837,), (1394812840,), (1394812887,), (1394812889,), (1394812891,), (1394812895,), (1394812899,), (1394812901,), (1394812911,), (1394812912,), (1394812914,)) 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 28591120 , 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=28591089 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 (28591120) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28591089) result : ((1394812754,), (1394812755,), (1394812804,), (1394812805,), (1394812809,), (1394812813,), (1394812817,), (1394812819,), (1394812834,), (1394812835,), (1394812837,), (1394812840,), (1394812887,), (1394812889,), (1394812891,), (1394812895,), (1394812899,), (1394812901,), (1394812911,), (1394812912,), (1394812914,)) 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 28591121 , 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=28591089 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 (28591121) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28591089) result : ((1394812754,), (1394812755,), (1394812804,), (1394812805,), (1394812809,), (1394812813,), (1394812817,), (1394812819,), (1394812834,), (1394812835,), (1394812837,), (1394812840,), (1394812887,), (1394812889,), (1394812891,), (1394812895,), (1394812899,), (1394812901,), (1394812911,), (1394812912,), (1394812914,)) 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 28591122 , 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=28591089 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 (28591122) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28591089) result : ((1394812754,), (1394812755,), (1394812804,), (1394812805,), (1394812809,), (1394812813,), (1394812817,), (1394812819,), (1394812834,), (1394812835,), (1394812837,), (1394812840,), (1394812887,), (1394812889,), (1394812891,), (1394812895,), (1394812899,), (1394812901,), (1394812911,), (1394812912,), (1394812914,)) 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 28591123 , 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=28591089 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 (28591123) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28591089) result : ((1394812754,), (1394812755,), (1394812804,), (1394812805,), (1394812809,), (1394812813,), (1394812817,), (1394812819,), (1394812834,), (1394812835,), (1394812837,), (1394812840,), (1394812887,), (1394812889,), (1394812891,), (1394812895,), (1394812899,), (1394812901,), (1394812911,), (1394812912,), (1394812914,)) 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 28591124 , 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=28591089 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 (28591124) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28591089) result : ((1394812754,), (1394812755,), (1394812804,), (1394812805,), (1394812809,), (1394812813,), (1394812817,), (1394812819,), (1394812834,), (1394812835,), (1394812837,), (1394812840,), (1394812887,), (1394812889,), (1394812891,), (1394812895,), (1394812899,), (1394812901,), (1394812911,), (1394812912,), (1394812914,)) 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 28591125 , 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=28591089 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 (28591125) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28591089) result : ((1394812754,), (1394812755,), (1394812804,), (1394812805,), (1394812809,), (1394812813,), (1394812817,), (1394812819,), (1394812834,), (1394812835,), (1394812837,), (1394812840,), (1394812887,), (1394812889,), (1394812891,), (1394812895,), (1394812899,), (1394812901,), (1394812911,), (1394812912,), (1394812914,)) 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 28591126 , 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=28591089 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 (28591126) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28591089) result : ((1394812754,), (1394812755,), (1394812804,), (1394812805,), (1394812809,), (1394812813,), (1394812817,), (1394812819,), (1394812834,), (1394812835,), (1394812837,), (1394812840,), (1394812887,), (1394812889,), (1394812891,), (1394812895,), (1394812899,), (1394812901,), (1394812911,), (1394812912,), (1394812914,)) 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`=28591089 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','flou','autre_refus','kraft','metal','papier','Carton_gris','Teint_Dans_La_Masse','cartonnette','Carton_brun','plastique','mal_croppe')) 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`=28591089 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','flou','autre_refus','kraft','metal','papier','Carton_gris','Teint_Dans_La_Masse','cartonnette','Carton_brun','plastique','mal_croppe')) AND mptpi.`min_score`=0.5 To do returned map {'mal_croppe': {'main_port_id': 28591089, 'sub_port_id': 28591127, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19382940, 'last_updated_at': datetime.datetime(2025, 11, 17, 6, 33, 27), 'last_updated_at_desc': datetime.datetime(2025, 11, 17, 6, 33, 27), 'last_updated_at_asc': datetime.datetime(2025, 11, 17, 6, 33, 27)}, 'Carton_brun': {'main_port_id': 28591089, 'sub_port_id': 28591128, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19382941, 'last_updated_at': datetime.datetime(2025, 11, 17, 6, 33, 27), 'last_updated_at_desc': datetime.datetime(2025, 11, 17, 6, 33, 27), 'last_updated_at_asc': datetime.datetime(2025, 11, 17, 6, 33, 27)}, 'environnement': {'main_port_id': 28591089, 'sub_port_id': 28591129, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19382942, 'last_updated_at': datetime.datetime(2025, 11, 17, 6, 33, 27), 'last_updated_at_desc': datetime.datetime(2025, 11, 17, 6, 33, 27), 'last_updated_at_asc': datetime.datetime(2025, 11, 17, 6, 33, 27)}, 'kraft': {'main_port_id': 28591089, 'sub_port_id': 28591130, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19382943, 'last_updated_at': datetime.datetime(2025, 11, 17, 6, 33, 27), 'last_updated_at_desc': datetime.datetime(2025, 11, 17, 6, 33, 27), 'last_updated_at_asc': datetime.datetime(2025, 11, 17, 6, 33, 27)}, 'flou': {'main_port_id': 28591089, 'sub_port_id': 28591131, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19382944, 'last_updated_at': datetime.datetime(2025, 11, 17, 6, 33, 27), 'last_updated_at_desc': datetime.datetime(2025, 11, 17, 6, 33, 27), 'last_updated_at_asc': datetime.datetime(2025, 11, 17, 6, 33, 27)}, 'Teint_Dans_La_Masse': {'main_port_id': 28591089, 'sub_port_id': 28591132, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19382945, 'last_updated_at': datetime.datetime(2025, 11, 17, 6, 33, 27), 'last_updated_at_desc': datetime.datetime(2025, 11, 17, 6, 33, 27), 'last_updated_at_asc': datetime.datetime(2025, 11, 17, 6, 33, 27)}, 'plastique': {'main_port_id': 28591089, 'sub_port_id': 28591133, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19382946, 'last_updated_at': datetime.datetime(2025, 11, 17, 6, 33, 27), 'last_updated_at_desc': datetime.datetime(2025, 11, 17, 6, 33, 27), 'last_updated_at_asc': datetime.datetime(2025, 11, 17, 6, 33, 27)}, 'cartonnette': {'main_port_id': 28591089, 'sub_port_id': 28591134, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19382947, 'last_updated_at': datetime.datetime(2025, 11, 17, 6, 33, 27), 'last_updated_at_desc': datetime.datetime(2025, 11, 17, 6, 33, 27), 'last_updated_at_asc': datetime.datetime(2025, 11, 17, 6, 33, 27)}, 'autre_refus': {'main_port_id': 28591089, 'sub_port_id': 28591135, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19382948, 'last_updated_at': datetime.datetime(2025, 11, 17, 6, 33, 27), 'last_updated_at_desc': datetime.datetime(2025, 11, 17, 6, 33, 27), 'last_updated_at_asc': datetime.datetime(2025, 11, 17, 6, 33, 27)}, 'papier': {'main_port_id': 28591089, 'sub_port_id': 28591136, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19382949, 'last_updated_at': datetime.datetime(2025, 11, 17, 6, 33, 27), 'last_updated_at_desc': datetime.datetime(2025, 11, 17, 6, 33, 27), 'last_updated_at_asc': datetime.datetime(2025, 11, 17, 6, 33, 27)}, 'Carton_gris': {'main_port_id': 28591089, 'sub_port_id': 28591137, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19382950, 'last_updated_at': datetime.datetime(2025, 11, 17, 6, 33, 27), 'last_updated_at_desc': datetime.datetime(2025, 11, 17, 6, 33, 27), 'last_updated_at_asc': datetime.datetime(2025, 11, 17, 6, 33, 27)}, 'metal': {'main_port_id': 28591089, 'sub_port_id': 28591138, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19382951, 'last_updated_at': datetime.datetime(2025, 11, 17, 6, 34, 30), 'last_updated_at_desc': datetime.datetime(2025, 11, 17, 6, 34, 30), 'last_updated_at_asc': datetime.datetime(2025, 11, 17, 6, 33, 27)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28591127,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28591115 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28591128,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28591116 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28591129,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28591117 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28591130,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28591118 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28591131,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28591119 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28591132,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28591120 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28591133,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28591121 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28591134,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28591122 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28591135,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28591123 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28591136,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28591124 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28591137,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28591125 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28591138,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28591126 lien utilise dans velours : https://marlene.fotonower.com/velours/28591127,28591128,28591129,28591130,28591131,28591132,28591133,28591134,28591135,28591136,28591137,28591138?tags=mal_croppe,Carton_brun,environnement,kraft,flou,Teint_Dans_La_Masse,plastique,cartonnette,autre_refus,papier,Carton_gris,metal After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28591089]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1394812914, 1394812912, 1394812911, 1394812901, 1394812899, 1394812895, 1394812891, 1394812889, 1394812887] map_info['map_portfolio_photo'] : {28591089: [1394812914, 1394812912, 1394812911, 1394812901, 1394812899, 1394812895, 1394812891, 1394812889, 1394812887, 1394812840, 1394812837, 1394812835, 1394812834, 1394812819, 1394812817, 1394812813, 1394812809, 1394812805, 1394812804, 1394812755, 1394812754]} final : False mtd_id 4302 list_pids : [1394812914, 1394812912, 1394812911, 1394812901, 1394812899, 1394812895, 1394812891, 1394812889, 1394812887] Looping around the photos to save general results len do output : 1 /28591089. 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, '4055854') ('4302', '28591089', '1394812914', None, None, None, None, None, '4055854') ('4302', None, None, None, None, None, None, None, '4055854') ('4302', '28591089', '1394812912', None, None, None, None, None, '4055854') ('4302', None, None, None, None, None, None, None, '4055854') ('4302', '28591089', '1394812911', None, None, None, None, None, '4055854') ('4302', None, None, None, None, None, None, None, '4055854') ('4302', '28591089', '1394812901', None, None, None, None, None, '4055854') ('4302', None, None, None, None, None, None, None, '4055854') ('4302', '28591089', '1394812899', None, None, None, None, None, '4055854') ('4302', None, None, None, None, None, None, None, '4055854') ('4302', '28591089', '1394812895', None, None, None, None, None, '4055854') ('4302', None, None, None, None, None, None, None, '4055854') ('4302', '28591089', '1394812891', None, None, None, None, None, '4055854') ('4302', None, None, None, None, None, None, None, '4055854') ('4302', '28591089', '1394812889', None, None, None, None, None, '4055854') ('4302', None, None, None, None, None, None, None, '4055854') ('4302', '28591089', '1394812887', None, None, None, None, None, '4055854') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 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, '28591089', "{'mal_croppe': 28591115, 'Carton_brun': 28591116, 'environnement': 28591117, 'kraft': 28591118, 'flou': 28591119, 'Teint_Dans_La_Masse': 28591120, 'plastique': 28591121, 'cartonnette': 28591122, 'autre_refus': 28591123, 'papier': 28591124, 'Carton_gris': 28591125, 'metal': 28591126}", None, None, None, None, '4055854'), ('4302', '28591089', '1394812914', None, None, None, None, None, '4055854'), ('4302', '28591089', '1394812912', None, None, None, None, None, '4055854'), ('4302', '28591089', '1394812911', None, None, None, None, None, '4055854'), ('4302', '28591089', '1394812901', None, None, None, None, None, '4055854'), ('4302', '28591089', '1394812899', None, None, None, None, None, '4055854'), ('4302', '28591089', '1394812895', None, None, None, None, None, '4055854'), ('4302', '28591089', '1394812891', None, None, None, None, None, '4055854'), ('4302', '28591089', '1394812889', None, None, None, None, None, '4055854'), ('4302', '28591089', '1394812887', None, None, None, None, None, '4055854')] time used for this insertion : 0.01677393913269043 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.4876461029052734 time spend to save output : 0.017083168029785156 total time spend for step 1 : 1.5047292709350586 step2:final Mon Nov 17 06:36:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28591089) 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 28591089 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1394812755,1394812754,1394812819,1394812817,1394812813,1394812809,1394812805,1394812804,1394812840,1394812837,1394812835,1394812834,1394812901,1394812899,1394812895,1394812891,1394812889,1394812887,1394812914,1394812912,1394812911); insert ignore into MTRUser.portfolio_carac_ratio (portfolio_id, hashtag_type, hashtag_id, value) values (%s,%s,%s,%s) on DUPLICATE KEY UPDATE value=VALUES(value) After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28591089]) Inside saveOutput : final : False verbose : True original output for save of step final : {1394812914: ('0.07582684557168425',), 1394812912: ('0.07582684557168425',), 1394812911: ('0.07582684557168425',), 1394812901: ('0.07582684557168425',), 1394812899: ('0.07582684557168425',), 1394812895: ('0.07582684557168425',), 1394812891: ('0.07582684557168425',), 1394812889: ('0.07582684557168425',), 1394812887: ('0.07582684557168425',)} new output for save of step final : {1394812914: ('0.07582684557168425',), 1394812912: ('0.07582684557168425',), 1394812911: ('0.07582684557168425',), 1394812901: ('0.07582684557168425',), 1394812899: ('0.07582684557168425',), 1394812895: ('0.07582684557168425',), 1394812891: ('0.07582684557168425',), 1394812889: ('0.07582684557168425',), 1394812887: ('0.07582684557168425',)} [1394812914, 1394812912, 1394812911, 1394812901, 1394812899, 1394812895, 1394812891, 1394812889, 1394812887] map_info['map_portfolio_photo'] : {28591089: [1394812914, 1394812912, 1394812911, 1394812901, 1394812899, 1394812895, 1394812891, 1394812889, 1394812887, 1394812840, 1394812837, 1394812835, 1394812834, 1394812819, 1394812817, 1394812813, 1394812809, 1394812805, 1394812804, 1394812755, 1394812754]} final : False mtd_id 4302 list_pids : [1394812914, 1394812912, 1394812911, 1394812901, 1394812899, 1394812895, 1394812891, 1394812889, 1394812887] Looping around the photos to save general results len do output : 9 /1394812914.Didn't retrieve data . /1394812912.Didn't retrieve data . /1394812911.Didn't retrieve data . /1394812901.Didn't retrieve data . /1394812899.Didn't retrieve data . /1394812895.Didn't retrieve data . /1394812891.Didn't retrieve data . /1394812889.Didn't retrieve data . /1394812887.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, '4055854') ('4302', '28591089', '1394812914', None, None, None, None, None, '4055854') ('4302', None, None, None, None, None, None, None, '4055854') ('4302', '28591089', '1394812912', None, None, None, None, None, '4055854') ('4302', None, None, None, None, None, None, None, '4055854') ('4302', '28591089', '1394812911', None, None, None, None, None, '4055854') ('4302', None, None, None, None, None, None, None, '4055854') ('4302', '28591089', '1394812901', None, None, None, None, None, '4055854') ('4302', None, None, None, None, None, None, None, '4055854') ('4302', '28591089', '1394812899', None, None, None, None, None, '4055854') ('4302', None, None, None, None, None, None, None, '4055854') ('4302', '28591089', '1394812895', None, None, None, None, None, '4055854') ('4302', None, None, None, None, None, None, None, '4055854') ('4302', '28591089', '1394812891', None, None, None, None, None, '4055854') ('4302', None, None, None, None, None, None, None, '4055854') ('4302', '28591089', '1394812889', None, None, None, None, None, '4055854') ('4302', None, None, None, None, None, None, None, '4055854') ('4302', '28591089', '1394812887', None, None, None, None, None, '4055854') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 27 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', '28591089', '1394812914', '0.07582684557168425', None, None, None, None, '4055854'), ('4302', '28591089', '1394812912', '0.07582684557168425', None, None, None, None, '4055854'), ('4302', '28591089', '1394812911', '0.07582684557168425', None, None, None, None, '4055854'), ('4302', '28591089', '1394812901', '0.07582684557168425', None, None, None, None, '4055854'), ('4302', '28591089', '1394812899', '0.07582684557168425', None, None, None, None, '4055854'), ('4302', '28591089', '1394812895', '0.07582684557168425', None, None, None, None, '4055854'), ('4302', '28591089', '1394812891', '0.07582684557168425', None, None, None, None, '4055854'), ('4302', '28591089', '1394812889', '0.07582684557168425', None, None, None, None, '4055854'), ('4302', '28591089', '1394812887', '0.07582684557168425', None, None, None, None, '4055854')] time used for this insertion : 0.013543844223022461 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06479001045227051 time spend to save output : 0.014133214950561523 total time spend for step 2 : 0.07892322540283203 step3:velours_tree Mon Nov 17 06:36:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {28591089: [{'mal_croppe': 28591115, 'Carton_brun': 28591116, 'environnement': 28591117, 'kraft': 28591118, 'flou': 28591119, 'Teint_Dans_La_Masse': 28591120, 'plastique': 28591121, 'cartonnette': 28591122, 'autre_refus': 28591123, 'papier': 28591124, 'Carton_gris': 28591125, 'metal': 28591126}]} input_args_next_step : {28591089: ()} output_args : {28591089: [{'mal_croppe': 28591115, 'Carton_brun': 28591116, 'environnement': 28591117, 'kraft': 28591118, 'flou': 28591119, 'Teint_Dans_La_Masse': 28591120, 'plastique': 28591121, 'cartonnette': 28591122, 'autre_refus': 28591123, 'papier': 28591124, 'Carton_gris': 28591125, 'metal': 28591126}]} args : 28591089 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 : ({'mal_croppe': 28591115, 'Carton_brun': 28591116, 'environnement': 28591117, 'kraft': 28591118, 'flou': 28591119, 'Teint_Dans_La_Masse': 28591120, 'plastique': 28591121, 'cartonnette': 28591122, 'autre_refus': 28591123, 'papier': 28591124, 'Carton_gris': 28591125, 'metal': 28591126},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28591089) 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([28591089]) 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.43657517433166504 time spend to save output : 5.507469177246094e-05 total time spend for step 3 : 0.4366302490234375 step4:send_mail_cod Mon Nov 17 06:36:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1394812914: ('0.07582684557168425',), 1394812912: ('0.07582684557168425',), 1394812911: ('0.07582684557168425',), 1394812901: ('0.07582684557168425',), 1394812899: ('0.07582684557168425',), 1394812895: ('0.07582684557168425',), 1394812891: ('0.07582684557168425',), 1394812889: ('0.07582684557168425',), 1394812887: ('0.07582684557168425',)} input_args_next_step : {1394812914: ()} output_args : {1394812914: ('0.07582684557168425',), 1394812912: ('0.07582684557168425',), 1394812911: ('0.07582684557168425',), 1394812901: ('0.07582684557168425',), 1394812899: ('0.07582684557168425',), 1394812895: ('0.07582684557168425',), 1394812891: ('0.07582684557168425',), 1394812889: ('0.07582684557168425',), 1394812887: ('0.07582684557168425',)} args : 1394812914 depend.output_id : 0 input_args_next_step : {1394812914: ('0.07582684557168425',), 1394812912: ()} output_args : {1394812914: ('0.07582684557168425',), 1394812912: ('0.07582684557168425',), 1394812911: ('0.07582684557168425',), 1394812901: ('0.07582684557168425',), 1394812899: ('0.07582684557168425',), 1394812895: ('0.07582684557168425',), 1394812891: ('0.07582684557168425',), 1394812889: ('0.07582684557168425',), 1394812887: ('0.07582684557168425',)} args : 1394812912 depend.output_id : 0 input_args_next_step : {1394812914: ('0.07582684557168425',), 1394812912: ('0.07582684557168425',), 1394812911: ()} output_args : {1394812914: ('0.07582684557168425',), 1394812912: ('0.07582684557168425',), 1394812911: ('0.07582684557168425',), 1394812901: ('0.07582684557168425',), 1394812899: ('0.07582684557168425',), 1394812895: ('0.07582684557168425',), 1394812891: ('0.07582684557168425',), 1394812889: ('0.07582684557168425',), 1394812887: ('0.07582684557168425',)} args : 1394812911 depend.output_id : 0 input_args_next_step : {1394812914: ('0.07582684557168425',), 1394812912: ('0.07582684557168425',), 1394812911: ('0.07582684557168425',), 1394812901: ()} output_args : {1394812914: ('0.07582684557168425',), 1394812912: ('0.07582684557168425',), 1394812911: ('0.07582684557168425',), 1394812901: ('0.07582684557168425',), 1394812899: ('0.07582684557168425',), 1394812895: ('0.07582684557168425',), 1394812891: ('0.07582684557168425',), 1394812889: ('0.07582684557168425',), 1394812887: ('0.07582684557168425',)} args : 1394812901 depend.output_id : 0 input_args_next_step : {1394812914: ('0.07582684557168425',), 1394812912: ('0.07582684557168425',), 1394812911: ('0.07582684557168425',), 1394812901: ('0.07582684557168425',), 1394812899: ()} output_args : {1394812914: ('0.07582684557168425',), 1394812912: ('0.07582684557168425',), 1394812911: ('0.07582684557168425',), 1394812901: ('0.07582684557168425',), 1394812899: ('0.07582684557168425',), 1394812895: ('0.07582684557168425',), 1394812891: ('0.07582684557168425',), 1394812889: ('0.07582684557168425',), 1394812887: ('0.07582684557168425',)} args : 1394812899 depend.output_id : 0 input_args_next_step : {1394812914: ('0.07582684557168425',), 1394812912: ('0.07582684557168425',), 1394812911: ('0.07582684557168425',), 1394812901: ('0.07582684557168425',), 1394812899: ('0.07582684557168425',), 1394812895: ()} output_args : {1394812914: ('0.07582684557168425',), 1394812912: ('0.07582684557168425',), 1394812911: ('0.07582684557168425',), 1394812901: ('0.07582684557168425',), 1394812899: ('0.07582684557168425',), 1394812895: ('0.07582684557168425',), 1394812891: ('0.07582684557168425',), 1394812889: ('0.07582684557168425',), 1394812887: ('0.07582684557168425',)} args : 1394812895 depend.output_id : 0 input_args_next_step : {1394812914: ('0.07582684557168425',), 1394812912: ('0.07582684557168425',), 1394812911: ('0.07582684557168425',), 1394812901: ('0.07582684557168425',), 1394812899: ('0.07582684557168425',), 1394812895: ('0.07582684557168425',), 1394812891: ()} output_args : {1394812914: ('0.07582684557168425',), 1394812912: ('0.07582684557168425',), 1394812911: ('0.07582684557168425',), 1394812901: ('0.07582684557168425',), 1394812899: ('0.07582684557168425',), 1394812895: ('0.07582684557168425',), 1394812891: ('0.07582684557168425',), 1394812889: ('0.07582684557168425',), 1394812887: ('0.07582684557168425',)} args : 1394812891 depend.output_id : 0 input_args_next_step : {1394812914: ('0.07582684557168425',), 1394812912: ('0.07582684557168425',), 1394812911: ('0.07582684557168425',), 1394812901: ('0.07582684557168425',), 1394812899: ('0.07582684557168425',), 1394812895: ('0.07582684557168425',), 1394812891: ('0.07582684557168425',), 1394812889: ()} output_args : {1394812914: ('0.07582684557168425',), 1394812912: ('0.07582684557168425',), 1394812911: ('0.07582684557168425',), 1394812901: ('0.07582684557168425',), 1394812899: ('0.07582684557168425',), 1394812895: ('0.07582684557168425',), 1394812891: ('0.07582684557168425',), 1394812889: ('0.07582684557168425',), 1394812887: ('0.07582684557168425',)} args : 1394812889 depend.output_id : 0 input_args_next_step : {1394812914: ('0.07582684557168425',), 1394812912: ('0.07582684557168425',), 1394812911: ('0.07582684557168425',), 1394812901: ('0.07582684557168425',), 1394812899: ('0.07582684557168425',), 1394812895: ('0.07582684557168425',), 1394812891: ('0.07582684557168425',), 1394812889: ('0.07582684557168425',), 1394812887: ()} output_args : {1394812914: ('0.07582684557168425',), 1394812912: ('0.07582684557168425',), 1394812911: ('0.07582684557168425',), 1394812901: ('0.07582684557168425',), 1394812899: ('0.07582684557168425',), 1394812895: ('0.07582684557168425',), 1394812891: ('0.07582684557168425',), 1394812889: ('0.07582684557168425',), 1394812887: ('0.07582684557168425',)} args : 1394812887 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 : {28591089: [{'mal_croppe': 28591115, 'Carton_brun': 28591116, 'environnement': 28591117, 'kraft': 28591118, 'flou': 28591119, 'Teint_Dans_La_Masse': 28591120, 'plastique': 28591121, 'cartonnette': 28591122, 'autre_refus': 28591123, 'papier': 28591124, 'Carton_gris': 28591125, 'metal': 28591126}]} input_args_next_step : {1394812914: ('0.07582684557168425',), 1394812912: ('0.07582684557168425',), 1394812911: ('0.07582684557168425',), 1394812901: ('0.07582684557168425',), 1394812899: ('0.07582684557168425',), 1394812895: ('0.07582684557168425',), 1394812891: ('0.07582684557168425',), 1394812889: ('0.07582684557168425',), 1394812887: ('0.07582684557168425',), 28591089: ()} output_args : {28591089: [{'mal_croppe': 28591115, 'Carton_brun': 28591116, 'environnement': 28591117, 'kraft': 28591118, 'flou': 28591119, 'Teint_Dans_La_Masse': 28591120, 'plastique': 28591121, 'cartonnette': 28591122, 'autre_refus': 28591123, 'papier': 28591124, 'Carton_gris': 28591125, 'metal': 28591126}]} args : 28591089 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 :10, first value : ('0.07582684557168425',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28591089) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos_view ph WHERE photo_id IN (1394812914,1394812912,1394812911,1394812901,1394812899,1394812895,1394812891,1394812889,1394812887) Found this number of photos: 9 ##### Call download_photos : nb_thread : 5 begin to download photo : 1394812887 begin to download photo : 1394812891 begin to download photo : 1394812899 begin to download photo : 1394812911 begin to download photo : 1394812914 download finish for photo 1394812899 begin to download photo : 1394812901 download finish for photo 1394812911 begin to download photo : 1394812912 download finish for photo 1394812914 download finish for photo 1394812891 begin to download photo : 1394812895 download finish for photo 1394812912 download finish for photo 1394812901 download finish for photo 1394812887 begin to download photo : 1394812889 download finish for photo 1394812895 download finish for photo 1394812889 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette285911151763357818/ imagette285911181763357818/ imagette285911191763357818/ imagette285911211763357818/ imagette285911221763357818/ imagette285911231763357819/ imagette285911261763357819/ length of list_filenames : 9 ; length of list_pids : 9 ; length of list_args : 9 results_Auto_P28591089_17-11-2025_06_36_58.pdf 28591115 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28591115 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette285911151763357818 28591118 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28591118 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette285911181763357818 28591119 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28591119 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette285911191763357818 28591121 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28591121 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette285911211763357818 28591122 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28591122 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette285911221763357818 28591123 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28591123 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette285911231763357819 28591126 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28591126 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette285911261763357819 28591116 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28591116 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1394812982: '1763357785_614698_1394812837_dd98904ea47072118f1a327505b3ae2f_rle_crop_4036030843_0.png'} change filename to text .imagette285911161763357819/ imagette285911161763357819/1763357785_614698_1394812837_dd98904ea47072118f1a327505b3ae2f_rle_crop_4036030843_0.png.png imagette285911201763357819/ imagette285911251763357819/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/17/15f2c26824d1c1e4dd7a856db00e114b_6959517.png imagette285911161763357819 28591120 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28591120 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette285911201763357819 28591125 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28591125 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette285911251763357819 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=28591089 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/28591127,28591128,28591129,28591130,28591131,28591132,28591133,28591134,28591135,28591136,28591137,28591138?tags=mal_croppe,Carton_brun,environnement,kraft,flou,Teint_Dans_La_Masse,plastique,cartonnette,autre_refus,papier,Carton_gris,metal your option no_mail is active, we will not send the real mail to your client args[1394812914] : ('0.07582684557168425',) no score found for photo 1394812914 We are sending mail with results at report@fotonower.com args[1394812912] : ('0.07582684557168425',) no score found for photo 1394812912 We are sending mail with results at report@fotonower.com args[1394812911] : ('0.07582684557168425',) no score found for photo 1394812911 We are sending mail with results at report@fotonower.com args[1394812901] : ('0.07582684557168425',) no score found for photo 1394812901 We are sending mail with results at report@fotonower.com args[1394812899] : ('0.07582684557168425',) no score found for photo 1394812899 We are sending mail with results at report@fotonower.com args[1394812895] : ('0.07582684557168425',) no score found for photo 1394812895 We are sending mail with results at report@fotonower.com args[1394812891] : ('0.07582684557168425',) no score found for photo 1394812891 We are sending mail with results at report@fotonower.com args[1394812889] : ('0.07582684557168425',) no score found for photo 1394812889 We are sending mail with results at report@fotonower.com args[1394812887] : ('0.07582684557168425',) no score found for photo 1394812887 We are sending mail with results at report@fotonower.com refus_total : 0.07582684557168425 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28591089 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_P28591089_17-11-2025_06_36_58.pdf results_Auto_P28591089_17-11-2025_06_36_58.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28591089_17-11-2025_06_36_58.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','28591089','results_Auto_P28591089_17-11-2025_06_36_58.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28591089_17-11-2025_06_36_58.pdf','pdf','','0.09','0.07582684557168425') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28591089]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1394812914, 1394812912, 1394812911, 1394812901, 1394812899, 1394812895, 1394812891, 1394812889, 1394812887] map_info['map_portfolio_photo'] : {28591089: [1394812914, 1394812912, 1394812911, 1394812901, 1394812899, 1394812895, 1394812891, 1394812889, 1394812887, 1394812840, 1394812837, 1394812835, 1394812834, 1394812819, 1394812817, 1394812813, 1394812809, 1394812805, 1394812804, 1394812755, 1394812754]} final : False mtd_id 4302 list_pids : [1394812914, 1394812912, 1394812911, 1394812901, 1394812899, 1394812895, 1394812891, 1394812889, 1394812887] 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, '4055854') ('4302', '28591089', '1394812914', None, None, None, None, None, '4055854') ('4302', None, None, None, None, None, None, None, '4055854') ('4302', '28591089', '1394812912', None, None, None, None, None, '4055854') ('4302', None, None, None, None, None, None, None, '4055854') ('4302', '28591089', '1394812911', None, None, None, None, None, '4055854') ('4302', None, None, None, None, None, None, None, '4055854') ('4302', '28591089', '1394812901', None, None, None, None, None, '4055854') ('4302', None, None, None, None, None, None, None, '4055854') ('4302', '28591089', '1394812899', None, None, None, None, None, '4055854') ('4302', None, None, None, None, None, None, None, '4055854') ('4302', '28591089', '1394812895', None, None, None, None, None, '4055854') ('4302', None, None, None, None, None, None, None, '4055854') ('4302', '28591089', '1394812891', None, None, None, None, None, '4055854') ('4302', None, None, None, None, None, None, None, '4055854') ('4302', '28591089', '1394812889', None, None, None, None, None, '4055854') ('4302', None, None, None, None, None, None, None, '4055854') ('4302', '28591089', '1394812887', None, None, None, None, None, '4055854') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 9 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', '28591089', '1394812914', None, None, None, None, None, '4055854'), ('4302', '28591089', '1394812912', None, None, None, None, None, '4055854'), ('4302', '28591089', '1394812911', None, None, None, None, None, '4055854'), ('4302', '28591089', '1394812901', None, None, None, None, None, '4055854'), ('4302', '28591089', '1394812899', None, None, None, None, None, '4055854'), ('4302', '28591089', '1394812895', None, None, None, None, None, '4055854'), ('4302', '28591089', '1394812891', None, None, None, None, None, '4055854'), ('4302', '28591089', '1394812889', None, None, None, None, None, '4055854'), ('4302', '28591089', '1394812887', None, None, None, None, None, '4055854')] time used for this insertion : 0.016406536102294922 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5195198059082031 time spend to save output : 0.016566991806030273 total time spend for step 4 : 1.5360867977142334 step5:split_time_score Mon Nov 17 06:37:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['28591089'] 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 : [('28591089',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28591089) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1394812914: {'path': 'temp/1763357818_297333_1394812914_42d25287b1f99c6583914e1c7036ef03.jpg', 'extension': 'jpg'}, 1394812911: {'path': 'temp/1763357818_297333_1394812911_880080bd3bb6fa4c481c9e16ee1e0416.jpg', 'extension': 'jpg'}, 1394812912: {'path': 'temp/1763357818_297333_1394812912_b1f2b50d37507e951c89fd783c45abc1.jpg', 'extension': 'jpg'}, 1394812899: {'path': 'temp/1763357818_297333_1394812899_a50ba98ec8b9263a128c4154efb9fad1.jpg', 'extension': 'jpg'}, 1394812901: {'path': 'temp/1763357818_297333_1394812901_d9d814d676c565755f2f5f19be448899.jpg', 'extension': 'jpg'}, 1394812891: {'path': 'temp/1763357818_297333_1394812891_877811327ff8a9f32b6716a0f5621199.jpg', 'extension': 'jpg'}, 1394812895: {'path': 'temp/1763357818_297333_1394812895_f705583faca8967419a7d76293c93b83.jpg', 'extension': 'jpg'}, 1394812887: {'path': 'temp/1763357818_297333_1394812887_d6e81e7d91c896ffc0d48b6e117632f2.jpg', 'extension': 'jpg'}, 1394812889: {'path': 'temp/1763357818_297333_1394812889_c6b4e4e69f1b25f5dbda4eb1c14bf023.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 = 28591089; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm',)) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos_view ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 28591089 group by h (('06', 21),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28591089 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 (28591089) 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 (28591089) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 17112025 28591089 Nombre de photos uploadées : 21 / 23040 (0%) 17112025 28591089 Nombre de photos taguées (types de déchets): 0 / 21 (0%) 17112025 28591089 Nombre de photos taguées (volume) : 0 / 21 (0%) [{'photo_id': 1394812755, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/17/c286d95c87e4743bdd04c0852f8f61a1.jpg', 'username': None, 'uploaded_at': 1763357472, 'text': 'image_17112025_06_30_35_10134.jpg'}, {'photo_id': 1394812754, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/17/fb691afec7de5c77562decfea91a86c9.jpg', 'username': None, 'uploaded_at': 1763357472, 'text': 'image_17112025_06_30_44_9125.jpg'}, {'photo_id': 1394812819, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/17/b786aaf1f3d893be4177f9b7d45e659e.jpg', 'username': None, 'uploaded_at': 1763357532, 'text': 'image_17112025_06_30_54_10143.jpg'}, {'photo_id': 1394812817, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/17/707baf17199bca9558c0ea8fea63ab4d.jpg', 'username': None, 'uploaded_at': 1763357532, 'text': 'image_17112025_06_31_04_10141.jpg'}] 0 [] elapsed_time : load_data_split_time_score 9.5367431640625e-07 elapsed_time : order_list_meta_photo_and_scores 2.86102294921875e-06 ????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0006055831909179688 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 28591089, '2025-11-17' ) 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-11-17' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2592139,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.20258355140686035 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= 2592139 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2592139, 'dashboard_run_id': 2599384, 'mtr_portfolio_id': 28588540, 'dashboard_result_id': 17326440, '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_P28588540_17-11-2025_05_19_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28588542, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28588543, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28588544, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28588545, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28588546, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28588547, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28588548, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28588549, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28588550, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28588551, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28588552, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28588553, 'pht': 3726}}"}, {'dashboat_entry_day': 2592139, 'dashboard_run_id': 2599384, 'mtr_portfolio_id': 28588944, 'dashboard_result_id': 17326441, '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_P28588944_17-11-2025_05_33_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28588947, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28588948, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28588949, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28588950, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28588951, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28588952, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28588953, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28588954, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28588955, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28588956, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28588957, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28588958, 'pht': 3726}}"}, {'dashboat_entry_day': 2592139, 'dashboard_run_id': 2599384, 'mtr_portfolio_id': 28589312, 'dashboard_result_id': 17326442, '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_P28589312_17-11-2025_05_49_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28589317, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28589318, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28589319, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28589320, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28589321, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28589322, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28589323, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28589324, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28589325, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28589326, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28589327, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28589328, 'pht': 3726}}"}, {'dashboat_entry_day': 2592139, 'dashboard_run_id': 2599384, 'mtr_portfolio_id': 28589740, 'dashboard_result_id': 17326443, '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_P28589740_17-11-2025_06_03_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28589748, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28589749, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28589750, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28589751, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28589752, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28589753, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28589754, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28589755, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28589756, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28589757, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28589758, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28589759, 'pht': 3726}}"}, {'dashboat_entry_day': 2592139, 'dashboard_run_id': 2599384, 'mtr_portfolio_id': 28590136, 'dashboard_result_id': 17326444, '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_P28590136_17-11-2025_06_18_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28590182, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28590183, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28590184, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28590185, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28590186, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28590187, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28590188, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28590189, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28590190, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28590191, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28590192, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28590193, 'pht': 3726}}"}, {'dashboat_entry_day': 2592139, 'dashboard_run_id': 2599384, 'mtr_portfolio_id': 28590689, 'dashboard_result_id': 17326445, '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_P28590689_17-11-2025_06_32_57.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28590698, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28590699, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28590700, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28590701, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28590702, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28590703, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28590704, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28590705, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28590706, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28590707, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28590708, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28590709, 'pht': 3726}}"}, {'dashboat_entry_day': 2592139, 'dashboard_run_id': 2599384, 'mtr_portfolio_id': 28591089, 'dashboard_result_id': 17326446, '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_P28591089_17-11-2025_06_34_31.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28591115, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28591116, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28591117, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28591118, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28591119, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28591120, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28591121, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28591122, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28591123, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28591124, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28591125, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28591126, '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 = 28588540 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': 4055474, 'mtr_portfolio_id': 28588540, 'created_at': datetime.datetime(2025, 11, 17, 5, 18, 59), 'result': '0.049213037188093355', 'result_long': None, 'result_double': None}] Qualite : 0.049213037188093355 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28588540 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28588540_17-11-2025_05_19_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28588540 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_P28588540_17-11-2025_05_19_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28588542, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28588543, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28588544, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28588545, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28588546, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28588547, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28588548, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28588549, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28588550, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28588551, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28588552, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28588553, 'pht': 3726}}" where mtr_portfolio_id = 28588540 and dashboard_run_id = 2599384 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`=28588540 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17326440, 0.049213037188093355, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28588540_17-11-2025_05_19_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28588542, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28588543, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28588544, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28588545, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28588546, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28588547, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28588548, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28588549, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28588550, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28588551, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28588552, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28588553, '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 = 28588944 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': 4055508, 'mtr_portfolio_id': 28588944, 'created_at': datetime.datetime(2025, 11, 17, 5, 33), 'result': '0.04431631758058558', 'result_long': None, 'result_double': None}] Qualite : 0.04431631758058558 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28588944 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28588944_17-11-2025_05_33_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28588944 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_P28588944_17-11-2025_05_33_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28588947, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28588948, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28588949, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28588950, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28588951, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28588952, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28588953, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28588954, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28588955, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28588956, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28588957, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28588958, 'pht': 3726}}" where mtr_portfolio_id = 28588944 and dashboard_run_id = 2599384 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`=28588944 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17326441, 0.04431631758058558, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28588944_17-11-2025_05_33_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28588947, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28588948, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28588949, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28588950, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28588951, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28588952, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28588953, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28588954, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28588955, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28588956, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28588957, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28588958, '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 = 28589312 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': 4055564, 'mtr_portfolio_id': 28589312, 'created_at': datetime.datetime(2025, 11, 17, 5, 49), 'result': '0.03502824541316796', 'result_long': None, 'result_double': None}] Qualite : 0.03502824541316796 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28589312 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28589312_17-11-2025_05_49_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28589312 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_P28589312_17-11-2025_05_49_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28589317, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28589318, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28589319, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28589320, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28589321, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28589322, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28589323, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28589324, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28589325, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28589326, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28589327, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28589328, 'pht': 3726}}" where mtr_portfolio_id = 28589312 and dashboard_run_id = 2599384 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`=28589312 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17326442, 0.03502824541316796, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28589312_17-11-2025_05_49_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28589317, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28589318, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28589319, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28589320, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28589321, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28589322, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28589323, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28589324, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28589325, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28589326, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28589327, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28589328, '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 = 28589740 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': 4055626, 'mtr_portfolio_id': 28589740, 'created_at': datetime.datetime(2025, 11, 17, 6, 3), 'result': '0.03192295252123967', 'result_long': None, 'result_double': None}] Qualite : 0.03192295252123967 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28589740 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28589740_17-11-2025_06_03_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28589740 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_P28589740_17-11-2025_06_03_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28589748, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28589749, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28589750, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28589751, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28589752, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28589753, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28589754, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28589755, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28589756, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28589757, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28589758, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28589759, 'pht': 3726}}" where mtr_portfolio_id = 28589740 and dashboard_run_id = 2599386 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`=28589740 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17326443, 0.03192295252123967, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28589740_17-11-2025_06_03_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28589748, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28589749, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28589750, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28589751, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28589752, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28589753, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28589754, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28589755, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28589756, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28589757, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28589758, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28589759, '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 = 28590136 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': 4055708, 'mtr_portfolio_id': 28590136, 'created_at': datetime.datetime(2025, 11, 17, 6, 18, 59), 'result': '0.03224026798486873', 'result_long': None, 'result_double': None}] Qualite : 0.03224026798486873 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28590136 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28590136_17-11-2025_06_18_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28590136 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_P28590136_17-11-2025_06_18_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28590182, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28590183, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28590184, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28590185, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28590186, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28590187, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28590188, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28590189, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28590190, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28590191, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28590192, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28590193, 'pht': 3726}}" where mtr_portfolio_id = 28590136 and dashboard_run_id = 2599386 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`=28590136 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17326444, 0.03224026798486873, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28590136_17-11-2025_06_18_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28590182, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28590183, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28590184, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28590185, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28590186, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28590187, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28590188, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28590189, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28590190, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28590191, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28590192, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28590193, '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 = 28590689 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': 4055780, 'mtr_portfolio_id': 28590689, 'created_at': datetime.datetime(2025, 11, 17, 6, 32, 57), 'result': '0.03351984753258383', 'result_long': None, 'result_double': None}] Qualite : 0.03351984753258383 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28590689 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28590689_17-11-2025_06_32_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28590689 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_P28590689_17-11-2025_06_32_57.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28590698, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28590699, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28590700, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28590701, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28590702, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28590703, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28590704, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28590705, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28590706, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28590707, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28590708, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28590709, 'pht': 3726}}" where mtr_portfolio_id = 28590689 and dashboard_run_id = 2599386 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`=28590689 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17326445, 0.03351984753258383, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28590689_17-11-2025_06_32_57.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28590698, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28590699, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28590700, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28590701, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28590702, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28590703, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28590704, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28590705, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28590706, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28590707, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28590708, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28590709, '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 = 28591089 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': 4055854, 'mtr_portfolio_id': 28591089, 'created_at': datetime.datetime(2025, 11, 17, 6, 36, 58), 'result': '0.07582684557168425', 'result_long': None, 'result_double': None}] Qualite : 0.07582684557168425 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28591089 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28591089_17-11-2025_06_36_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28591089 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_P28591089_17-11-2025_06_36_58.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28591115, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28591116, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28591117, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28591118, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28591119, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28591120, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28591121, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28591122, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28591123, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28591124, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28591125, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28591126, 'pht': 3726}}" where mtr_portfolio_id = 28591089 and dashboard_run_id = 2599386 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`=28591089 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17326446, 0.07582684557168425, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28591089_17-11-2025_06_36_58.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28591115, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28591116, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28591117, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28591118, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28591119, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28591120, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28591121, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28591122, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28591123, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28591124, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28591125, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28591126, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28588540,28588944,28589312,28589740,28590136,28590689,28591089) result : ((1394809138,), (1394809175,), (1394809488,), (1394809490,), (1394809506,), (1394809507,), (1394809508,), (1394809519,), (1394809533,), (1394809535,), (1394809537,), (1394809546,), (1394809548,), (1394809550,), (1394809552,), (1394809554,), (1394809556,), (1394809569,), (1394809571,), (1394809573,), (1394809575,), (1394809585,), (1394809586,), (1394809587,), (1394809588,), (1394809589,), (1394809617,), (1394809619,), (1394809621,), (1394809623,), (1394809625,), (1394809627,), (1394809635,), (1394809637,), (1394809639,), (1394809656,), (1394809658,), (1394809660,), (1394809663,), (1394809665,), (1394809667,), (1394809674,), (1394809676,), (1394809679,), (1394809682,), (1394809714,), (1394809715,), (1394809716,), (1394809717,), (1394809719,), (1394809720,), (1394809725,), (1394809727,), (1394809728,), (1394809733,), (1394809736,), (1394809738,), (1394809740,), (1394809773,), (1394809759,), (1394809763,), (1394809765,), (1394809768,), (1394809771,), (1394809781,), (1394809783,), (1394809785,), (1394809788,), (1394809791,), (1394809814,), (1394809815,), (1394809817,), (1394809820,), (1394809831,), (1394809832,), (1394809833,), (1394809834,), (1394809836,), (1394809839,), (1394809854,), (1394809856,), (1394809858,), (1394809861,), (1394809872,), (1394809873,), (1394809874,), (1394809876,), (1394809878,), (1394809880,), (1394809896,), (1394809898,), (1394809900,), (1394809902,), (1394809926,), (1394809930,), (1394809935,), (1394809939,), (1394809943,), (1394809945,), (1394809995,), (1394809998,), (1394810000,), (1394810002,), (1394810014,), (1394810015,), (1394810016,), (1394810018,), (1394810020,), (1394810022,), (1394810043,), (1394810044,), (1394810046,), (1394810047,), (1394810049,), (1394810056,), (1394810058,), (1394810060,), (1394810062,), (1394810066,), (1394810069,), (1394810093,), (1394810095,), (1394810097,), (1394810099,), (1394810109,), (1394810111,), (1394810113,), (1394810115,), (1394810136,), (1394810138,), (1394810140,), (1394810141,), (1394810143,), (1394810145,), (1394810189,), (1394810191,), (1394810193,), (1394810194,), (1394810206,), (1394810211,), (1394810214,), (1394810186,), (1394810187,), (1394810218,), (1394810219,), (1394810220,), (1394810221,), (1394810222,), (1394810224,), (1394810237,), (1394810239,), (1394810244,), (1394810248,), (1394810273,), (1394810274,), (1394810277,), (1394810279,), (1394810282,), (1394810284,), (1394810292,), (1394810293,), (1394810294,), (1394810295,), (1394810330,), (1394810331,), (1394810332,), (1394810333,), (1394810335,), (1394810337,), (1394810348,), (1394810350,), (1394810352,), (1394810354,), (1394810383,), (1394810384,), (1394810385,), (1394810386,), (1394810389,), (1394810391,), (1394810399,), (1394810401,), (1394810403,), (1394810406,), (1394810424,), (1394810425,), (1394810426,), (1394810428,), (1394810429,), (1394810440,), (1394810441,), (1394810443,), (1394810445,), (1394810447,), (1394810464,), (1394810465,), (1394810466,), (1394810468,), (1394810471,), (1394810481,), (1394810485,), (1394810487,), (1394810491,), (1394810493,), (1394810494,), (1394810508,), (1394810509,), (1394810511,), (1394810517,), (1394810525,), (1394810526,), (1394810528,), (1394810530,), (1394810532,), (1394810546,), (1394810548,), (1394810549,), (1394810550,), (1394810552,), (1394810590,), (1394810593,), (1394810595,), (1394810597,), (1394810599,), (1394810603,), (1394810581,), (1394810583,), (1394810585,), (1394810586,), (1394810588,), (1394810610,), (1394810613,), (1394810616,), (1394810617,), (1394810654,), (1394810656,), (1394810658,), (1394810660,), (1394810663,), (1394810665,), (1394810674,), (1394810676,), (1394810677,), (1394810679,), (1394810702,), (1394810704,), (1394810706,), (1394810708,), (1394810711,), (1394810721,), (1394810723,), (1394810726,), (1394810730,), (1394810732,), (1394810735,), (1394810752,), (1394810756,), (1394810758,), (1394810761,), (1394810764,), (1394810772,), (1394810774,), (1394810777,), (1394810781,), (1394810784,), (1394810787,), (1394810806,), (1394810809,), (1394810811,), (1394810813,), (1394810826,), (1394810827,), (1394810828,), (1394810830,), (1394810833,), (1394810836,), (1394810843,), (1394810844,), (1394810845,), (1394810846,), (1394810851,), (1394810853,), (1394810856,), (1394810858,), (1394810866,), (1394810867,), (1394810899,), (1394810931,), (1394810965,), (1394810997,), (1394811094,), (1394811095,), (1394811096,), (1394811707,), (1394811711,), (1394811714,), (1394811716,), (1394811734,), (1394811770,), (1394811885,), (1394811875,), (1394811877,), (1394811879,), (1394811881,), (1394811910,), (1394811911,), (1394811913,), (1394811914,), (1394811931,), (1394811934,), (1394811937,), (1394811959,), (1394811960,), (1394811961,), (1394811962,), (1394811964,), (1394811966,), (1394811984,), (1394811985,), (1394811988,), (1394811992,), (1394811994,), (1394811997,), (1394812014,), (1394812015,), (1394812017,), (1394812029,), (1394812030,), (1394812032,), (1394812035,), (1394812038,), (1394812041,), (1394812056,), (1394812058,), (1394812060,), (1394812080,), (1394812081,), (1394812082,), (1394812083,), (1394812086,), (1394812089,), (1394812104,), (1394812105,), (1394812107,), (1394812111,), (1394812148,), (1394812150,), (1394812152,), (1394812155,), (1394812159,), (1394812162,), (1394812174,), (1394812177,), (1394812179,), (1394812183,), (1394812186,), (1394812198,), (1394812200,), (1394812202,), (1394812204,), (1394812225,), (1394812226,), (1394812227,), (1394812228,), (1394812266,), (1394812268,), (1394812270,), (1394812272,), (1394812274,), (1394812277,), (1394812293,), (1394812295,), (1394812298,), (1394812299,), (1394812343,), (1394812332,), (1394812334,), (1394812336,), (1394812339,), (1394812359,), (1394812361,), (1394812363,), (1394812366,), (1394812369,), (1394812394,), (1394812397,), (1394812398,), (1394812400,), (1394812411,), (1394812413,), (1394812416,), (1394812420,), (1394812424,), (1394812426,), (1394812438,), (1394812439,), (1394812440,), (1394812441,), (1394812464,), (1394812465,), (1394812466,), (1394812467,), (1394812471,), (1394812473,), (1394812489,), (1394812491,), (1394812493,), (1394812495,), (1394812510,), (1394812511,), (1394812512,), (1394812513,), (1394812516,), (1394812520,), (1394812545,), (1394812547,), (1394812549,), (1394812552,), (1394812571,), (1394812573,), (1394812575,), (1394812578,), (1394812580,), (1394812584,), (1394812604,), (1394812605,), (1394812606,), (1394812610,), (1394812614,), (1394812617,), (1394812625,), (1394812626,), (1394812627,), (1394812628,), (1394812629,), (1394812631,), (1394812636,), (1394812639,), (1394812641,), (1394812643,), (1394812668,), (1394812669,), (1394812670,), (1394812671,), (1394812672,), (1394812675,), (1394812693,), (1394812697,), (1394812700,), (1394812701,), (1394812726,), (1394812728,), (1394812731,), (1394812734,), (1394812738,), (1394812741,), (1394812757,), (1394812761,), (1394812764,), (1394812767,), (1394812787,), (1394812792,), (1394812793,), (1394812754,), (1394812755,), (1394812804,), (1394812805,), (1394812809,), (1394812813,), (1394812817,), (1394812819,), (1394812834,), (1394812835,), (1394812837,), (1394812840,), (1394812887,), (1394812889,), (1394812891,), (1394812895,), (1394812899,), (1394812901,), (1394812911,), (1394812912,), (1394812914,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'17112025': {'nb_upload': 21, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28591089]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1394812914, 1394812912, 1394812911, 1394812901, 1394812899, 1394812895, 1394812891, 1394812889, 1394812887] map_info['map_portfolio_photo'] : {28591089: [1394812914, 1394812912, 1394812911, 1394812901, 1394812899, 1394812895, 1394812891, 1394812889, 1394812887, 1394812840, 1394812837, 1394812835, 1394812834, 1394812819, 1394812817, 1394812813, 1394812809, 1394812805, 1394812804, 1394812755, 1394812754]} final : True mtd_id 4302 list_pids : [1394812914, 1394812912, 1394812911, 1394812901, 1394812899, 1394812895, 1394812891, 1394812889, 1394812887] Looping around the photos to save general results len do output : 1 /28591089Didn'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, '4055854') ('4302', '28591089', '1394812914', None, None, None, None, None, '4055854') ('4302', None, None, None, None, None, None, None, '4055854') ('4302', '28591089', '1394812912', None, None, None, None, None, '4055854') ('4302', None, None, None, None, None, None, None, '4055854') ('4302', '28591089', '1394812911', None, None, None, None, None, '4055854') ('4302', None, None, None, None, None, None, None, '4055854') ('4302', '28591089', '1394812901', None, None, None, None, None, '4055854') ('4302', None, None, None, None, None, None, None, '4055854') ('4302', '28591089', '1394812899', None, None, None, None, None, '4055854') ('4302', None, None, None, None, None, None, None, '4055854') ('4302', '28591089', '1394812895', None, None, None, None, None, '4055854') ('4302', None, None, None, None, None, None, None, '4055854') ('4302', '28591089', '1394812891', None, None, None, None, None, '4055854') ('4302', None, None, None, None, None, None, None, '4055854') ('4302', '28591089', '1394812889', None, None, None, None, None, '4055854') ('4302', None, None, None, None, None, None, None, '4055854') ('4302', '28591089', '1394812887', None, None, None, None, None, '4055854') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 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, '28591089', 'None', None, None, None, None, '4055854'), ('4302', '28591089', '1394812914', None, None, None, None, None, '4055854'), ('4302', '28591089', '1394812912', None, None, None, None, None, '4055854'), ('4302', '28591089', '1394812911', None, None, None, None, None, '4055854'), ('4302', '28591089', '1394812901', None, None, None, None, None, '4055854'), ('4302', '28591089', '1394812899', None, None, None, None, None, '4055854'), ('4302', '28591089', '1394812895', None, None, None, None, None, '4055854'), ('4302', '28591089', '1394812891', None, None, None, None, None, '4055854'), ('4302', '28591089', '1394812889', None, None, None, None, None, '4055854'), ('4302', '28591089', '1394812887', None, None, None, None, None, '4055854')] time used for this insertion : 0.01403951644897461 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.6682422161102295 time spend to save output : 0.014184951782226562 total time spend for step 5 : 0.682427167892456 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 (4055854) 1.98user 2.49system 0:05.84elapsed 76%CPU (0avgtext+0avgdata 161816maxresident)k 50448inputs+5592outputs (339major+64171minor)pagefaults 0swaps