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 : 2840623 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 (3711822) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3711822) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26792889 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3711822'] with mtr_portfolio_ids : ['26792889'] and first list_photo_ids : [] new path : /proc/2840623/ Name: python3 Umask: 0002 State: R (running) Tgid: 2840623 Ngid: 0 Pid: 2840623 PPid: 2840622 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 2840623 NSpid: 2840623 NSpgid: 2839900 NSsid: 2839900 VmPeak: 1107252 kB VmSize: 1107252 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98048 kB VmRSS: 98048 kB RssAnon: 60164 kB RssFile: 37884 kB RssShmem: 0 kB VmData: 866004 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 556 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 48 nonvoluntary_ctxt_switches: 124 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '2840623', 'Ngid': '0', 'Pid': '2840623', 'PPid': '2840622', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '2840623', 'NSpid': '2840623', 'NSpgid': '2839900', 'NSsid': '2839900', 'VmPeak': '1107252 kB', 'VmSize': '1107252 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98048 kB', 'VmRSS': '98048 kB', 'RssAnon': '60164 kB', 'RssFile': '37884 kB', 'RssShmem': '0 kB', 'VmData': '866004 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '556 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '48', 'nonvoluntary_ctxt_switches': '124'} ('datou_batch_current', '2840623', '1107252', '0', '1107252', '866004', '98048', b'', 'marlene', '3711822') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (26792889) 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 (3711822 ) ) 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 (26792889) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1383463584, 'portfolio_id': 26792889}, {'photo_id': 1383463579, 'portfolio_id': 26792889}, {'photo_id': 1383463577, 'portfolio_id': 26792889}, {'photo_id': 1383463576, 'portfolio_id': 26792889}, {'photo_id': 1383463573, 'portfolio_id': 26792889}] map_portfolio_id_photo_id: {26792889: [1383463584, 1383463579, 1383463577, 1383463576, 1383463573]} ##### 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.01485753059387207 #### 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 Fri Sep 12 14:33:28 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26792889) 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 : 26792889 get user id for portfolio 26792889 get sub ptf for main ptf 26792889, type 3726 and hashtags ['mal_croppe', 'cartonnette', 'Teint_Dans_La_Masse', 'metal', 'autre_refus', 'flou', 'Carton_brun', 'plastique', 'papier', 'kraft', 'Carton_gris', 'environnement'] 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`=26792889 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','cartonnette','Teint_Dans_La_Masse','metal','autre_refus','flou','Carton_brun','plastique','papier','kraft','Carton_gris','environnement')) 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`=26792889 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','cartonnette','Teint_Dans_La_Masse','metal','autre_refus','flou','Carton_brun','plastique','papier','kraft','Carton_gris','environnement')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12092025_14_30_05_010137_3726_mal_croppe_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12092025_14_30_05_010137_3726_cartonnette_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12092025_14_30_05_010137_3726_Teint_Dans_La_Masse_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12092025_14_30_05_010137_3726_metal_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12092025_14_30_05_010137_3726_autre_refus_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12092025_14_30_05_010137_3726_flou_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12092025_14_30_05_010137_3726_Carton_brun_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12092025_14_30_05_010137_3726_plastique_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12092025_14_30_05_010137_3726_papier_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12092025_14_30_05_010137_3726_kraft_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12092025_14_30_05_010137_3726_Carton_gris_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12092025_14_30_05_010137_3726_environnement_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio INSERT IGNORE INTO MTRPhoto.mtr_port_to_port_ids (`mtr_portfolio_id_1`, `mtr_portfolio_id_2`, `type`, `min_score`, `hashtag_id`, `mtr_user_id`) VALUES (%s,%s,%s,%s,%s,%s)[[26792889, 26792926, 3726, 0.5, 2107755527, 979], [26792889, 26792927, 3726, 0.5, 702398920, 979], [26792889, 26792928, 3726, 0.5, 2107752385, 979], [26792889, 26792929, 3726, 0.5, 492628673, 979], [26792889, 26792930, 3726, 0.5, 2107752406, 979], [26792889, 26792931, 3726, 0.5, 492777938, 979], [26792889, 26792932, 3726, 0.5, 2107753024, 979], [26792889, 26792933, 3726, 0.5, 492725882, 979], [26792889, 26792934, 3726, 0.5, 492668766, 979], [26792889, 26792935, 3726, 0.5, 493202403, 979], [26792889, 26792936, 3726, 0.5, 2107753020, 979], [26792889, 26792937, 3726, 0.5, 493012381, 979]] 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`=26792889 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','cartonnette','Teint_Dans_La_Masse','metal','autre_refus','flou','Carton_brun','plastique','papier','kraft','Carton_gris','environnement')) 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`=26792889 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','cartonnette','Teint_Dans_La_Masse','metal','autre_refus','flou','Carton_brun','plastique','papier','kraft','Carton_gris','environnement')) AND mptpi.`min_score`=0.5 To do returned map {'mal_croppe': {'main_port_id': 26792889, 'sub_port_id': 26792926, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18059549, 'last_updated_at': datetime.datetime(2025, 9, 12, 14, 33, 28), 'last_updated_at_desc': datetime.datetime(2025, 9, 12, 14, 33, 28), 'last_updated_at_asc': datetime.datetime(2025, 9, 12, 14, 33, 28)}, 'cartonnette': {'main_port_id': 26792889, 'sub_port_id': 26792927, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18059550, 'last_updated_at': datetime.datetime(2025, 9, 12, 14, 33, 28), 'last_updated_at_desc': datetime.datetime(2025, 9, 12, 14, 33, 28), 'last_updated_at_asc': datetime.datetime(2025, 9, 12, 14, 33, 28)}, 'Teint_Dans_La_Masse': {'main_port_id': 26792889, 'sub_port_id': 26792928, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18059551, 'last_updated_at': datetime.datetime(2025, 9, 12, 14, 33, 28), 'last_updated_at_desc': datetime.datetime(2025, 9, 12, 14, 33, 28), 'last_updated_at_asc': datetime.datetime(2025, 9, 12, 14, 33, 28)}, 'metal': {'main_port_id': 26792889, 'sub_port_id': 26792929, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18059552, 'last_updated_at': datetime.datetime(2025, 9, 12, 14, 33, 28), 'last_updated_at_desc': datetime.datetime(2025, 9, 12, 14, 33, 28), 'last_updated_at_asc': datetime.datetime(2025, 9, 12, 14, 33, 28)}, 'autre_refus': {'main_port_id': 26792889, 'sub_port_id': 26792930, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18059553, 'last_updated_at': datetime.datetime(2025, 9, 12, 14, 33, 28), 'last_updated_at_desc': datetime.datetime(2025, 9, 12, 14, 33, 28), 'last_updated_at_asc': datetime.datetime(2025, 9, 12, 14, 33, 28)}, 'flou': {'main_port_id': 26792889, 'sub_port_id': 26792931, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18059554, 'last_updated_at': datetime.datetime(2025, 9, 12, 14, 33, 28), 'last_updated_at_desc': datetime.datetime(2025, 9, 12, 14, 33, 28), 'last_updated_at_asc': datetime.datetime(2025, 9, 12, 14, 33, 28)}, 'Carton_brun': {'main_port_id': 26792889, 'sub_port_id': 26792932, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18059555, 'last_updated_at': datetime.datetime(2025, 9, 12, 14, 33, 28), 'last_updated_at_desc': datetime.datetime(2025, 9, 12, 14, 33, 28), 'last_updated_at_asc': datetime.datetime(2025, 9, 12, 14, 33, 28)}, 'plastique': {'main_port_id': 26792889, 'sub_port_id': 26792933, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18059556, 'last_updated_at': datetime.datetime(2025, 9, 12, 14, 33, 28), 'last_updated_at_desc': datetime.datetime(2025, 9, 12, 14, 33, 28), 'last_updated_at_asc': datetime.datetime(2025, 9, 12, 14, 33, 28)}, 'papier': {'main_port_id': 26792889, 'sub_port_id': 26792934, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18059557, 'last_updated_at': datetime.datetime(2025, 9, 12, 14, 33, 28), 'last_updated_at_desc': datetime.datetime(2025, 9, 12, 14, 33, 28), 'last_updated_at_asc': datetime.datetime(2025, 9, 12, 14, 33, 28)}, 'kraft': {'main_port_id': 26792889, 'sub_port_id': 26792935, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18059558, 'last_updated_at': datetime.datetime(2025, 9, 12, 14, 33, 28), 'last_updated_at_desc': datetime.datetime(2025, 9, 12, 14, 33, 28), 'last_updated_at_asc': datetime.datetime(2025, 9, 12, 14, 33, 28)}, 'Carton_gris': {'main_port_id': 26792889, 'sub_port_id': 26792936, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18059559, 'last_updated_at': datetime.datetime(2025, 9, 12, 14, 33, 28), 'last_updated_at_desc': datetime.datetime(2025, 9, 12, 14, 33, 28), 'last_updated_at_asc': datetime.datetime(2025, 9, 12, 14, 33, 28)}, 'environnement': {'main_port_id': 26792889, 'sub_port_id': 26792937, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18059560, 'last_updated_at': datetime.datetime(2025, 9, 12, 14, 33, 28), 'last_updated_at_desc': datetime.datetime(2025, 9, 12, 14, 33, 28), 'last_updated_at_asc': datetime.datetime(2025, 9, 12, 14, 33, 28)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26792926 , 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=26792889 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 (26792926) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26792889) result : ((1383463573,), (1383463576,), (1383463577,), (1383463579,), (1383463584,)) 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 26792927 , 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=26792889 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 (26792927) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26792889) result : ((1383463573,), (1383463576,), (1383463577,), (1383463579,), (1383463584,)) 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 26792928 , 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=26792889 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 (26792928) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26792889) result : ((1383463573,), (1383463576,), (1383463577,), (1383463579,), (1383463584,)) 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 26792929 , 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=26792889 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 (26792929) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26792889) result : ((1383463573,), (1383463576,), (1383463577,), (1383463579,), (1383463584,)) 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 26792930 , 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=26792889 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 (26792930) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26792889) result : ((1383463573,), (1383463576,), (1383463577,), (1383463579,), (1383463584,)) 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 26792931 , 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=26792889 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 (26792931) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26792889) result : ((1383463573,), (1383463576,), (1383463577,), (1383463579,), (1383463584,)) 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 26792932 , 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=26792889 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 (26792932) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26792889) result : ((1383463573,), (1383463576,), (1383463577,), (1383463579,), (1383463584,)) 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 26792933 , 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=26792889 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 (26792933) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26792889) result : ((1383463573,), (1383463576,), (1383463577,), (1383463579,), (1383463584,)) 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 26792934 , 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=26792889 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 (26792934) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26792889) result : ((1383463573,), (1383463576,), (1383463577,), (1383463579,), (1383463584,)) 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 26792935 , 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=26792889 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 (26792935) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26792889) result : ((1383463573,), (1383463576,), (1383463577,), (1383463579,), (1383463584,)) 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 26792936 , 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=26792889 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 (26792936) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26792889) result : ((1383463573,), (1383463576,), (1383463577,), (1383463579,), (1383463584,)) 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 26792937 , 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=26792889 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 (26792937) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26792889) result : ((1383463573,), (1383463576,), (1383463577,), (1383463579,), (1383463584,)) 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`=26792889 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','cartonnette','Teint_Dans_La_Masse','metal','autre_refus','flou','Carton_brun','plastique','papier','kraft','Carton_gris','environnement')) 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`=26792889 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','cartonnette','Teint_Dans_La_Masse','metal','autre_refus','flou','Carton_brun','plastique','papier','kraft','Carton_gris','environnement')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12092025_14_30_05_010137_4417_mal_croppe_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12092025_14_30_05_010137_4417_cartonnette_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12092025_14_30_05_010137_4417_Teint_Dans_La_Masse_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12092025_14_30_05_010137_4417_metal_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12092025_14_30_05_010137_4417_autre_refus_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12092025_14_30_05_010137_4417_flou_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12092025_14_30_05_010137_4417_Carton_brun_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12092025_14_30_05_010137_4417_plastique_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12092025_14_30_05_010137_4417_papier_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12092025_14_30_05_010137_4417_kraft_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12092025_14_30_05_010137_4417_Carton_gris_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12092025_14_30_05_010137_4417_environnement_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio INSERT IGNORE INTO MTRPhoto.mtr_port_to_port_ids (`mtr_portfolio_id_1`, `mtr_portfolio_id_2`, `type`, `min_score`, `hashtag_id`, `mtr_user_id`) VALUES (%s,%s,%s,%s,%s,%s)[[26792889, 26792939, 4417, 0.5, 2107755527, 979], [26792889, 26792940, 4417, 0.5, 702398920, 979], [26792889, 26792941, 4417, 0.5, 2107752385, 979], [26792889, 26792942, 4417, 0.5, 492628673, 979], [26792889, 26792943, 4417, 0.5, 2107752406, 979], [26792889, 26792944, 4417, 0.5, 492777938, 979], [26792889, 26792945, 4417, 0.5, 2107753024, 979], [26792889, 26792946, 4417, 0.5, 492725882, 979], [26792889, 26792947, 4417, 0.5, 492668766, 979], [26792889, 26792948, 4417, 0.5, 493202403, 979], [26792889, 26792949, 4417, 0.5, 2107753020, 979], [26792889, 26792950, 4417, 0.5, 493012381, 979]] 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`=26792889 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','cartonnette','Teint_Dans_La_Masse','metal','autre_refus','flou','Carton_brun','plastique','papier','kraft','Carton_gris','environnement')) 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`=26792889 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','cartonnette','Teint_Dans_La_Masse','metal','autre_refus','flou','Carton_brun','plastique','papier','kraft','Carton_gris','environnement')) AND mptpi.`min_score`=0.5 To do returned map {'mal_croppe': {'main_port_id': 26792889, 'sub_port_id': 26792939, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18059561, 'last_updated_at': datetime.datetime(2025, 9, 12, 14, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 12, 14, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 12, 14, 33, 30)}, 'cartonnette': {'main_port_id': 26792889, 'sub_port_id': 26792940, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18059562, 'last_updated_at': datetime.datetime(2025, 9, 12, 14, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 12, 14, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 12, 14, 33, 30)}, 'Teint_Dans_La_Masse': {'main_port_id': 26792889, 'sub_port_id': 26792941, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18059563, 'last_updated_at': datetime.datetime(2025, 9, 12, 14, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 12, 14, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 12, 14, 33, 30)}, 'metal': {'main_port_id': 26792889, 'sub_port_id': 26792942, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18059564, 'last_updated_at': datetime.datetime(2025, 9, 12, 14, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 12, 14, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 12, 14, 33, 30)}, 'autre_refus': {'main_port_id': 26792889, 'sub_port_id': 26792943, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18059565, 'last_updated_at': datetime.datetime(2025, 9, 12, 14, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 12, 14, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 12, 14, 33, 30)}, 'flou': {'main_port_id': 26792889, 'sub_port_id': 26792944, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18059566, 'last_updated_at': datetime.datetime(2025, 9, 12, 14, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 12, 14, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 12, 14, 33, 30)}, 'Carton_brun': {'main_port_id': 26792889, 'sub_port_id': 26792945, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18059567, 'last_updated_at': datetime.datetime(2025, 9, 12, 14, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 12, 14, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 12, 14, 33, 30)}, 'plastique': {'main_port_id': 26792889, 'sub_port_id': 26792946, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18059568, 'last_updated_at': datetime.datetime(2025, 9, 12, 14, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 12, 14, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 12, 14, 33, 30)}, 'papier': {'main_port_id': 26792889, 'sub_port_id': 26792947, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18059569, 'last_updated_at': datetime.datetime(2025, 9, 12, 14, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 12, 14, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 12, 14, 33, 30)}, 'kraft': {'main_port_id': 26792889, 'sub_port_id': 26792948, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18059570, 'last_updated_at': datetime.datetime(2025, 9, 12, 14, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 12, 14, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 12, 14, 33, 30)}, 'Carton_gris': {'main_port_id': 26792889, 'sub_port_id': 26792949, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18059571, 'last_updated_at': datetime.datetime(2025, 9, 12, 14, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 12, 14, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 12, 14, 33, 30)}, 'environnement': {'main_port_id': 26792889, 'sub_port_id': 26792950, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18059572, 'last_updated_at': datetime.datetime(2025, 9, 12, 14, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 12, 14, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 12, 14, 33, 30)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26792939,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26792926 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26792940,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26792927 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26792941,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26792928 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26792942,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26792929 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26792943,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26792930 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26792944,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26792931 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26792945,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26792932 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26792946,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26792933 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26792947,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26792934 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26792948,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26792935 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26792949,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26792936 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26792950,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26792937 lien utilise dans velours : https://marlene.fotonower.com/velours/26792939,26792940,26792941,26792942,26792943,26792944,26792945,26792946,26792947,26792948,26792949,26792950?tags=mal_croppe,cartonnette,Teint_Dans_La_Masse,metal,autre_refus,flou,Carton_brun,plastique,papier,kraft,Carton_gris,environnement After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26792889]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1383463584, 1383463579, 1383463577, 1383463576, 1383463573] map_info['map_portfolio_photo'] : {26792889: [1383463584, 1383463579, 1383463577, 1383463576, 1383463573]} final : False mtd_id 4302 list_pids : [1383463584, 1383463579, 1383463577, 1383463576, 1383463573] Looping around the photos to save general results len do output : 1 /26792889. 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, '3711822') ('4302', '26792889', '1383463584', None, None, None, None, None, '3711822') ('4302', None, None, None, None, None, None, None, '3711822') ('4302', '26792889', '1383463579', None, None, None, None, None, '3711822') ('4302', None, None, None, None, None, None, None, '3711822') ('4302', '26792889', '1383463577', None, None, None, None, None, '3711822') ('4302', None, None, None, None, None, None, None, '3711822') ('4302', '26792889', '1383463576', None, None, None, None, None, '3711822') ('4302', None, None, None, None, None, None, None, '3711822') ('4302', '26792889', '1383463573', None, None, None, None, None, '3711822') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '26792889', "{'mal_croppe': 26792926, 'cartonnette': 26792927, 'Teint_Dans_La_Masse': 26792928, 'metal': 26792929, 'autre_refus': 26792930, 'flou': 26792931, 'Carton_brun': 26792932, 'plastique': 26792933, 'papier': 26792934, 'kraft': 26792935, 'Carton_gris': 26792936, 'environnement': 26792937}", None, None, None, None, '3711822'), ('4302', '26792889', '1383463584', None, None, None, None, None, '3711822'), ('4302', '26792889', '1383463579', None, None, None, None, None, '3711822'), ('4302', '26792889', '1383463577', None, None, None, None, None, '3711822'), ('4302', '26792889', '1383463576', None, None, None, None, None, '3711822'), ('4302', '26792889', '1383463573', None, None, None, None, None, '3711822')] time used for this insertion : 0.015915393829345703 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.07851505279541 time spend to save output : 0.016205787658691406 total time spend for step 1 : 2.0947208404541016 step2:final Fri Sep 12 14:33:30 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26792889) 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 26792889 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1383463584,1383463579,1383463577,1383463576,1383463573); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26792889]) Inside saveOutput : final : False verbose : True original output for save of step final : {1383463584: ('0.0',), 1383463579: ('0.0',), 1383463577: ('0.0',), 1383463576: ('0.0',), 1383463573: ('0.0',)} new output for save of step final : {1383463584: ('0.0',), 1383463579: ('0.0',), 1383463577: ('0.0',), 1383463576: ('0.0',), 1383463573: ('0.0',)} [1383463584, 1383463579, 1383463577, 1383463576, 1383463573] map_info['map_portfolio_photo'] : {26792889: [1383463584, 1383463579, 1383463577, 1383463576, 1383463573]} final : False mtd_id 4302 list_pids : [1383463584, 1383463579, 1383463577, 1383463576, 1383463573] Looping around the photos to save general results len do output : 5 /1383463584.Didn't retrieve data . /1383463579.Didn't retrieve data . /1383463577.Didn't retrieve data . /1383463576.Didn't retrieve data . /1383463573.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, '3711822') ('4302', '26792889', '1383463584', None, None, None, None, None, '3711822') ('4302', None, None, None, None, None, None, None, '3711822') ('4302', '26792889', '1383463579', None, None, None, None, None, '3711822') ('4302', None, None, None, None, None, None, None, '3711822') ('4302', '26792889', '1383463577', None, None, None, None, None, '3711822') ('4302', None, None, None, None, None, None, None, '3711822') ('4302', '26792889', '1383463576', None, None, None, None, None, '3711822') ('4302', None, None, None, None, None, None, None, '3711822') ('4302', '26792889', '1383463573', None, None, None, None, None, '3711822') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '26792889', '1383463584', '0.0', None, None, None, None, '3711822'), ('4302', '26792889', '1383463579', '0.0', None, None, None, None, '3711822'), ('4302', '26792889', '1383463577', '0.0', None, None, None, None, '3711822'), ('4302', '26792889', '1383463576', '0.0', None, None, None, None, '3711822'), ('4302', '26792889', '1383463573', '0.0', None, None, None, None, '3711822')] time used for this insertion : 0.015175342559814453 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.0142669677734375 time spend to save output : 0.015530586242675781 total time spend for step 2 : 0.02979755401611328 step3:velours_tree Fri Sep 12 14:33:30 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {26792889: [{'mal_croppe': 26792926, 'cartonnette': 26792927, 'Teint_Dans_La_Masse': 26792928, 'metal': 26792929, 'autre_refus': 26792930, 'flou': 26792931, 'Carton_brun': 26792932, 'plastique': 26792933, 'papier': 26792934, 'kraft': 26792935, 'Carton_gris': 26792936, 'environnement': 26792937}]} input_args_next_step : {26792889: ()} output_args : {26792889: [{'mal_croppe': 26792926, 'cartonnette': 26792927, 'Teint_Dans_La_Masse': 26792928, 'metal': 26792929, 'autre_refus': 26792930, 'flou': 26792931, 'Carton_brun': 26792932, 'plastique': 26792933, 'papier': 26792934, 'kraft': 26792935, 'Carton_gris': 26792936, 'environnement': 26792937}]} args : 26792889 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': 26792926, 'cartonnette': 26792927, 'Teint_Dans_La_Masse': 26792928, 'metal': 26792929, 'autre_refus': 26792930, 'flou': 26792931, 'Carton_brun': 26792932, 'plastique': 26792933, 'papier': 26792934, 'kraft': 26792935, 'Carton_gris': 26792936, 'environnement': 26792937},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26792889) 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([26792889]) 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.3363626003265381 time spend to save output : 5.125999450683594e-05 total time spend for step 3 : 0.3364138603210449 step4:send_mail_cod Fri Sep 12 14:33:30 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1383463584: ('0.0',), 1383463579: ('0.0',), 1383463577: ('0.0',), 1383463576: ('0.0',), 1383463573: ('0.0',)} input_args_next_step : {1383463584: ()} output_args : {1383463584: ('0.0',), 1383463579: ('0.0',), 1383463577: ('0.0',), 1383463576: ('0.0',), 1383463573: ('0.0',)} args : 1383463584 depend.output_id : 0 input_args_next_step : {1383463584: ('0.0',), 1383463579: ()} output_args : {1383463584: ('0.0',), 1383463579: ('0.0',), 1383463577: ('0.0',), 1383463576: ('0.0',), 1383463573: ('0.0',)} args : 1383463579 depend.output_id : 0 input_args_next_step : {1383463584: ('0.0',), 1383463579: ('0.0',), 1383463577: ()} output_args : {1383463584: ('0.0',), 1383463579: ('0.0',), 1383463577: ('0.0',), 1383463576: ('0.0',), 1383463573: ('0.0',)} args : 1383463577 depend.output_id : 0 input_args_next_step : {1383463584: ('0.0',), 1383463579: ('0.0',), 1383463577: ('0.0',), 1383463576: ()} output_args : {1383463584: ('0.0',), 1383463579: ('0.0',), 1383463577: ('0.0',), 1383463576: ('0.0',), 1383463573: ('0.0',)} args : 1383463576 depend.output_id : 0 input_args_next_step : {1383463584: ('0.0',), 1383463579: ('0.0',), 1383463577: ('0.0',), 1383463576: ('0.0',), 1383463573: ()} output_args : {1383463584: ('0.0',), 1383463579: ('0.0',), 1383463577: ('0.0',), 1383463576: ('0.0',), 1383463573: ('0.0',)} args : 1383463573 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 : {26792889: [{'mal_croppe': 26792926, 'cartonnette': 26792927, 'Teint_Dans_La_Masse': 26792928, 'metal': 26792929, 'autre_refus': 26792930, 'flou': 26792931, 'Carton_brun': 26792932, 'plastique': 26792933, 'papier': 26792934, 'kraft': 26792935, 'Carton_gris': 26792936, 'environnement': 26792937}]} input_args_next_step : {1383463584: ('0.0',), 1383463579: ('0.0',), 1383463577: ('0.0',), 1383463576: ('0.0',), 1383463573: ('0.0',), 26792889: ()} output_args : {26792889: [{'mal_croppe': 26792926, 'cartonnette': 26792927, 'Teint_Dans_La_Masse': 26792928, 'metal': 26792929, 'autre_refus': 26792930, 'flou': 26792931, 'Carton_brun': 26792932, 'plastique': 26792933, 'papier': 26792934, 'kraft': 26792935, 'Carton_gris': 26792936, 'environnement': 26792937}]} args : 26792889 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :6, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26792889) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos ph WHERE photo_id IN (1383463584,1383463579,1383463577,1383463576,1383463573) Found this number of photos: 5 ##### Call download_photos : nb_thread : 5 begin to download photo : 1383463573 begin to download photo : 1383463577 begin to download photo : 1383463584 download finish for photo 1383463577 begin to download photo : 1383463579 download finish for photo 1383463573 begin to download photo : 1383463576 download finish for photo 1383463584 download finish for photo 1383463579 download finish for photo 1383463576 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette267929261757680411/ imagette267929271757680411/ imagette267929291757680411/ imagette267929301757680411/ imagette267929311757680411/ imagette267929331757680411/ imagette267929351757680411/ imagette267929281757680411/ imagette267929321757680411/ imagette267929361757680411/ length of list_filenames : 5 ; length of list_pids : 5 ; length of list_args : 5 results_Auto_P26792889_12-09-2025_14_33_31.pdf 26792926 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26792926 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette267929261757680411 26792927 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26792927 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette267929271757680411 26792929 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26792929 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette267929291757680411 26792930 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26792930 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette267929301757680411 26792931 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26792931 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette267929311757680411 26792933 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26792933 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette267929331757680411 26792935 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26792935 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette267929351757680411 26792928 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26792928 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette267929281757680411 26792932 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26792932 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette267929321757680411 26792936 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26792936 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette267929361757680411 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=26792889 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/26792939,26792940,26792941,26792942,26792943,26792944,26792945,26792946,26792947,26792948,26792949,26792950?tags=mal_croppe,cartonnette,Teint_Dans_La_Masse,metal,autre_refus,flou,Carton_brun,plastique,papier,kraft,Carton_gris,environnement your option no_mail is active, we will not send the real mail to your client args[1383463584] : ('0.0',) no score found for photo 1383463584 We are sending mail with results at report@fotonower.com args[1383463579] : ('0.0',) no score found for photo 1383463579 We are sending mail with results at report@fotonower.com args[1383463577] : ('0.0',) no score found for photo 1383463577 We are sending mail with results at report@fotonower.com args[1383463576] : ('0.0',) no score found for photo 1383463576 We are sending mail with results at report@fotonower.com args[1383463573] : ('0.0',) no score found for photo 1383463573 We are sending mail with results at report@fotonower.com refus_total : 0.0 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26792889 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_P26792889_12-09-2025_14_33_31.pdf results_Auto_P26792889_12-09-2025_14_33_31.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26792889_12-09-2025_14_33_31.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','26792889','results_Auto_P26792889_12-09-2025_14_33_31.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26792889_12-09-2025_14_33_31.pdf','pdf','','0.07','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26792889]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1383463584, 1383463579, 1383463577, 1383463576, 1383463573] map_info['map_portfolio_photo'] : {26792889: [1383463584, 1383463579, 1383463577, 1383463576, 1383463573]} final : False mtd_id 4302 list_pids : [1383463584, 1383463579, 1383463577, 1383463576, 1383463573] 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, '3711822') ('4302', '26792889', '1383463584', None, None, None, None, None, '3711822') ('4302', None, None, None, None, None, None, None, '3711822') ('4302', '26792889', '1383463579', None, None, None, None, None, '3711822') ('4302', None, None, None, None, None, None, None, '3711822') ('4302', '26792889', '1383463577', None, None, None, None, None, '3711822') ('4302', None, None, None, None, None, None, None, '3711822') ('4302', '26792889', '1383463576', None, None, None, None, None, '3711822') ('4302', None, None, None, None, None, None, None, '3711822') ('4302', '26792889', '1383463573', None, None, None, None, None, '3711822') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 5 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '26792889', '1383463584', None, None, None, None, None, '3711822'), ('4302', '26792889', '1383463579', None, None, None, None, None, '3711822'), ('4302', '26792889', '1383463577', None, None, None, None, None, '3711822'), ('4302', '26792889', '1383463576', None, None, None, None, None, '3711822'), ('4302', '26792889', '1383463573', None, None, None, None, None, '3711822')] time used for this insertion : 0.014765501022338867 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.1339945793151855 time spend to save output : 0.014943361282348633 total time spend for step 4 : 1.1489379405975342 step5:split_time_score Fri Sep 12 14:33:32 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['26792889'] 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 : [('26792889',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26792889) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1383463584: {'path': 'temp/1757680410_2840623_1383463584_17044de58a5d912ae57be23b1234fb96.jpg', 'extension': 'jpg'}, 1383463577: {'path': 'temp/1757680410_2840623_1383463577_0b3ec7b766c513ce309ae30aec47423b.jpg', 'extension': 'jpg'}, 1383463579: {'path': 'temp/1757680410_2840623_1383463579_7b3e884011032e817fcd45b0ebf0a7ed.jpg', 'extension': 'jpg'}, 1383463573: {'path': 'temp/1757680410_2840623_1383463573_c935c4014cf469c028a4ce0ded93908c.jpg', 'extension': 'jpg'}, 1383463576: {'path': 'temp/1757680410_2840623_1383463576_2662c49556313825595989da0abad8df.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 = 26792889; (('arc_en_ciel_jrm_live',),) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 26792889 group by h (('14', 5),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26792889 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 (26792889) 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 (26792889) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 12092025 26792889 Nombre de photos uploadées : 5 / 23040 (0%) 12092025 26792889 Nombre de photos taguées (types de déchets): 0 / 5 (0%) 12092025 26792889 Nombre de photos taguées (volume) : 0 / 5 (0%) [{'photo_id': 1383463584, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/12/17044de58a5d912ae57be23b1234fb96.jpg', 'username': None, 'uploaded_at': 1757680267, 'text': 'image_12092025_14_30_05_10137.jpg'}, {'photo_id': 1383463579, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/12/7b3e884011032e817fcd45b0ebf0a7ed.jpg', 'username': None, 'uploaded_at': 1757680267, 'text': 'image_12092025_14_30_14_9130.jpg'}, {'photo_id': 1383463577, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/12/0b3ec7b766c513ce309ae30aec47423b.jpg', 'username': None, 'uploaded_at': 1757680267, 'text': 'image_12092025_14_30_24_10134.jpg'}, {'photo_id': 1383463576, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/12/2662c49556313825595989da0abad8df.jpg', 'username': None, 'uploaded_at': 1757680267, 'text': 'image_12092025_14_30_34_10139.jpg'}] 0 [] elapsed_time : load_data_split_time_score 2.86102294921875e-06 elapsed_time : order_list_meta_photo_and_scores 8.106231689453125e-06 ????? elapsed_time : fill_and_build_computed_from_old_data 0.0003802776336669922 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 218, 26792889, '2025-09-12' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 218 and date = '2025-09-12' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2274539,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.21105289459228516 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= 2274539 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2274539, 'dashboard_run_id': 2285121, 'mtr_portfolio_id': 26791565, 'dashboard_result_id': 15080629, '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_P26791565_12-09-2025_13_50_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26791566, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26791567, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26791568, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26791569, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26791570, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26791571, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26791572, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26791573, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26791574, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26791575, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26791576, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26791577, 'pht': 3726}}"}, {'dashboat_entry_day': 2274539, 'dashboard_run_id': 2285121, 'mtr_portfolio_id': 26791753, 'dashboard_result_id': 15080630, '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_P26791753_12-09-2025_14_03_28.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26791756, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26791757, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26791758, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26791759, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26791760, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26791761, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26791762, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26791763, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26791764, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26791765, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26791766, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26791767, 'pht': 3726}}"}, {'dashboat_entry_day': 2274539, 'dashboard_run_id': 2285121, 'mtr_portfolio_id': 26791938, 'dashboard_result_id': 15080631, '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_P26791938_12-09-2025_14_18_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26791949, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26791950, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26791951, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26791952, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26791953, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26791954, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26791955, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26791956, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26791957, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26791958, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26791959, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26791960, 'pht': 3726}}"}, {'dashboat_entry_day': 2274539, 'dashboard_run_id': 2285121, 'mtr_portfolio_id': 26792456, 'dashboard_result_id': 15080632, '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_P26792456_12-09-2025_14_33_02.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26792463, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26792464, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26792465, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26792466, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26792467, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26792468, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26792469, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26792470, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26792471, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26792472, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26792473, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26792474, 'pht': 3726}}"}, {'dashboat_entry_day': 2274539, 'dashboard_run_id': 2285121, 'mtr_portfolio_id': 26792889, 'dashboard_result_id': 15080633, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0}"}] 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 = 26791565 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26791565 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 26791565 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26791565 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26791565 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26791565 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26791565_12-09-2025_13_50_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26791565 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_P26791565_12-09-2025_13_50_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26791566, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26791567, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26791568, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26791569, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26791570, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26791571, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26791572, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26791573, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26791574, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26791575, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26791576, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26791577, 'pht': 3726}}" where mtr_portfolio_id = 26791565 and dashboard_run_id = 2285121 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 = 26791753 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': 3711670, 'mtr_portfolio_id': 26791753, 'created_at': datetime.datetime(2025, 9, 12, 14, 3, 28), 'result': '0.06240005408249316', 'result_long': None, 'result_double': None}] Qualite : 0.06240005408249316 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26791753 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26791753_12-09-2025_14_03_28.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26791753 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_P26791753_12-09-2025_14_03_28.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26791756, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26791757, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26791758, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26791759, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26791760, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26791761, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26791762, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26791763, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26791764, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26791765, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26791766, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26791767, 'pht': 3726}}" where mtr_portfolio_id = 26791753 and dashboard_run_id = 2285121 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`=26791753 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15080630, 0.06240005408249316, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26791753_12-09-2025_14_03_28.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26791756, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26791757, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26791758, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26791759, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26791760, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26791761, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26791762, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26791763, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26791764, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26791765, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26791766, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26791767, '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 = 26791938 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': 3711706, 'mtr_portfolio_id': 26791938, 'created_at': datetime.datetime(2025, 9, 12, 14, 18, 58), 'result': '0.05413085087180704', 'result_long': None, 'result_double': None}] Qualite : 0.05413085087180704 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26791938 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26791938_12-09-2025_14_18_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26791938 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_P26791938_12-09-2025_14_18_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26791949, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26791950, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26791951, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26791952, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26791953, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26791954, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26791955, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26791956, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26791957, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26791958, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26791959, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26791960, 'pht': 3726}}" where mtr_portfolio_id = 26791938 and dashboard_run_id = 2285121 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`=26791938 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15080631, 0.05413085087180704, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26791938_12-09-2025_14_18_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26791949, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26791950, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26791951, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26791952, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26791953, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26791954, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26791955, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26791956, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26791957, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26791958, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26791959, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26791960, '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 = 26792456 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': 3711761, 'mtr_portfolio_id': 26792456, 'created_at': datetime.datetime(2025, 9, 12, 14, 33, 1), 'result': '0.07038156317841392', 'result_long': None, 'result_double': None}] Qualite : 0.07038156317841392 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26792456 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26792456_12-09-2025_14_33_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26792456 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_P26792456_12-09-2025_14_33_02.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26792463, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26792464, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26792465, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26792466, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26792467, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26792468, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26792469, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26792470, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26792471, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26792472, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26792473, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26792474, 'pht': 3726}}" where mtr_portfolio_id = 26792456 and dashboard_run_id = 2285121 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`=26792456 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15080632, 0.07038156317841392, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26792456_12-09-2025_14_33_02.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26792463, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26792464, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26792465, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26792466, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26792467, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26792468, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26792469, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26792470, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26792471, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26792472, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26792473, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26792474, '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 = 26792889 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26792889 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 26792889 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26792889 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26792889 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26792889 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26792889_12-09-2025_14_33_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26792889 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_P26792889_12-09-2025_14_33_31.pdf'}" where mtr_portfolio_id = 26792889 and dashboard_run_id = 2285121 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26791565,26791753,26791938,26792456,26792889) result : ((1383448476,), (1383454854,), (1383456122,), (1383456239,), (1383456266,), (1383456289,), (1383456625,), (1383456630,), (1383456632,), (1383456635,), (1383456639,), (1383456688,), (1383456718,), (1383456723,), (1383456726,), (1383456746,), (1383456782,), (1383456786,), (1383456790,), (1383456794,), (1383456798,), (1383456818,), (1383456822,), (1383456824,), (1383456827,), (1383456886,), (1383456912,), (1383456936,), (1383456961,), (1383456984,), (1383457766,), (1383458576,), (1383458526,), (1383458551,), (1383458797,), (1383458800,), (1383458811,), (1383458837,), (1383459347,), (1383459398,), (1383459442,), (1383459467,), (1383459490,), (1383459895,), (1383459935,), (1383459963,), (1383459992,), (1383460021,), (1383460298,), (1383460327,), (1383460342,), (1383460344,), (1383460351,), (1383460469,), (1383460500,), (1383460526,), (1383460556,), (1383460581,), (1383460681,), (1383460686,), (1383460692,), (1383460697,), (1383460714,), (1383460718,), (1383460746,), (1383460748,), (1383460753,), (1383460759,), (1383460763,), (1383460767,), (1383460771,), (1383460775,), (1383460777,), (1383460781,), (1383460788,), (1383460798,), (1383460802,), (1383460806,), (1383460811,), (1383460815,), (1383460818,), (1383460844,), (1383460848,), (1383460850,), (1383460854,), (1383460862,), (1383460921,), (1383460923,), (1383460925,), (1383460928,), (1383460934,), (1383460939,), (1383460974,), (1383460979,), (1383460981,), (1383460985,), (1383461001,), (1383461017,), (1383461019,), (1383461026,), (1383461030,), (1383461038,), (1383461117,), (1383461121,), (1383461125,), (1383461127,), (1383461130,), (1383461132,), (1383461137,), (1383461140,), (1383461145,), (1383461147,), (1383461163,), (1383461166,), (1383461170,), (1383461174,), (1383461186,), (1383461194,), (1383461229,), (1383461207,), (1383461210,), (1383461216,), (1383461223,), (1383461273,), (1383461277,), (1383461279,), (1383461283,), (1383461289,), (1383461293,), (1383461342,), (1383461345,), (1383461347,), (1383461349,), (1383461355,), (1383461379,), (1383461382,), (1383461384,), (1383461388,), (1383461394,), (1383461405,), (1383461447,), (1383461452,), (1383461453,), (1383461456,), (1383461464,), (1383461515,), (1383461519,), (1383461532,), (1383461540,), (1383461545,), (1383461548,), (1383461609,), (1383461618,), (1383461620,), (1383461625,), (1383461628,), (1383461646,), (1383461649,), (1383461651,), (1383461654,), (1383461660,), (1383461728,), (1383461731,), (1383461735,), (1383461738,), (1383461742,), (1383462841,), (1383462849,), (1383462851,), (1383462854,), (1383462921,), (1383462923,), (1383462926,), (1383462929,), (1383462933,), (1383462936,), (1383463167,), (1383463198,), (1383463225,), (1383463588,), (1383463573,), (1383463576,), (1383463577,), (1383463579,), (1383463584,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'12092025': {'nb_upload': 5, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26792889]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1383463584, 1383463579, 1383463577, 1383463576, 1383463573] map_info['map_portfolio_photo'] : {26792889: [1383463584, 1383463579, 1383463577, 1383463576, 1383463573]} final : True mtd_id 4302 list_pids : [1383463584, 1383463579, 1383463577, 1383463576, 1383463573] Looping around the photos to save general results len do output : 1 /26792889Didn'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, '3711822') ('4302', '26792889', '1383463584', None, None, None, None, None, '3711822') ('4302', None, None, None, None, None, None, None, '3711822') ('4302', '26792889', '1383463579', None, None, None, None, None, '3711822') ('4302', None, None, None, None, None, None, None, '3711822') ('4302', '26792889', '1383463577', None, None, None, None, None, '3711822') ('4302', None, None, None, None, None, None, None, '3711822') ('4302', '26792889', '1383463576', None, None, None, None, None, '3711822') ('4302', None, None, None, None, None, None, None, '3711822') ('4302', '26792889', '1383463573', None, None, None, None, None, '3711822') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '26792889', 'None', None, None, None, None, '3711822'), ('4302', '26792889', '1383463584', None, None, None, None, None, '3711822'), ('4302', '26792889', '1383463579', None, None, None, None, None, '3711822'), ('4302', '26792889', '1383463577', None, None, None, None, None, '3711822'), ('4302', '26792889', '1383463576', None, None, None, None, None, '3711822'), ('4302', '26792889', '1383463573', None, None, None, None, None, '3711822')] time used for this insertion : 0.014455318450927734 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.5330822467803955 time spend to save output : 0.014686822891235352 total time spend for step 5 : 0.5477690696716309 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 (3711822) 2.00user 2.09system 0:07.31elapsed 56%CPU (0avgtext+0avgdata 157436maxresident)k 288inputs+3072outputs (0major+63969minor)pagefaults 0swaps