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 : 2955457 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 (3327875) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3327875) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25224782 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3327875'] with mtr_portfolio_ids : ['25224782'] and first list_photo_ids : [] new path : /proc/2955457/ Name: python3 Umask: 0002 State: R (running) Tgid: 2955457 Ngid: 0 Pid: 2955457 PPid: 2955456 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 2955457 NSpid: 2955457 NSpgid: 2953800 NSsid: 2953800 VmPeak: 1106892 kB VmSize: 1106892 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 97200 kB VmRSS: 97200 kB RssAnon: 59800 kB RssFile: 37400 kB RssShmem: 0 kB VmData: 865644 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 600 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: 54 nonvoluntary_ctxt_switches: 104 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '2955457', 'Ngid': '0', 'Pid': '2955457', 'PPid': '2955456', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '2955457', 'NSpid': '2955457', 'NSpgid': '2953800', 'NSsid': '2953800', 'VmPeak': '1106892 kB', 'VmSize': '1106892 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '97200 kB', 'VmRSS': '97200 kB', 'RssAnon': '59800 kB', 'RssFile': '37400 kB', 'RssShmem': '0 kB', 'VmData': '865644 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '600 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': '54', 'nonvoluntary_ctxt_switches': '104'} ('datou_batch_current', '2955457', '1106892', '0', '1106892', '865644', '97200', b'', 'marlene', '3327875') 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 (25224782) 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 (3327875 ) ) 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 (25224782) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1373348514, 'portfolio_id': 25224782}, {'photo_id': 1373348368, 'portfolio_id': 25224782}, {'photo_id': 1373348366, 'portfolio_id': 25224782}, {'photo_id': 1373348364, 'portfolio_id': 25224782}, {'photo_id': 1373348360, 'portfolio_id': 25224782}, {'photo_id': 1373348357, 'portfolio_id': 25224782}, {'photo_id': 1373348353, 'portfolio_id': 25224782}, {'photo_id': 1373348309, 'portfolio_id': 25224782}, {'photo_id': 1373348304, 'portfolio_id': 25224782}, {'photo_id': 1373348293, 'portfolio_id': 25224782}, {'photo_id': 1373348292, 'portfolio_id': 25224782}, {'photo_id': 1373348290, 'portfolio_id': 25224782}, {'photo_id': 1373348286, 'portfolio_id': 25224782}, {'photo_id': 1373348252, 'portfolio_id': 25224782}] map_portfolio_id_photo_id: {25224782: [1373348514, 1373348368, 1373348366, 1373348364, 1373348360, 1373348357, 1373348353, 1373348309, 1373348304, 1373348293, 1373348292, 1373348290, 1373348286, 1373348252]} ##### 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.014807701110839844 #### 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 Wed Jul 23 14:34:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25224782) 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 : 25224782 get user id for portfolio 25224782 get sub ptf for main ptf 25224782, type 3726 and hashtags ['autre_refus', 'cartonnette', 'Carton_gris', 'Teint_Dans_La_Masse', 'plastique', 'kraft', 'environnement', 'Carton_brun', 'flou', 'mal_croppe', 'papier', 'metal'] 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`=25224782 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','cartonnette','Carton_gris','Teint_Dans_La_Masse','plastique','kraft','environnement','Carton_brun','flou','mal_croppe','papier','metal')) 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`=25224782 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','cartonnette','Carton_gris','Teint_Dans_La_Masse','plastique','kraft','environnement','Carton_brun','flou','mal_croppe','papier','metal')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__23072025_14_30_54_009124_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__23072025_14_30_54_009124_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__23072025_14_30_54_009124_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__23072025_14_30_54_009124_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__23072025_14_30_54_009124_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__23072025_14_30_54_009124_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__23072025_14_30_54_009124_3726_environnement_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__23072025_14_30_54_009124_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__23072025_14_30_54_009124_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__23072025_14_30_54_009124_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__23072025_14_30_54_009124_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__23072025_14_30_54_009124_3726_metal_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)[[25224782, 25224789, 3726, 0.5, 2107752406, 979], [25224782, 25224790, 3726, 0.5, 702398920, 979], [25224782, 25224791, 3726, 0.5, 2107753020, 979], [25224782, 25224792, 3726, 0.5, 2107752385, 979], [25224782, 25224793, 3726, 0.5, 492725882, 979], [25224782, 25224794, 3726, 0.5, 493202403, 979], [25224782, 25224795, 3726, 0.5, 493012381, 979], [25224782, 25224796, 3726, 0.5, 2107753024, 979], [25224782, 25224797, 3726, 0.5, 492777938, 979], [25224782, 25224798, 3726, 0.5, 2107755527, 979], [25224782, 25224799, 3726, 0.5, 492668766, 979], [25224782, 25224800, 3726, 0.5, 492628673, 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`=25224782 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','cartonnette','Carton_gris','Teint_Dans_La_Masse','plastique','kraft','environnement','Carton_brun','flou','mal_croppe','papier','metal')) 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`=25224782 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','cartonnette','Carton_gris','Teint_Dans_La_Masse','plastique','kraft','environnement','Carton_brun','flou','mal_croppe','papier','metal')) AND mptpi.`min_score`=0.5 To do returned map {'autre_refus': {'main_port_id': 25224782, 'sub_port_id': 25224789, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17015033, 'last_updated_at': datetime.datetime(2025, 7, 23, 14, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 14, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 14, 34, 59)}, 'cartonnette': {'main_port_id': 25224782, 'sub_port_id': 25224790, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17015034, 'last_updated_at': datetime.datetime(2025, 7, 23, 14, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 14, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 14, 34, 59)}, 'Carton_gris': {'main_port_id': 25224782, 'sub_port_id': 25224791, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17015035, 'last_updated_at': datetime.datetime(2025, 7, 23, 14, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 14, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 14, 34, 59)}, 'Teint_Dans_La_Masse': {'main_port_id': 25224782, 'sub_port_id': 25224792, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17015036, 'last_updated_at': datetime.datetime(2025, 7, 23, 14, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 14, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 14, 34, 59)}, 'plastique': {'main_port_id': 25224782, 'sub_port_id': 25224793, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17015037, 'last_updated_at': datetime.datetime(2025, 7, 23, 14, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 14, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 14, 34, 59)}, 'kraft': {'main_port_id': 25224782, 'sub_port_id': 25224794, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17015038, 'last_updated_at': datetime.datetime(2025, 7, 23, 14, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 14, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 14, 34, 59)}, 'environnement': {'main_port_id': 25224782, 'sub_port_id': 25224795, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17015039, 'last_updated_at': datetime.datetime(2025, 7, 23, 14, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 14, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 14, 34, 59)}, 'Carton_brun': {'main_port_id': 25224782, 'sub_port_id': 25224796, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17015040, 'last_updated_at': datetime.datetime(2025, 7, 23, 14, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 14, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 14, 34, 59)}, 'flou': {'main_port_id': 25224782, 'sub_port_id': 25224797, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17015041, 'last_updated_at': datetime.datetime(2025, 7, 23, 14, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 14, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 14, 34, 59)}, 'mal_croppe': {'main_port_id': 25224782, 'sub_port_id': 25224798, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17015042, 'last_updated_at': datetime.datetime(2025, 7, 23, 14, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 14, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 14, 34, 59)}, 'papier': {'main_port_id': 25224782, 'sub_port_id': 25224799, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17015043, 'last_updated_at': datetime.datetime(2025, 7, 23, 14, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 14, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 14, 34, 59)}, 'metal': {'main_port_id': 25224782, 'sub_port_id': 25224800, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17015044, 'last_updated_at': datetime.datetime(2025, 7, 23, 14, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 14, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 14, 34, 59)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25224789 , 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=25224782 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 (25224789) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25224782) result : ((1373348252,), (1373348286,), (1373348290,), (1373348292,), (1373348293,), (1373348304,), (1373348309,), (1373348353,), (1373348357,), (1373348360,), (1373348364,), (1373348366,), (1373348368,), (1373348514,)) 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 25224790 , 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=25224782 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 (25224790) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25224782) result : ((1373348252,), (1373348286,), (1373348290,), (1373348292,), (1373348293,), (1373348304,), (1373348309,), (1373348353,), (1373348357,), (1373348360,), (1373348364,), (1373348366,), (1373348368,), (1373348514,)) 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 25224791 , 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=25224782 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 (25224791) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25224782) result : ((1373348252,), (1373348286,), (1373348290,), (1373348292,), (1373348293,), (1373348304,), (1373348309,), (1373348353,), (1373348357,), (1373348360,), (1373348364,), (1373348366,), (1373348368,), (1373348514,)) 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 25224792 , 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=25224782 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 (25224792) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25224782) result : ((1373348252,), (1373348286,), (1373348290,), (1373348292,), (1373348293,), (1373348304,), (1373348309,), (1373348353,), (1373348357,), (1373348360,), (1373348364,), (1373348366,), (1373348368,), (1373348514,)) 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 25224793 , 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=25224782 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 (25224793) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25224782) result : ((1373348252,), (1373348286,), (1373348290,), (1373348292,), (1373348293,), (1373348304,), (1373348309,), (1373348353,), (1373348357,), (1373348360,), (1373348364,), (1373348366,), (1373348368,), (1373348514,)) 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 25224794 , 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=25224782 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 (25224794) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25224782) result : ((1373348252,), (1373348286,), (1373348290,), (1373348292,), (1373348293,), (1373348304,), (1373348309,), (1373348353,), (1373348357,), (1373348360,), (1373348364,), (1373348366,), (1373348368,), (1373348514,)) 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 25224795 , 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=25224782 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 (25224795) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25224782) result : ((1373348252,), (1373348286,), (1373348290,), (1373348292,), (1373348293,), (1373348304,), (1373348309,), (1373348353,), (1373348357,), (1373348360,), (1373348364,), (1373348366,), (1373348368,), (1373348514,)) 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 25224796 , 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=25224782 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 (25224796) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25224782) result : ((1373348252,), (1373348286,), (1373348290,), (1373348292,), (1373348293,), (1373348304,), (1373348309,), (1373348353,), (1373348357,), (1373348360,), (1373348364,), (1373348366,), (1373348368,), (1373348514,)) 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 25224797 , 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=25224782 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 (25224797) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25224782) result : ((1373348252,), (1373348286,), (1373348290,), (1373348292,), (1373348293,), (1373348304,), (1373348309,), (1373348353,), (1373348357,), (1373348360,), (1373348364,), (1373348366,), (1373348368,), (1373348514,)) 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 25224798 , 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=25224782 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 (25224798) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25224782) result : ((1373348252,), (1373348286,), (1373348290,), (1373348292,), (1373348293,), (1373348304,), (1373348309,), (1373348353,), (1373348357,), (1373348360,), (1373348364,), (1373348366,), (1373348368,), (1373348514,)) 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 25224799 , 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=25224782 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 (25224799) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25224782) result : ((1373348252,), (1373348286,), (1373348290,), (1373348292,), (1373348293,), (1373348304,), (1373348309,), (1373348353,), (1373348357,), (1373348360,), (1373348364,), (1373348366,), (1373348368,), (1373348514,)) 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 25224800 , 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=25224782 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 (25224800) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25224782) result : ((1373348252,), (1373348286,), (1373348290,), (1373348292,), (1373348293,), (1373348304,), (1373348309,), (1373348353,), (1373348357,), (1373348360,), (1373348364,), (1373348366,), (1373348368,), (1373348514,)) 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`=25224782 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','cartonnette','Carton_gris','Teint_Dans_La_Masse','plastique','kraft','environnement','Carton_brun','flou','mal_croppe','papier','metal')) 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`=25224782 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','cartonnette','Carton_gris','Teint_Dans_La_Masse','plastique','kraft','environnement','Carton_brun','flou','mal_croppe','papier','metal')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__23072025_14_30_54_009124_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__23072025_14_30_54_009124_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__23072025_14_30_54_009124_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__23072025_14_30_54_009124_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__23072025_14_30_54_009124_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__23072025_14_30_54_009124_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__23072025_14_30_54_009124_4417_environnement_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__23072025_14_30_54_009124_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__23072025_14_30_54_009124_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__23072025_14_30_54_009124_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__23072025_14_30_54_009124_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__23072025_14_30_54_009124_4417_metal_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)[[25224782, 25224801, 4417, 0.5, 2107752406, 979], [25224782, 25224802, 4417, 0.5, 702398920, 979], [25224782, 25224803, 4417, 0.5, 2107753020, 979], [25224782, 25224804, 4417, 0.5, 2107752385, 979], [25224782, 25224805, 4417, 0.5, 492725882, 979], [25224782, 25224806, 4417, 0.5, 493202403, 979], [25224782, 25224807, 4417, 0.5, 493012381, 979], [25224782, 25224808, 4417, 0.5, 2107753024, 979], [25224782, 25224809, 4417, 0.5, 492777938, 979], [25224782, 25224810, 4417, 0.5, 2107755527, 979], [25224782, 25224811, 4417, 0.5, 492668766, 979], [25224782, 25224812, 4417, 0.5, 492628673, 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`=25224782 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','cartonnette','Carton_gris','Teint_Dans_La_Masse','plastique','kraft','environnement','Carton_brun','flou','mal_croppe','papier','metal')) 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`=25224782 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','cartonnette','Carton_gris','Teint_Dans_La_Masse','plastique','kraft','environnement','Carton_brun','flou','mal_croppe','papier','metal')) AND mptpi.`min_score`=0.5 To do returned map {'autre_refus': {'main_port_id': 25224782, 'sub_port_id': 25224801, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17015045, 'last_updated_at': datetime.datetime(2025, 7, 23, 14, 35), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 14, 35), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 14, 35)}, 'cartonnette': {'main_port_id': 25224782, 'sub_port_id': 25224802, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17015046, 'last_updated_at': datetime.datetime(2025, 7, 23, 14, 35), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 14, 35), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 14, 35)}, 'Carton_gris': {'main_port_id': 25224782, 'sub_port_id': 25224803, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17015047, 'last_updated_at': datetime.datetime(2025, 7, 23, 14, 35), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 14, 35), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 14, 35)}, 'Teint_Dans_La_Masse': {'main_port_id': 25224782, 'sub_port_id': 25224804, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17015048, 'last_updated_at': datetime.datetime(2025, 7, 23, 14, 35), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 14, 35), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 14, 35)}, 'plastique': {'main_port_id': 25224782, 'sub_port_id': 25224805, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17015049, 'last_updated_at': datetime.datetime(2025, 7, 23, 14, 35), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 14, 35), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 14, 35)}, 'kraft': {'main_port_id': 25224782, 'sub_port_id': 25224806, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17015050, 'last_updated_at': datetime.datetime(2025, 7, 23, 14, 35), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 14, 35), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 14, 35)}, 'environnement': {'main_port_id': 25224782, 'sub_port_id': 25224807, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17015051, 'last_updated_at': datetime.datetime(2025, 7, 23, 14, 35), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 14, 35), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 14, 35)}, 'Carton_brun': {'main_port_id': 25224782, 'sub_port_id': 25224808, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17015052, 'last_updated_at': datetime.datetime(2025, 7, 23, 14, 35), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 14, 35), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 14, 35)}, 'flou': {'main_port_id': 25224782, 'sub_port_id': 25224809, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17015053, 'last_updated_at': datetime.datetime(2025, 7, 23, 14, 35), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 14, 35), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 14, 35)}, 'mal_croppe': {'main_port_id': 25224782, 'sub_port_id': 25224810, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17015054, 'last_updated_at': datetime.datetime(2025, 7, 23, 14, 35), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 14, 35), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 14, 35)}, 'papier': {'main_port_id': 25224782, 'sub_port_id': 25224811, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17015055, 'last_updated_at': datetime.datetime(2025, 7, 23, 14, 35), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 14, 35), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 14, 35)}, 'metal': {'main_port_id': 25224782, 'sub_port_id': 25224812, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17015056, 'last_updated_at': datetime.datetime(2025, 7, 23, 14, 35), 'last_updated_at_desc': datetime.datetime(2025, 7, 23, 14, 35), 'last_updated_at_asc': datetime.datetime(2025, 7, 23, 14, 35)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25224801,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25224789 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25224802,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25224790 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25224803,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25224791 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25224804,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25224792 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25224805,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25224793 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25224806,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25224794 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25224807,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25224795 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25224808,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25224796 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25224809,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25224797 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25224810,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25224798 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25224811,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25224799 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25224812,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25224800 lien utilise dans velours : https://www.fotonower.com/velours/25224801,25224802,25224803,25224804,25224805,25224806,25224807,25224808,25224809,25224810,25224811,25224812?tags=autre_refus,cartonnette,Carton_gris,Teint_Dans_La_Masse,plastique,kraft,environnement,Carton_brun,flou,mal_croppe,papier,metal After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25224782]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1373348514, 1373348368, 1373348366, 1373348364, 1373348360, 1373348357, 1373348353, 1373348309, 1373348304, 1373348293, 1373348292, 1373348290, 1373348286, 1373348252] map_info['map_portfolio_photo'] : {25224782: [1373348514, 1373348368, 1373348366, 1373348364, 1373348360, 1373348357, 1373348353, 1373348309, 1373348304, 1373348293, 1373348292, 1373348290, 1373348286, 1373348252]} final : False mtd_id 4302 list_pids : [1373348514, 1373348368, 1373348366, 1373348364, 1373348360, 1373348357, 1373348353, 1373348309, 1373348304, 1373348293, 1373348292, 1373348290, 1373348286, 1373348252] Looping around the photos to save general results len do output : 1 /25224782. 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, '3327875') ('4302', '25224782', '1373348514', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348368', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348366', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348364', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348360', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348357', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348353', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348309', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348304', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348293', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348292', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348290', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348286', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348252', None, None, None, None, None, '3327875') 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', None, '25224782', "{'autre_refus': 25224789, 'cartonnette': 25224790, 'Carton_gris': 25224791, 'Teint_Dans_La_Masse': 25224792, 'plastique': 25224793, 'kraft': 25224794, 'environnement': 25224795, 'Carton_brun': 25224796, 'flou': 25224797, 'mal_croppe': 25224798, 'papier': 25224799, 'metal': 25224800}", None, None, None, None, '3327875'), ('4302', '25224782', '1373348514', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348368', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348366', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348364', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348360', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348357', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348353', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348309', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348304', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348293', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348292', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348290', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348286', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348252', None, None, None, None, None, '3327875')] time used for this insertion : 0.016997814178466797 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.1238083839416504 time spend to save output : 0.0174105167388916 total time spend for step 1 : 2.141218900680542 step2:final Wed Jul 23 14:35:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed 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 (25224782) 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 25224782 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1373348252,1373348309,1373348304,1373348293,1373348292,1373348290,1373348286,1373348368,1373348366,1373348364,1373348360,1373348357,1373348353,1373348514); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25224782]) Inside saveOutput : final : False verbose : True original output for save of step final : {1373348514: ('0.0',), 1373348368: ('0.0',), 1373348366: ('0.0',), 1373348364: ('0.0',), 1373348360: ('0.0',), 1373348357: ('0.0',), 1373348353: ('0.0',), 1373348309: ('0.0',), 1373348304: ('0.0',), 1373348293: ('0.0',), 1373348292: ('0.0',), 1373348290: ('0.0',), 1373348286: ('0.0',), 1373348252: ('0.0',)} new output for save of step final : {1373348514: ('0.0',), 1373348368: ('0.0',), 1373348366: ('0.0',), 1373348364: ('0.0',), 1373348360: ('0.0',), 1373348357: ('0.0',), 1373348353: ('0.0',), 1373348309: ('0.0',), 1373348304: ('0.0',), 1373348293: ('0.0',), 1373348292: ('0.0',), 1373348290: ('0.0',), 1373348286: ('0.0',), 1373348252: ('0.0',)} [1373348514, 1373348368, 1373348366, 1373348364, 1373348360, 1373348357, 1373348353, 1373348309, 1373348304, 1373348293, 1373348292, 1373348290, 1373348286, 1373348252] map_info['map_portfolio_photo'] : {25224782: [1373348514, 1373348368, 1373348366, 1373348364, 1373348360, 1373348357, 1373348353, 1373348309, 1373348304, 1373348293, 1373348292, 1373348290, 1373348286, 1373348252]} final : False mtd_id 4302 list_pids : [1373348514, 1373348368, 1373348366, 1373348364, 1373348360, 1373348357, 1373348353, 1373348309, 1373348304, 1373348293, 1373348292, 1373348290, 1373348286, 1373348252] Looping around the photos to save general results len do output : 14 /1373348514.Didn't retrieve data . /1373348368.Didn't retrieve data . /1373348366.Didn't retrieve data . /1373348364.Didn't retrieve data . /1373348360.Didn't retrieve data . /1373348357.Didn't retrieve data . /1373348353.Didn't retrieve data . /1373348309.Didn't retrieve data . /1373348304.Didn't retrieve data . /1373348293.Didn't retrieve data . /1373348292.Didn't retrieve data . /1373348290.Didn't retrieve data . /1373348286.Didn't retrieve data . /1373348252.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, '3327875') ('4302', '25224782', '1373348514', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348368', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348366', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348364', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348360', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348357', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348353', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348309', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348304', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348293', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348292', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348290', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348286', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348252', None, None, None, None, None, '3327875') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 42 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', '25224782', '1373348514', '0.0', None, None, None, None, '3327875'), ('4302', '25224782', '1373348368', '0.0', None, None, None, None, '3327875'), ('4302', '25224782', '1373348366', '0.0', None, None, None, None, '3327875'), ('4302', '25224782', '1373348364', '0.0', None, None, None, None, '3327875'), ('4302', '25224782', '1373348360', '0.0', None, None, None, None, '3327875'), ('4302', '25224782', '1373348357', '0.0', None, None, None, None, '3327875'), ('4302', '25224782', '1373348353', '0.0', None, None, None, None, '3327875'), ('4302', '25224782', '1373348309', '0.0', None, None, None, None, '3327875'), ('4302', '25224782', '1373348304', '0.0', None, None, None, None, '3327875'), ('4302', '25224782', '1373348293', '0.0', None, None, None, None, '3327875'), ('4302', '25224782', '1373348292', '0.0', None, None, None, None, '3327875'), ('4302', '25224782', '1373348290', '0.0', None, None, None, None, '3327875'), ('4302', '25224782', '1373348286', '0.0', None, None, None, None, '3327875'), ('4302', '25224782', '1373348252', '0.0', None, None, None, None, '3327875')] time used for this insertion : 0.016164541244506836 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.015013456344604492 time spend to save output : 0.016965150833129883 total time spend for step 2 : 0.031978607177734375 step3:velours_tree Wed Jul 23 14:35:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {25224782: [{'autre_refus': 25224789, 'cartonnette': 25224790, 'Carton_gris': 25224791, 'Teint_Dans_La_Masse': 25224792, 'plastique': 25224793, 'kraft': 25224794, 'environnement': 25224795, 'Carton_brun': 25224796, 'flou': 25224797, 'mal_croppe': 25224798, 'papier': 25224799, 'metal': 25224800}]} input_args_next_step : {25224782: ()} output_args : {25224782: [{'autre_refus': 25224789, 'cartonnette': 25224790, 'Carton_gris': 25224791, 'Teint_Dans_La_Masse': 25224792, 'plastique': 25224793, 'kraft': 25224794, 'environnement': 25224795, 'Carton_brun': 25224796, 'flou': 25224797, 'mal_croppe': 25224798, 'papier': 25224799, 'metal': 25224800}]} args : 25224782 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 : ({'autre_refus': 25224789, 'cartonnette': 25224790, 'Carton_gris': 25224791, 'Teint_Dans_La_Masse': 25224792, 'plastique': 25224793, 'kraft': 25224794, 'environnement': 25224795, 'Carton_brun': 25224796, 'flou': 25224797, 'mal_croppe': 25224798, 'papier': 25224799, 'metal': 25224800},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25224782) 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([25224782]) 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.36226725578308105 time spend to save output : 0.00011467933654785156 total time spend for step 3 : 0.3623819351196289 step4:send_mail_cod Wed Jul 23 14:35:01 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 : {1373348514: ('0.0',), 1373348368: ('0.0',), 1373348366: ('0.0',), 1373348364: ('0.0',), 1373348360: ('0.0',), 1373348357: ('0.0',), 1373348353: ('0.0',), 1373348309: ('0.0',), 1373348304: ('0.0',), 1373348293: ('0.0',), 1373348292: ('0.0',), 1373348290: ('0.0',), 1373348286: ('0.0',), 1373348252: ('0.0',)} input_args_next_step : {1373348514: ()} output_args : {1373348514: ('0.0',), 1373348368: ('0.0',), 1373348366: ('0.0',), 1373348364: ('0.0',), 1373348360: ('0.0',), 1373348357: ('0.0',), 1373348353: ('0.0',), 1373348309: ('0.0',), 1373348304: ('0.0',), 1373348293: ('0.0',), 1373348292: ('0.0',), 1373348290: ('0.0',), 1373348286: ('0.0',), 1373348252: ('0.0',)} args : 1373348514 depend.output_id : 0 input_args_next_step : {1373348514: ('0.0',), 1373348368: ()} output_args : {1373348514: ('0.0',), 1373348368: ('0.0',), 1373348366: ('0.0',), 1373348364: ('0.0',), 1373348360: ('0.0',), 1373348357: ('0.0',), 1373348353: ('0.0',), 1373348309: ('0.0',), 1373348304: ('0.0',), 1373348293: ('0.0',), 1373348292: ('0.0',), 1373348290: ('0.0',), 1373348286: ('0.0',), 1373348252: ('0.0',)} args : 1373348368 depend.output_id : 0 input_args_next_step : {1373348514: ('0.0',), 1373348368: ('0.0',), 1373348366: ()} output_args : {1373348514: ('0.0',), 1373348368: ('0.0',), 1373348366: ('0.0',), 1373348364: ('0.0',), 1373348360: ('0.0',), 1373348357: ('0.0',), 1373348353: ('0.0',), 1373348309: ('0.0',), 1373348304: ('0.0',), 1373348293: ('0.0',), 1373348292: ('0.0',), 1373348290: ('0.0',), 1373348286: ('0.0',), 1373348252: ('0.0',)} args : 1373348366 depend.output_id : 0 input_args_next_step : {1373348514: ('0.0',), 1373348368: ('0.0',), 1373348366: ('0.0',), 1373348364: ()} output_args : {1373348514: ('0.0',), 1373348368: ('0.0',), 1373348366: ('0.0',), 1373348364: ('0.0',), 1373348360: ('0.0',), 1373348357: ('0.0',), 1373348353: ('0.0',), 1373348309: ('0.0',), 1373348304: ('0.0',), 1373348293: ('0.0',), 1373348292: ('0.0',), 1373348290: ('0.0',), 1373348286: ('0.0',), 1373348252: ('0.0',)} args : 1373348364 depend.output_id : 0 input_args_next_step : {1373348514: ('0.0',), 1373348368: ('0.0',), 1373348366: ('0.0',), 1373348364: ('0.0',), 1373348360: ()} output_args : {1373348514: ('0.0',), 1373348368: ('0.0',), 1373348366: ('0.0',), 1373348364: ('0.0',), 1373348360: ('0.0',), 1373348357: ('0.0',), 1373348353: ('0.0',), 1373348309: ('0.0',), 1373348304: ('0.0',), 1373348293: ('0.0',), 1373348292: ('0.0',), 1373348290: ('0.0',), 1373348286: ('0.0',), 1373348252: ('0.0',)} args : 1373348360 depend.output_id : 0 input_args_next_step : {1373348514: ('0.0',), 1373348368: ('0.0',), 1373348366: ('0.0',), 1373348364: ('0.0',), 1373348360: ('0.0',), 1373348357: ()} output_args : {1373348514: ('0.0',), 1373348368: ('0.0',), 1373348366: ('0.0',), 1373348364: ('0.0',), 1373348360: ('0.0',), 1373348357: ('0.0',), 1373348353: ('0.0',), 1373348309: ('0.0',), 1373348304: ('0.0',), 1373348293: ('0.0',), 1373348292: ('0.0',), 1373348290: ('0.0',), 1373348286: ('0.0',), 1373348252: ('0.0',)} args : 1373348357 depend.output_id : 0 input_args_next_step : {1373348514: ('0.0',), 1373348368: ('0.0',), 1373348366: ('0.0',), 1373348364: ('0.0',), 1373348360: ('0.0',), 1373348357: ('0.0',), 1373348353: ()} output_args : {1373348514: ('0.0',), 1373348368: ('0.0',), 1373348366: ('0.0',), 1373348364: ('0.0',), 1373348360: ('0.0',), 1373348357: ('0.0',), 1373348353: ('0.0',), 1373348309: ('0.0',), 1373348304: ('0.0',), 1373348293: ('0.0',), 1373348292: ('0.0',), 1373348290: ('0.0',), 1373348286: ('0.0',), 1373348252: ('0.0',)} args : 1373348353 depend.output_id : 0 input_args_next_step : {1373348514: ('0.0',), 1373348368: ('0.0',), 1373348366: ('0.0',), 1373348364: ('0.0',), 1373348360: ('0.0',), 1373348357: ('0.0',), 1373348353: ('0.0',), 1373348309: ()} output_args : {1373348514: ('0.0',), 1373348368: ('0.0',), 1373348366: ('0.0',), 1373348364: ('0.0',), 1373348360: ('0.0',), 1373348357: ('0.0',), 1373348353: ('0.0',), 1373348309: ('0.0',), 1373348304: ('0.0',), 1373348293: ('0.0',), 1373348292: ('0.0',), 1373348290: ('0.0',), 1373348286: ('0.0',), 1373348252: ('0.0',)} args : 1373348309 depend.output_id : 0 input_args_next_step : {1373348514: ('0.0',), 1373348368: ('0.0',), 1373348366: ('0.0',), 1373348364: ('0.0',), 1373348360: ('0.0',), 1373348357: ('0.0',), 1373348353: ('0.0',), 1373348309: ('0.0',), 1373348304: ()} output_args : {1373348514: ('0.0',), 1373348368: ('0.0',), 1373348366: ('0.0',), 1373348364: ('0.0',), 1373348360: ('0.0',), 1373348357: ('0.0',), 1373348353: ('0.0',), 1373348309: ('0.0',), 1373348304: ('0.0',), 1373348293: ('0.0',), 1373348292: ('0.0',), 1373348290: ('0.0',), 1373348286: ('0.0',), 1373348252: ('0.0',)} args : 1373348304 depend.output_id : 0 input_args_next_step : {1373348514: ('0.0',), 1373348368: ('0.0',), 1373348366: ('0.0',), 1373348364: ('0.0',), 1373348360: ('0.0',), 1373348357: ('0.0',), 1373348353: ('0.0',), 1373348309: ('0.0',), 1373348304: ('0.0',), 1373348293: ()} output_args : {1373348514: ('0.0',), 1373348368: ('0.0',), 1373348366: ('0.0',), 1373348364: ('0.0',), 1373348360: ('0.0',), 1373348357: ('0.0',), 1373348353: ('0.0',), 1373348309: ('0.0',), 1373348304: ('0.0',), 1373348293: ('0.0',), 1373348292: ('0.0',), 1373348290: ('0.0',), 1373348286: ('0.0',), 1373348252: ('0.0',)} args : 1373348293 depend.output_id : 0 input_args_next_step : {1373348514: ('0.0',), 1373348368: ('0.0',), 1373348366: ('0.0',), 1373348364: ('0.0',), 1373348360: ('0.0',), 1373348357: ('0.0',), 1373348353: ('0.0',), 1373348309: ('0.0',), 1373348304: ('0.0',), 1373348293: ('0.0',), 1373348292: ()} output_args : {1373348514: ('0.0',), 1373348368: ('0.0',), 1373348366: ('0.0',), 1373348364: ('0.0',), 1373348360: ('0.0',), 1373348357: ('0.0',), 1373348353: ('0.0',), 1373348309: ('0.0',), 1373348304: ('0.0',), 1373348293: ('0.0',), 1373348292: ('0.0',), 1373348290: ('0.0',), 1373348286: ('0.0',), 1373348252: ('0.0',)} args : 1373348292 depend.output_id : 0 input_args_next_step : {1373348514: ('0.0',), 1373348368: ('0.0',), 1373348366: ('0.0',), 1373348364: ('0.0',), 1373348360: ('0.0',), 1373348357: ('0.0',), 1373348353: ('0.0',), 1373348309: ('0.0',), 1373348304: ('0.0',), 1373348293: ('0.0',), 1373348292: ('0.0',), 1373348290: ()} output_args : {1373348514: ('0.0',), 1373348368: ('0.0',), 1373348366: ('0.0',), 1373348364: ('0.0',), 1373348360: ('0.0',), 1373348357: ('0.0',), 1373348353: ('0.0',), 1373348309: ('0.0',), 1373348304: ('0.0',), 1373348293: ('0.0',), 1373348292: ('0.0',), 1373348290: ('0.0',), 1373348286: ('0.0',), 1373348252: ('0.0',)} args : 1373348290 depend.output_id : 0 input_args_next_step : {1373348514: ('0.0',), 1373348368: ('0.0',), 1373348366: ('0.0',), 1373348364: ('0.0',), 1373348360: ('0.0',), 1373348357: ('0.0',), 1373348353: ('0.0',), 1373348309: ('0.0',), 1373348304: ('0.0',), 1373348293: ('0.0',), 1373348292: ('0.0',), 1373348290: ('0.0',), 1373348286: ()} output_args : {1373348514: ('0.0',), 1373348368: ('0.0',), 1373348366: ('0.0',), 1373348364: ('0.0',), 1373348360: ('0.0',), 1373348357: ('0.0',), 1373348353: ('0.0',), 1373348309: ('0.0',), 1373348304: ('0.0',), 1373348293: ('0.0',), 1373348292: ('0.0',), 1373348290: ('0.0',), 1373348286: ('0.0',), 1373348252: ('0.0',)} args : 1373348286 depend.output_id : 0 input_args_next_step : {1373348514: ('0.0',), 1373348368: ('0.0',), 1373348366: ('0.0',), 1373348364: ('0.0',), 1373348360: ('0.0',), 1373348357: ('0.0',), 1373348353: ('0.0',), 1373348309: ('0.0',), 1373348304: ('0.0',), 1373348293: ('0.0',), 1373348292: ('0.0',), 1373348290: ('0.0',), 1373348286: ('0.0',), 1373348252: ()} output_args : {1373348514: ('0.0',), 1373348368: ('0.0',), 1373348366: ('0.0',), 1373348364: ('0.0',), 1373348360: ('0.0',), 1373348357: ('0.0',), 1373348353: ('0.0',), 1373348309: ('0.0',), 1373348304: ('0.0',), 1373348293: ('0.0',), 1373348292: ('0.0',), 1373348290: ('0.0',), 1373348286: ('0.0',), 1373348252: ('0.0',)} args : 1373348252 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 : {25224782: [{'autre_refus': 25224789, 'cartonnette': 25224790, 'Carton_gris': 25224791, 'Teint_Dans_La_Masse': 25224792, 'plastique': 25224793, 'kraft': 25224794, 'environnement': 25224795, 'Carton_brun': 25224796, 'flou': 25224797, 'mal_croppe': 25224798, 'papier': 25224799, 'metal': 25224800}]} input_args_next_step : {1373348514: ('0.0',), 1373348368: ('0.0',), 1373348366: ('0.0',), 1373348364: ('0.0',), 1373348360: ('0.0',), 1373348357: ('0.0',), 1373348353: ('0.0',), 1373348309: ('0.0',), 1373348304: ('0.0',), 1373348293: ('0.0',), 1373348292: ('0.0',), 1373348290: ('0.0',), 1373348286: ('0.0',), 1373348252: ('0.0',), 25224782: ()} output_args : {25224782: [{'autre_refus': 25224789, 'cartonnette': 25224790, 'Carton_gris': 25224791, 'Teint_Dans_La_Masse': 25224792, 'plastique': 25224793, 'kraft': 25224794, 'environnement': 25224795, 'Carton_brun': 25224796, 'flou': 25224797, 'mal_croppe': 25224798, 'papier': 25224799, 'metal': 25224800}]} args : 25224782 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 :15, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25224782) 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 (1373348514,1373348368,1373348366,1373348364,1373348360,1373348357,1373348353,1373348309,1373348304,1373348293,1373348292,1373348290,1373348286,1373348252) Found this number of photos: 14 ##### Call download_photos : nb_thread : 5 begin to download photo : 1373348252 begin to download photo : 1373348292 begin to download photo : 1373348309 begin to download photo : 1373348360 begin to download photo : 1373348368 download finish for photo 1373348252 begin to download photo : 1373348286 download finish for photo 1373348360 begin to download photo : 1373348364 download finish for photo 1373348292 begin to download photo : 1373348293 download finish for photo 1373348309 begin to download photo : 1373348353 download finish for photo 1373348293 begin to download photo : 1373348304 download finish for photo 1373348368 begin to download photo : 1373348514 download finish for photo 1373348364 begin to download photo : 1373348366 download finish for photo 1373348286 begin to download photo : 1373348290 download finish for photo 1373348353 begin to download photo : 1373348357 download finish for photo 1373348514 download finish for photo 1373348304 download finish for photo 1373348290 download finish for photo 1373348366 download finish for photo 1373348357 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette252247891753274101/ imagette252247901753274101/ imagette252247931753274101/ imagette252247941753274101/ imagette252247971753274101/ imagette252247981753274101/ imagette252248001753274101/ imagette252247911753274101/ imagette252247921753274101/ imagette252247961753274101/ length of list_filenames : 14 ; length of list_pids : 14 ; length of list_args : 14 results_Auto_P25224782_23-07-2025_14_35_01.pdf 25224789 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=25224789 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette252247891753274101 25224790 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=25224790 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette252247901753274101 25224793 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=25224793 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette252247931753274101 25224794 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=25224794 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette252247941753274101 25224797 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=25224797 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette252247971753274101 25224798 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=25224798 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette252247981753274101 25224800 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=25224800 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette252248001753274101 25224791 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=25224791 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette252247911753274101 25224792 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=25224792 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette252247921753274101 25224796 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=25224796 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette252247961753274101 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=25224782 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/25224801,25224802,25224803,25224804,25224805,25224806,25224807,25224808,25224809,25224810,25224811,25224812?tags=autre_refus,cartonnette,Carton_gris,Teint_Dans_La_Masse,plastique,kraft,environnement,Carton_brun,flou,mal_croppe,papier,metal your option no_mail is active, we will not send the real mail to your client args[1373348514] : ('0.0',) no score found for photo 1373348514 We are sending mail with results at report@fotonower.com args[1373348368] : ('0.0',) no score found for photo 1373348368 We are sending mail with results at report@fotonower.com args[1373348366] : ('0.0',) no score found for photo 1373348366 We are sending mail with results at report@fotonower.com args[1373348364] : ('0.0',) no score found for photo 1373348364 We are sending mail with results at report@fotonower.com args[1373348360] : ('0.0',) no score found for photo 1373348360 We are sending mail with results at report@fotonower.com args[1373348357] : ('0.0',) no score found for photo 1373348357 We are sending mail with results at report@fotonower.com args[1373348353] : ('0.0',) no score found for photo 1373348353 We are sending mail with results at report@fotonower.com args[1373348309] : ('0.0',) no score found for photo 1373348309 We are sending mail with results at report@fotonower.com args[1373348304] : ('0.0',) no score found for photo 1373348304 We are sending mail with results at report@fotonower.com args[1373348293] : ('0.0',) no score found for photo 1373348293 We are sending mail with results at report@fotonower.com args[1373348292] : ('0.0',) no score found for photo 1373348292 We are sending mail with results at report@fotonower.com args[1373348290] : ('0.0',) no score found for photo 1373348290 We are sending mail with results at report@fotonower.com args[1373348286] : ('0.0',) no score found for photo 1373348286 We are sending mail with results at report@fotonower.com args[1373348252] : ('0.0',) no score found for photo 1373348252 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=25224782 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_P25224782_23-07-2025_14_35_01.pdf results_Auto_P25224782_23-07-2025_14_35_01.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25224782_23-07-2025_14_35_01.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','25224782','results_Auto_P25224782_23-07-2025_14_35_01.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25224782_23-07-2025_14_35_01.pdf','pdf','','0.12','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25224782]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1373348514, 1373348368, 1373348366, 1373348364, 1373348360, 1373348357, 1373348353, 1373348309, 1373348304, 1373348293, 1373348292, 1373348290, 1373348286, 1373348252] map_info['map_portfolio_photo'] : {25224782: [1373348514, 1373348368, 1373348366, 1373348364, 1373348360, 1373348357, 1373348353, 1373348309, 1373348304, 1373348293, 1373348292, 1373348290, 1373348286, 1373348252]} final : False mtd_id 4302 list_pids : [1373348514, 1373348368, 1373348366, 1373348364, 1373348360, 1373348357, 1373348353, 1373348309, 1373348304, 1373348293, 1373348292, 1373348290, 1373348286, 1373348252] 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, '3327875') ('4302', '25224782', '1373348514', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348368', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348366', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348364', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348360', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348357', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348353', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348309', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348304', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348293', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348292', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348290', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348286', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348252', None, None, None, None, None, '3327875') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 14 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', '25224782', '1373348514', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348368', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348366', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348364', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348360', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348357', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348353', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348309', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348304', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348293', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348292', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348290', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348286', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348252', None, None, None, None, None, '3327875')] time used for this insertion : 0.016007661819458008 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.931203842163086 time spend to save output : 0.016275882720947266 total time spend for step 4 : 1.9474797248840332 step5:split_time_score Wed Jul 23 14:35:03 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['25224782'] 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 : [('25224782',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25224782) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1373348368: {'path': 'temp/1753274101_2955457_1373348368_760de265fbea80c6262075d101e87285.jpg', 'extension': 'jpg'}, 1373348514: {'path': 'temp/1753274101_2955457_1373348514_c29296a083f976f24dce2557e45dda2f.jpg', 'extension': 'jpg'}, 1373348292: {'path': 'temp/1753274101_2955457_1373348292_027f442db97b2316fd2918a030732b63.jpg', 'extension': 'jpg'}, 1373348293: {'path': 'temp/1753274101_2955457_1373348293_dd0b3e407a97eeb7dd109ad44639087b.jpg', 'extension': 'jpg'}, 1373348304: {'path': 'temp/1753274101_2955457_1373348304_8f3c8308fb047a1d6b4a9ad42be788fd.jpg', 'extension': 'jpg'}, 1373348252: {'path': 'temp/1753274101_2955457_1373348252_403f274f169e69dd0309e2745ed21b97.jpg', 'extension': 'jpg'}, 1373348286: {'path': 'temp/1753274101_2955457_1373348286_ff79a898123245645e9f3d06bfa4f0ee.jpg', 'extension': 'jpg'}, 1373348290: {'path': 'temp/1753274101_2955457_1373348290_f051539b2d98167129bbac8f5aee3617.jpg', 'extension': 'jpg'}, 1373348360: {'path': 'temp/1753274101_2955457_1373348360_fa636607080cd64f6e3e44b60ae1c613.jpg', 'extension': 'jpg'}, 1373348364: {'path': 'temp/1753274101_2955457_1373348364_0e7d4bd93588a169c09398b44a206d29.jpg', 'extension': 'jpg'}, 1373348366: {'path': 'temp/1753274101_2955457_1373348366_1c11015958d39f68dc16ec2b7b247001.jpg', 'extension': 'jpg'}, 1373348309: {'path': 'temp/1753274101_2955457_1373348309_5ff55dc09a6296abcd7aa2bedb89d380.jpg', 'extension': 'jpg'}, 1373348353: {'path': 'temp/1753274101_2955457_1373348353_ce67b3600f8aa22973a51ae08fa6783f.jpg', 'extension': 'jpg'}, 1373348357: {'path': 'temp/1753274101_2955457_1373348357_fc6154cc54a7be6cf4b9b403789a7fb0.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 = 25224782; (('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 = 25224782 group by h (('14', 14),) 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=25224782 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 (25224782) 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 (25224782) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 23072025 25224782 Nombre de photos uploadées : 14 / 23040 (0%) 23072025 25224782 Nombre de photos taguées (types de déchets): 0 / 14 (0%) 23072025 25224782 Nombre de photos taguées (volume) : 0 / 14 (0%) [{'photo_id': 1373348252, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/23/403f274f169e69dd0309e2745ed21b97.jpg', 'username': None, 'uploaded_at': 1753273867, 'text': 'image_23072025_14_30_54_9124.jpg'}, {'photo_id': 1373348309, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/23/5ff55dc09a6296abcd7aa2bedb89d380.jpg', 'username': None, 'uploaded_at': 1753273923, 'text': 'image_23072025_14_31_04_10147.jpg'}, {'photo_id': 1373348304, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/23/8f3c8308fb047a1d6b4a9ad42be788fd.jpg', 'username': None, 'uploaded_at': 1753273923, 'text': 'image_23072025_14_31_14_10142.jpg'}, {'photo_id': 1373348293, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/23/dd0b3e407a97eeb7dd109ad44639087b.jpg', 'username': None, 'uploaded_at': 1753273923, 'text': 'image_23072025_14_31_24_10138.jpg'}] 0 [] elapsed_time : load_data_split_time_score 2.1457672119140625e-06 elapsed_time : order_list_meta_photo_and_scores 7.867813110351562e-06 ?????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0017178058624267578 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 218, 25224782, '2025-07-23' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1998967,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.02829432487487793 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= 1998967 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1998967, 'dashboard_run_id': 2008597, 'mtr_portfolio_id': 25222912, 'dashboard_result_id': 12945213, '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_P25222912_23-07-2025_14_01_02.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25222950, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25222951, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25222952, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25222953, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25222954, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25222955, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25222956, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25222957, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25222958, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25222959, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25222960, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25222961, 'pht': 3726}}"}, {'dashboat_entry_day': 1998967, 'dashboard_run_id': 2008597, 'mtr_portfolio_id': 25223291, 'dashboard_result_id': 12945214, '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_P25223291_23-07-2025_14_16_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25223292, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25223293, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25223294, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25223295, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25223296, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25223297, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25223298, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25223299, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25223300, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25223301, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25223302, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25223303, 'pht': 3726}}"}, {'dashboat_entry_day': 1998967, 'dashboard_run_id': 2008597, 'mtr_portfolio_id': 25224098, 'dashboard_result_id': 12945215, '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_P25224098_23-07-2025_14_32_31.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25224115, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25224116, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25224117, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25224118, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25224119, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25224120, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25224121, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25224122, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25224123, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25224124, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25224125, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25224126, 'pht': 3726}}"}, {'dashboat_entry_day': 1998967, 'dashboard_run_id': 2008597, 'mtr_portfolio_id': 25224782, 'dashboard_result_id': 12945216, '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 = 25222912 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': 3327518, 'mtr_portfolio_id': 25222912, 'created_at': datetime.datetime(2025, 7, 23, 14, 1, 1), 'result': '0.041825679864125505', 'result_long': None, 'result_double': None}] Qualite : 0.041825679864125505 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25222912 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25222912_23-07-2025_14_01_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25222912 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_P25222912_23-07-2025_14_01_02.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25222950, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25222951, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25222952, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25222953, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25222954, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25222955, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25222956, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25222957, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25222958, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25222959, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25222960, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25222961, 'pht': 3726}}" where mtr_portfolio_id = 25222912 and dashboard_run_id = 2008597 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`=25222912 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12945213, 0.041825679864125505, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25222912_23-07-2025_14_01_02.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25222950, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25222951, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25222952, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25222953, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25222954, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25222955, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25222956, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25222957, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25222958, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25222959, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25222960, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25222961, '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 = 25223291 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': 3327616, 'mtr_portfolio_id': 25223291, 'created_at': datetime.datetime(2025, 7, 23, 14, 16, 59), 'result': '0.03662516740441209', 'result_long': None, 'result_double': None}] Qualite : 0.03662516740441209 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25223291 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25223291_23-07-2025_14_16_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25223291 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_P25223291_23-07-2025_14_16_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25223292, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25223293, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25223294, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25223295, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25223296, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25223297, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25223298, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25223299, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25223300, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25223301, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25223302, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25223303, 'pht': 3726}}" where mtr_portfolio_id = 25223291 and dashboard_run_id = 2008597 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`=25223291 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12945214, 0.03662516740441209, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25223291_23-07-2025_14_16_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25223292, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25223293, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25223294, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25223295, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25223296, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25223297, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25223298, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25223299, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25223300, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25223301, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25223302, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25223303, '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 = 25224098 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': 3327755, 'mtr_portfolio_id': 25224098, 'created_at': datetime.datetime(2025, 7, 23, 14, 32, 30), 'result': '0.022303443808859933', 'result_long': None, 'result_double': None}] Qualite : 0.022303443808859933 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25224098 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25224098_23-07-2025_14_32_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25224098 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_P25224098_23-07-2025_14_32_31.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25224115, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25224116, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25224117, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25224118, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25224119, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25224120, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25224121, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25224122, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25224123, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25224124, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25224125, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25224126, 'pht': 3726}}" where mtr_portfolio_id = 25224098 and dashboard_run_id = 2008597 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`=25224098 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12945215, 0.022303443808859933, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25224098_23-07-2025_14_32_31.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25224115, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25224116, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25224117, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25224118, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25224119, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25224120, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25224121, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25224122, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25224123, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25224124, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25224125, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25224126, '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 = 25224782 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 = 25224782 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 = 25224782 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 25224782 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 = 25224782 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 = 25224782 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25224782_23-07-2025_14_35_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25224782 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_P25224782_23-07-2025_14_35_01.pdf'}" where mtr_portfolio_id = 25224782 and dashboard_run_id = 2008597 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25222912,25223291,25224098,25224782) result : ((1373341453,), (1373341456,), (1373341459,), (1373341462,), (1373341466,), (1373341471,), (1373341510,), (1373341556,), (1373341558,), (1373341561,), (1373341563,), (1373341566,), (1373341571,), (1373341598,), (1373341605,), (1373341636,), (1373341638,), (1373341650,), (1373341654,), (1373341697,), (1373341763,), (1373341765,), (1373341768,), (1373341770,), (1373341772,), (1373341795,), (1373341804,), (1373341810,), (1373341814,), (1373341816,), (1373341821,), (1373341847,), (1373341850,), (1373341852,), (1373341855,), (1373341857,), (1373341862,), (1373341892,), (1373341894,), (1373341896,), (1373341897,), (1373341899,), (1373341903,), (1373341926,), (1373341930,), (1373341933,), (1373341936,), (1373341940,), (1373341944,), (1373341967,), (1373341975,), (1373341978,), (1373341989,), (1373341992,), (1373341994,), (1373342011,), (1373342015,), (1373342018,), (1373342020,), (1373342023,), (1373342027,), (1373342047,), (1373342051,), (1373342056,), (1373342058,), (1373342061,), (1373342064,), (1373342092,), (1373342096,), (1373342099,), (1373342101,), (1373342103,), (1373342107,), (1373343084,), (1373343424,), (1373343430,), (1373343458,), (1373343506,), (1373343547,), (1373343888,), (1373343916,), (1373343941,), (1373343965,), (1373343992,), (1373344109,), (1373344227,), (1373344234,), (1373344238,), (1373344270,), (1373344272,), (1373344278,), (1373344447,), (1373344453,), (1373344457,), (1373344493,), (1373344507,), (1373344509,), (1373344547,), (1373344552,), (1373344624,), (1373344627,), (1373344633,), (1373344637,), (1373344651,), (1373344656,), (1373344658,), (1373344707,), (1373344732,), (1373344737,), (1373344763,), (1373344790,), (1373344791,), (1373344802,), (1373344806,), (1373344820,), (1373344835,), (1373344861,), (1373344868,), (1373344870,), (1373344871,), (1373344872,), (1373344876,), (1373344942,), (1373344946,), (1373344955,), (1373344956,), (1373344958,), (1373344962,), (1373345074,), (1373345078,), (1373345080,), (1373345100,), (1373345105,), (1373345107,), (1373345238,), (1373345266,), (1373345291,), (1373345352,), (1373345364,), (1373345369,), (1373345450,), (1373345457,), (1373345463,), (1373345469,), (1373345472,), (1373345478,), (1373345648,), (1373345653,), (1373345677,), (1373345682,), (1373345694,), (1373345715,), (1373346009,), (1373346044,), (1373346077,), (1373346128,), (1373346169,), (1373346225,), (1373346418,), (1373346496,), (1373346525,), (1373346552,), (1373346582,), (1373346611,), (1373346647,), (1373346674,), (1373346707,), (1373346715,), (1373346717,), (1373346721,), (1373346801,), (1373346804,), (1373346807,), (1373346810,), (1373346814,), (1373346817,), (1373346867,), (1373346870,), (1373346873,), (1373346874,), (1373346875,), (1373346878,), (1373346918,), (1373346922,), (1373346939,), (1373346944,), (1373346948,), (1373346952,), (1373347040,), (1373347074,), (1373347093,), (1373347104,), (1373347106,), (1373347113,), (1373347117,), (1373347400,), (1373347433,), (1373347468,), (1373347501,), (1373347517,), (1373347520,), (1373347644,), (1373347648,), (1373347651,), (1373347693,), (1373347695,), (1373347718,), (1373347748,), (1373347753,), (1373347756,), (1373347758,), (1373347761,), (1373347770,), (1373347852,), (1373347861,), (1373347865,), (1373347868,), (1373347872,), (1373347875,), (1373348045,), (1373348056,), (1373348061,), (1373348078,), (1373348083,), (1373348086,), (1373348113,), (1373348115,), (1373348117,), (1373348119,), (1373348120,), (1373348124,), (1373348157,), (1373348160,), (1373348163,), (1373348164,), (1373348168,), (1373348172,), (1373348201,), (1373348206,), (1373348211,), (1373348214,), (1373348217,), (1373348221,), (1373348252,), (1373348286,), (1373348290,), (1373348292,), (1373348293,), (1373348304,), (1373348309,), (1373348353,), (1373348357,), (1373348360,), (1373348364,), (1373348366,), (1373348368,), (1373348514,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'23072025': {'nb_upload': 14, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25224782]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1373348514, 1373348368, 1373348366, 1373348364, 1373348360, 1373348357, 1373348353, 1373348309, 1373348304, 1373348293, 1373348292, 1373348290, 1373348286, 1373348252] map_info['map_portfolio_photo'] : {25224782: [1373348514, 1373348368, 1373348366, 1373348364, 1373348360, 1373348357, 1373348353, 1373348309, 1373348304, 1373348293, 1373348292, 1373348290, 1373348286, 1373348252]} final : True mtd_id 4302 list_pids : [1373348514, 1373348368, 1373348366, 1373348364, 1373348360, 1373348357, 1373348353, 1373348309, 1373348304, 1373348293, 1373348292, 1373348290, 1373348286, 1373348252] Looping around the photos to save general results len do output : 1 /25224782Didn'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, '3327875') ('4302', '25224782', '1373348514', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348368', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348366', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348364', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348360', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348357', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348353', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348309', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348304', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348293', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348292', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348290', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348286', None, None, None, None, None, '3327875') ('4302', None, None, None, None, None, None, None, '3327875') ('4302', '25224782', '1373348252', None, None, None, None, None, '3327875') 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', None, '25224782', 'None', None, None, None, None, '3327875'), ('4302', '25224782', '1373348514', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348368', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348366', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348364', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348360', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348357', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348353', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348309', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348304', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348293', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348292', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348290', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348286', None, None, None, None, None, '3327875'), ('4302', '25224782', '1373348252', None, None, None, None, None, '3327875')] time used for this insertion : 0.01527714729309082 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.305361270904541 time spend to save output : 0.015539169311523438 total time spend for step 5 : 0.32090044021606445 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 (3327875) 2.29user 2.62system 0:07.84elapsed 62%CPU (0avgtext+0avgdata 158228maxresident)k 1232inputs+7200outputs (15major+75956minor)pagefaults 0swaps