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 : 543098 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 (2614764) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2614764) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20824472 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2614764'] with mtr_portfolio_ids : ['20824472'] and first list_photo_ids : [] new path : /proc/543098/ Name: python3 Umask: 0002 State: R (running) Tgid: 543098 Ngid: 0 Pid: 543098 PPid: 543097 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 543098 NSpid: 543098 NSpgid: 540470 NSsid: 540470 VmPeak: 1106852 kB VmSize: 1106852 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98508 kB VmRSS: 98508 kB RssAnon: 59760 kB RssFile: 38748 kB RssShmem: 0 kB VmData: 865600 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 612 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 3/63054 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: 49 nonvoluntary_ctxt_switches: 92 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '543098', 'Ngid': '0', 'Pid': '543098', 'PPid': '543097', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '543098', 'NSpid': '543098', 'NSpgid': '540470', 'NSsid': '540470', 'VmPeak': '1106852 kB', 'VmSize': '1106852 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98508 kB', 'VmRSS': '98508 kB', 'RssAnon': '59760 kB', 'RssFile': '38748 kB', 'RssShmem': '0 kB', 'VmData': '865600 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '612 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '3/63054', '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': '49', 'nonvoluntary_ctxt_switches': '92'} ('datou_batch_current', '543098', '1106852', '0', '1106852', '865600', '98508', b'', 'marlene', '2614764') 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 (20824472) 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 (2614764 ) ) 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 (20824472) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1339673440, 'portfolio_id': 20824472}, {'photo_id': 1339673437, 'portfolio_id': 20824472}, {'photo_id': 1339673434, 'portfolio_id': 20824472}, {'photo_id': 1339673429, 'portfolio_id': 20824472}, {'photo_id': 1339673413, 'portfolio_id': 20824472}, {'photo_id': 1339673411, 'portfolio_id': 20824472}, {'photo_id': 1339673406, 'portfolio_id': 20824472}, {'photo_id': 1339673402, 'portfolio_id': 20824472}, {'photo_id': 1339673399, 'portfolio_id': 20824472}, {'photo_id': 1339673396, 'portfolio_id': 20824472}, {'photo_id': 1339673360, 'portfolio_id': 20824472}, {'photo_id': 1339673355, 'portfolio_id': 20824472}, {'photo_id': 1339673346, 'portfolio_id': 20824472}, {'photo_id': 1339673336, 'portfolio_id': 20824472}] map_portfolio_id_photo_id: {20824472: [1339673440, 1339673437, 1339673434, 1339673429, 1339673413, 1339673411, 1339673406, 1339673402, 1339673399, 1339673396, 1339673360, 1339673355, 1339673346, 1339673336]} ##### 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.014181852340698242 #### 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 Feb 26 06:04:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20824472) 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 : 20824472 get user id for portfolio 20824472 get sub ptf for main ptf 20824472, type 3726 and hashtags ['flou', 'Carton_brun', 'autre_refus', 'Carton_gris', 'kraft', 'papier', 'environnement', 'cartonnette', 'metal', 'Teint_Dans_La_Masse', 'mal_croppe', 'plastique'] 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`=20824472 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','Carton_brun','autre_refus','Carton_gris','kraft','papier','environnement','cartonnette','metal','Teint_Dans_La_Masse','mal_croppe','plastique')) 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`=20824472 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','Carton_brun','autre_refus','Carton_gris','kraft','papier','environnement','cartonnette','metal','Teint_Dans_La_Masse','mal_croppe','plastique')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__26022025_06_00_04_10139_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__26022025_06_00_04_10139_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__26022025_06_00_04_10139_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__26022025_06_00_04_10139_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__26022025_06_00_04_10139_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__26022025_06_00_04_10139_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__26022025_06_00_04_10139_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__26022025_06_00_04_10139_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__26022025_06_00_04_10139_3726_metal_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__26022025_06_00_04_10139_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__26022025_06_00_04_10139_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__26022025_06_00_04_10139_3726_plastique_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)[[20824472, 20824473, 3726, 0.5, 492777938, 979], [20824472, 20824474, 3726, 0.5, 2107753024, 979], [20824472, 20824475, 3726, 0.5, 2107752406, 979], [20824472, 20824476, 3726, 0.5, 2107753020, 979], [20824472, 20824477, 3726, 0.5, 493202403, 979], [20824472, 20824478, 3726, 0.5, 492668766, 979], [20824472, 20824479, 3726, 0.5, 493012381, 979], [20824472, 20824480, 3726, 0.5, 702398920, 979], [20824472, 20824481, 3726, 0.5, 492628673, 979], [20824472, 20824482, 3726, 0.5, 2107752385, 979], [20824472, 20824483, 3726, 0.5, 2107755527, 979], [20824472, 20824484, 3726, 0.5, 492725882, 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`=20824472 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','Carton_brun','autre_refus','Carton_gris','kraft','papier','environnement','cartonnette','metal','Teint_Dans_La_Masse','mal_croppe','plastique')) 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`=20824472 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','Carton_brun','autre_refus','Carton_gris','kraft','papier','environnement','cartonnette','metal','Teint_Dans_La_Masse','mal_croppe','plastique')) AND mptpi.`min_score`=0.5 To do returned map {'flou': {'main_port_id': 20824472, 'sub_port_id': 20824473, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13460483, 'last_updated_at': datetime.datetime(2025, 2, 26, 6, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 26, 6, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 26, 6, 4, 58)}, 'Carton_brun': {'main_port_id': 20824472, 'sub_port_id': 20824474, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13460484, 'last_updated_at': datetime.datetime(2025, 2, 26, 6, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 26, 6, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 26, 6, 4, 58)}, 'autre_refus': {'main_port_id': 20824472, 'sub_port_id': 20824475, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13460485, 'last_updated_at': datetime.datetime(2025, 2, 26, 6, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 26, 6, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 26, 6, 4, 58)}, 'Carton_gris': {'main_port_id': 20824472, 'sub_port_id': 20824476, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13460486, 'last_updated_at': datetime.datetime(2025, 2, 26, 6, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 26, 6, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 26, 6, 4, 58)}, 'kraft': {'main_port_id': 20824472, 'sub_port_id': 20824477, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13460487, 'last_updated_at': datetime.datetime(2025, 2, 26, 6, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 26, 6, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 26, 6, 4, 58)}, 'papier': {'main_port_id': 20824472, 'sub_port_id': 20824478, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13460488, 'last_updated_at': datetime.datetime(2025, 2, 26, 6, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 26, 6, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 26, 6, 4, 58)}, 'environnement': {'main_port_id': 20824472, 'sub_port_id': 20824479, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13460489, 'last_updated_at': datetime.datetime(2025, 2, 26, 6, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 26, 6, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 26, 6, 4, 58)}, 'cartonnette': {'main_port_id': 20824472, 'sub_port_id': 20824480, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13460490, 'last_updated_at': datetime.datetime(2025, 2, 26, 6, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 26, 6, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 26, 6, 4, 58)}, 'metal': {'main_port_id': 20824472, 'sub_port_id': 20824481, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13460491, 'last_updated_at': datetime.datetime(2025, 2, 26, 6, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 26, 6, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 26, 6, 4, 58)}, 'Teint_Dans_La_Masse': {'main_port_id': 20824472, 'sub_port_id': 20824482, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13460492, 'last_updated_at': datetime.datetime(2025, 2, 26, 6, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 26, 6, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 26, 6, 4, 58)}, 'mal_croppe': {'main_port_id': 20824472, 'sub_port_id': 20824483, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13460493, 'last_updated_at': datetime.datetime(2025, 2, 26, 6, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 26, 6, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 26, 6, 4, 58)}, 'plastique': {'main_port_id': 20824472, 'sub_port_id': 20824484, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13460494, 'last_updated_at': datetime.datetime(2025, 2, 26, 6, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 26, 6, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 26, 6, 4, 58)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20824473 , 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=20824472 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 (20824473) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20824472) result : ((1339673336,), (1339673346,), (1339673355,), (1339673360,), (1339673396,), (1339673399,), (1339673402,), (1339673406,), (1339673411,), (1339673413,), (1339673429,), (1339673434,), (1339673437,), (1339673440,)) 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 20824474 , 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=20824472 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 (20824474) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20824472) result : ((1339673336,), (1339673346,), (1339673355,), (1339673360,), (1339673396,), (1339673399,), (1339673402,), (1339673406,), (1339673411,), (1339673413,), (1339673429,), (1339673434,), (1339673437,), (1339673440,)) 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 20824475 , 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=20824472 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 (20824475) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20824472) result : ((1339673336,), (1339673346,), (1339673355,), (1339673360,), (1339673396,), (1339673399,), (1339673402,), (1339673406,), (1339673411,), (1339673413,), (1339673429,), (1339673434,), (1339673437,), (1339673440,)) 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 20824476 , 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=20824472 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 (20824476) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20824472) result : ((1339673336,), (1339673346,), (1339673355,), (1339673360,), (1339673396,), (1339673399,), (1339673402,), (1339673406,), (1339673411,), (1339673413,), (1339673429,), (1339673434,), (1339673437,), (1339673440,)) 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 20824477 , 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=20824472 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 (20824477) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20824472) result : ((1339673336,), (1339673346,), (1339673355,), (1339673360,), (1339673396,), (1339673399,), (1339673402,), (1339673406,), (1339673411,), (1339673413,), (1339673429,), (1339673434,), (1339673437,), (1339673440,)) 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 20824478 , 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=20824472 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 (20824478) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20824472) result : ((1339673336,), (1339673346,), (1339673355,), (1339673360,), (1339673396,), (1339673399,), (1339673402,), (1339673406,), (1339673411,), (1339673413,), (1339673429,), (1339673434,), (1339673437,), (1339673440,)) 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 20824479 , 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=20824472 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 (20824479) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20824472) result : ((1339673336,), (1339673346,), (1339673355,), (1339673360,), (1339673396,), (1339673399,), (1339673402,), (1339673406,), (1339673411,), (1339673413,), (1339673429,), (1339673434,), (1339673437,), (1339673440,)) 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 20824480 , 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=20824472 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 (20824480) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20824472) result : ((1339673336,), (1339673346,), (1339673355,), (1339673360,), (1339673396,), (1339673399,), (1339673402,), (1339673406,), (1339673411,), (1339673413,), (1339673429,), (1339673434,), (1339673437,), (1339673440,)) 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 20824481 , 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=20824472 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 (20824481) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20824472) result : ((1339673336,), (1339673346,), (1339673355,), (1339673360,), (1339673396,), (1339673399,), (1339673402,), (1339673406,), (1339673411,), (1339673413,), (1339673429,), (1339673434,), (1339673437,), (1339673440,)) 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 20824482 , 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=20824472 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 (20824482) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20824472) result : ((1339673336,), (1339673346,), (1339673355,), (1339673360,), (1339673396,), (1339673399,), (1339673402,), (1339673406,), (1339673411,), (1339673413,), (1339673429,), (1339673434,), (1339673437,), (1339673440,)) 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 20824483 , 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=20824472 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 (20824483) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20824472) result : ((1339673336,), (1339673346,), (1339673355,), (1339673360,), (1339673396,), (1339673399,), (1339673402,), (1339673406,), (1339673411,), (1339673413,), (1339673429,), (1339673434,), (1339673437,), (1339673440,)) 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 20824484 , 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=20824472 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 (20824484) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20824472) result : ((1339673336,), (1339673346,), (1339673355,), (1339673360,), (1339673396,), (1339673399,), (1339673402,), (1339673406,), (1339673411,), (1339673413,), (1339673429,), (1339673434,), (1339673437,), (1339673440,)) 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`=20824472 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','Carton_brun','autre_refus','Carton_gris','kraft','papier','environnement','cartonnette','metal','Teint_Dans_La_Masse','mal_croppe','plastique')) 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`=20824472 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','Carton_brun','autre_refus','Carton_gris','kraft','papier','environnement','cartonnette','metal','Teint_Dans_La_Masse','mal_croppe','plastique')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__26022025_06_00_04_10139_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__26022025_06_00_04_10139_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__26022025_06_00_04_10139_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__26022025_06_00_04_10139_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__26022025_06_00_04_10139_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__26022025_06_00_04_10139_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__26022025_06_00_04_10139_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__26022025_06_00_04_10139_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__26022025_06_00_04_10139_4417_metal_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__26022025_06_00_04_10139_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__26022025_06_00_04_10139_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__26022025_06_00_04_10139_4417_plastique_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)[[20824472, 20824485, 4417, 0.5, 492777938, 979], [20824472, 20824486, 4417, 0.5, 2107753024, 979], [20824472, 20824487, 4417, 0.5, 2107752406, 979], [20824472, 20824488, 4417, 0.5, 2107753020, 979], [20824472, 20824489, 4417, 0.5, 493202403, 979], [20824472, 20824490, 4417, 0.5, 492668766, 979], [20824472, 20824491, 4417, 0.5, 493012381, 979], [20824472, 20824492, 4417, 0.5, 702398920, 979], [20824472, 20824493, 4417, 0.5, 492628673, 979], [20824472, 20824494, 4417, 0.5, 2107752385, 979], [20824472, 20824495, 4417, 0.5, 2107755527, 979], [20824472, 20824496, 4417, 0.5, 492725882, 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`=20824472 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','Carton_brun','autre_refus','Carton_gris','kraft','papier','environnement','cartonnette','metal','Teint_Dans_La_Masse','mal_croppe','plastique')) 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`=20824472 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','Carton_brun','autre_refus','Carton_gris','kraft','papier','environnement','cartonnette','metal','Teint_Dans_La_Masse','mal_croppe','plastique')) AND mptpi.`min_score`=0.5 To do returned map {'flou': {'main_port_id': 20824472, 'sub_port_id': 20824485, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13460495, 'last_updated_at': datetime.datetime(2025, 2, 26, 6, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 26, 6, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 26, 6, 4, 59)}, 'Carton_brun': {'main_port_id': 20824472, 'sub_port_id': 20824486, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13460496, 'last_updated_at': datetime.datetime(2025, 2, 26, 6, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 26, 6, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 26, 6, 4, 59)}, 'autre_refus': {'main_port_id': 20824472, 'sub_port_id': 20824487, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13460497, 'last_updated_at': datetime.datetime(2025, 2, 26, 6, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 26, 6, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 26, 6, 4, 59)}, 'Carton_gris': {'main_port_id': 20824472, 'sub_port_id': 20824488, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13460498, 'last_updated_at': datetime.datetime(2025, 2, 26, 6, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 26, 6, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 26, 6, 4, 59)}, 'kraft': {'main_port_id': 20824472, 'sub_port_id': 20824489, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13460499, 'last_updated_at': datetime.datetime(2025, 2, 26, 6, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 26, 6, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 26, 6, 4, 59)}, 'papier': {'main_port_id': 20824472, 'sub_port_id': 20824490, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13460500, 'last_updated_at': datetime.datetime(2025, 2, 26, 6, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 26, 6, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 26, 6, 4, 59)}, 'environnement': {'main_port_id': 20824472, 'sub_port_id': 20824491, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13460501, 'last_updated_at': datetime.datetime(2025, 2, 26, 6, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 26, 6, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 26, 6, 4, 59)}, 'cartonnette': {'main_port_id': 20824472, 'sub_port_id': 20824492, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13460502, 'last_updated_at': datetime.datetime(2025, 2, 26, 6, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 26, 6, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 26, 6, 4, 59)}, 'metal': {'main_port_id': 20824472, 'sub_port_id': 20824493, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13460503, 'last_updated_at': datetime.datetime(2025, 2, 26, 6, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 26, 6, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 26, 6, 4, 59)}, 'Teint_Dans_La_Masse': {'main_port_id': 20824472, 'sub_port_id': 20824494, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13460504, 'last_updated_at': datetime.datetime(2025, 2, 26, 6, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 26, 6, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 26, 6, 4, 59)}, 'mal_croppe': {'main_port_id': 20824472, 'sub_port_id': 20824495, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13460505, 'last_updated_at': datetime.datetime(2025, 2, 26, 6, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 26, 6, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 26, 6, 4, 59)}, 'plastique': {'main_port_id': 20824472, 'sub_port_id': 20824496, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13460506, 'last_updated_at': datetime.datetime(2025, 2, 26, 6, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 26, 6, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 26, 6, 4, 59)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20824485,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20824473 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20824486,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20824474 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20824487,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20824475 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20824488,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20824476 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20824489,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20824477 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20824490,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20824478 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20824491,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20824479 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20824492,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20824480 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20824493,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20824481 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20824494,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20824482 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20824495,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20824483 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20824496,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20824484 lien utilise dans velours : https://www.fotonower.com/velours/20824485,20824486,20824487,20824488,20824489,20824490,20824491,20824492,20824493,20824494,20824495,20824496?tags=flou,Carton_brun,autre_refus,Carton_gris,kraft,papier,environnement,cartonnette,metal,Teint_Dans_La_Masse,mal_croppe,plastique After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20824472]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1339673440, 1339673437, 1339673434, 1339673429, 1339673413, 1339673411, 1339673406, 1339673402, 1339673399, 1339673396, 1339673360, 1339673355, 1339673346, 1339673336] map_info['map_portfolio_photo'] : {20824472: [1339673440, 1339673437, 1339673434, 1339673429, 1339673413, 1339673411, 1339673406, 1339673402, 1339673399, 1339673396, 1339673360, 1339673355, 1339673346, 1339673336]} final : False mtd_id 4302 list_pids : [1339673440, 1339673437, 1339673434, 1339673429, 1339673413, 1339673411, 1339673406, 1339673402, 1339673399, 1339673396, 1339673360, 1339673355, 1339673346, 1339673336] Looping around the photos to save general results len do output : 1 /20824472. 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, '2614764') ('4302', '20824472', '1339673440', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673437', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673434', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673429', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673413', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673411', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673406', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673402', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673399', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673396', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673360', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673355', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673346', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673336', None, None, None, None, None, '2614764') 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, '20824472', "{'flou': 20824473, 'Carton_brun': 20824474, 'autre_refus': 20824475, 'Carton_gris': 20824476, 'kraft': 20824477, 'papier': 20824478, 'environnement': 20824479, 'cartonnette': 20824480, 'metal': 20824481, 'Teint_Dans_La_Masse': 20824482, 'mal_croppe': 20824483, 'plastique': 20824484}", None, None, None, None, '2614764'), ('4302', '20824472', '1339673440', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673437', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673434', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673429', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673413', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673411', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673406', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673402', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673399', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673396', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673360', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673355', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673346', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673336', None, None, None, None, None, '2614764')] time used for this insertion : 0.0333559513092041 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.1541242599487305 time spend to save output : 0.03367757797241211 total time spend for step 1 : 2.1878018379211426 step2:final Wed Feb 26 06:04:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20824472) 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 20824472 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1339673360,1339673355,1339673346,1339673336,1339673413,1339673411,1339673406,1339673402,1339673399,1339673396,1339673440,1339673437,1339673434,1339673429); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20824472]) Inside saveOutput : final : False verbose : True original output for save of step final : {1339673440: ('0.0',), 1339673437: ('0.0',), 1339673434: ('0.0',), 1339673429: ('0.0',), 1339673413: ('0.0',), 1339673411: ('0.0',), 1339673406: ('0.0',), 1339673402: ('0.0',), 1339673399: ('0.0',), 1339673396: ('0.0',), 1339673360: ('0.0',), 1339673355: ('0.0',), 1339673346: ('0.0',), 1339673336: ('0.0',)} new output for save of step final : {1339673440: ('0.0',), 1339673437: ('0.0',), 1339673434: ('0.0',), 1339673429: ('0.0',), 1339673413: ('0.0',), 1339673411: ('0.0',), 1339673406: ('0.0',), 1339673402: ('0.0',), 1339673399: ('0.0',), 1339673396: ('0.0',), 1339673360: ('0.0',), 1339673355: ('0.0',), 1339673346: ('0.0',), 1339673336: ('0.0',)} [1339673440, 1339673437, 1339673434, 1339673429, 1339673413, 1339673411, 1339673406, 1339673402, 1339673399, 1339673396, 1339673360, 1339673355, 1339673346, 1339673336] map_info['map_portfolio_photo'] : {20824472: [1339673440, 1339673437, 1339673434, 1339673429, 1339673413, 1339673411, 1339673406, 1339673402, 1339673399, 1339673396, 1339673360, 1339673355, 1339673346, 1339673336]} final : False mtd_id 4302 list_pids : [1339673440, 1339673437, 1339673434, 1339673429, 1339673413, 1339673411, 1339673406, 1339673402, 1339673399, 1339673396, 1339673360, 1339673355, 1339673346, 1339673336] Looping around the photos to save general results len do output : 14 /1339673440.Didn't retrieve data . /1339673437.Didn't retrieve data . /1339673434.Didn't retrieve data . /1339673429.Didn't retrieve data . /1339673413.Didn't retrieve data . /1339673411.Didn't retrieve data . /1339673406.Didn't retrieve data . /1339673402.Didn't retrieve data . /1339673399.Didn't retrieve data . /1339673396.Didn't retrieve data . /1339673360.Didn't retrieve data . /1339673355.Didn't retrieve data . /1339673346.Didn't retrieve data . /1339673336.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, '2614764') ('4302', '20824472', '1339673440', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673437', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673434', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673429', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673413', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673411', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673406', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673402', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673399', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673396', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673360', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673355', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673346', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673336', None, None, None, None, None, '2614764') 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', '20824472', '1339673440', '0.0', None, None, None, None, '2614764'), ('4302', '20824472', '1339673437', '0.0', None, None, None, None, '2614764'), ('4302', '20824472', '1339673434', '0.0', None, None, None, None, '2614764'), ('4302', '20824472', '1339673429', '0.0', None, None, None, None, '2614764'), ('4302', '20824472', '1339673413', '0.0', None, None, None, None, '2614764'), ('4302', '20824472', '1339673411', '0.0', None, None, None, None, '2614764'), ('4302', '20824472', '1339673406', '0.0', None, None, None, None, '2614764'), ('4302', '20824472', '1339673402', '0.0', None, None, None, None, '2614764'), ('4302', '20824472', '1339673399', '0.0', None, None, None, None, '2614764'), ('4302', '20824472', '1339673396', '0.0', None, None, None, None, '2614764'), ('4302', '20824472', '1339673360', '0.0', None, None, None, None, '2614764'), ('4302', '20824472', '1339673355', '0.0', None, None, None, None, '2614764'), ('4302', '20824472', '1339673346', '0.0', None, None, None, None, '2614764'), ('4302', '20824472', '1339673336', '0.0', None, None, None, None, '2614764')] time used for this insertion : 0.01619744300842285 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.014856100082397461 time spend to save output : 0.01694774627685547 total time spend for step 2 : 0.03180384635925293 step3:velours_tree Wed Feb 26 06:04:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {20824472: [{'flou': 20824473, 'Carton_brun': 20824474, 'autre_refus': 20824475, 'Carton_gris': 20824476, 'kraft': 20824477, 'papier': 20824478, 'environnement': 20824479, 'cartonnette': 20824480, 'metal': 20824481, 'Teint_Dans_La_Masse': 20824482, 'mal_croppe': 20824483, 'plastique': 20824484}]} input_args_next_step : {20824472: ()} output_args : {20824472: [{'flou': 20824473, 'Carton_brun': 20824474, 'autre_refus': 20824475, 'Carton_gris': 20824476, 'kraft': 20824477, 'papier': 20824478, 'environnement': 20824479, 'cartonnette': 20824480, 'metal': 20824481, 'Teint_Dans_La_Masse': 20824482, 'mal_croppe': 20824483, 'plastique': 20824484}]} args : 20824472 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 : ({'flou': 20824473, 'Carton_brun': 20824474, 'autre_refus': 20824475, 'Carton_gris': 20824476, 'kraft': 20824477, 'papier': 20824478, 'environnement': 20824479, 'cartonnette': 20824480, 'metal': 20824481, 'Teint_Dans_La_Masse': 20824482, 'mal_croppe': 20824483, 'plastique': 20824484},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20824472) 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([20824472]) 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.3008723258972168 time spend to save output : 5.817413330078125e-05 total time spend for step 3 : 0.3009305000305176 step4:send_mail_cod Wed Feb 26 06:05: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 ! complete output_args for input 2 : {1339673440: ('0.0',), 1339673437: ('0.0',), 1339673434: ('0.0',), 1339673429: ('0.0',), 1339673413: ('0.0',), 1339673411: ('0.0',), 1339673406: ('0.0',), 1339673402: ('0.0',), 1339673399: ('0.0',), 1339673396: ('0.0',), 1339673360: ('0.0',), 1339673355: ('0.0',), 1339673346: ('0.0',), 1339673336: ('0.0',)} input_args_next_step : {1339673440: ()} output_args : {1339673440: ('0.0',), 1339673437: ('0.0',), 1339673434: ('0.0',), 1339673429: ('0.0',), 1339673413: ('0.0',), 1339673411: ('0.0',), 1339673406: ('0.0',), 1339673402: ('0.0',), 1339673399: ('0.0',), 1339673396: ('0.0',), 1339673360: ('0.0',), 1339673355: ('0.0',), 1339673346: ('0.0',), 1339673336: ('0.0',)} args : 1339673440 depend.output_id : 0 input_args_next_step : {1339673440: ('0.0',), 1339673437: ()} output_args : {1339673440: ('0.0',), 1339673437: ('0.0',), 1339673434: ('0.0',), 1339673429: ('0.0',), 1339673413: ('0.0',), 1339673411: ('0.0',), 1339673406: ('0.0',), 1339673402: ('0.0',), 1339673399: ('0.0',), 1339673396: ('0.0',), 1339673360: ('0.0',), 1339673355: ('0.0',), 1339673346: ('0.0',), 1339673336: ('0.0',)} args : 1339673437 depend.output_id : 0 input_args_next_step : {1339673440: ('0.0',), 1339673437: ('0.0',), 1339673434: ()} output_args : {1339673440: ('0.0',), 1339673437: ('0.0',), 1339673434: ('0.0',), 1339673429: ('0.0',), 1339673413: ('0.0',), 1339673411: ('0.0',), 1339673406: ('0.0',), 1339673402: ('0.0',), 1339673399: ('0.0',), 1339673396: ('0.0',), 1339673360: ('0.0',), 1339673355: ('0.0',), 1339673346: ('0.0',), 1339673336: ('0.0',)} args : 1339673434 depend.output_id : 0 input_args_next_step : {1339673440: ('0.0',), 1339673437: ('0.0',), 1339673434: ('0.0',), 1339673429: ()} output_args : {1339673440: ('0.0',), 1339673437: ('0.0',), 1339673434: ('0.0',), 1339673429: ('0.0',), 1339673413: ('0.0',), 1339673411: ('0.0',), 1339673406: ('0.0',), 1339673402: ('0.0',), 1339673399: ('0.0',), 1339673396: ('0.0',), 1339673360: ('0.0',), 1339673355: ('0.0',), 1339673346: ('0.0',), 1339673336: ('0.0',)} args : 1339673429 depend.output_id : 0 input_args_next_step : {1339673440: ('0.0',), 1339673437: ('0.0',), 1339673434: ('0.0',), 1339673429: ('0.0',), 1339673413: ()} output_args : {1339673440: ('0.0',), 1339673437: ('0.0',), 1339673434: ('0.0',), 1339673429: ('0.0',), 1339673413: ('0.0',), 1339673411: ('0.0',), 1339673406: ('0.0',), 1339673402: ('0.0',), 1339673399: ('0.0',), 1339673396: ('0.0',), 1339673360: ('0.0',), 1339673355: ('0.0',), 1339673346: ('0.0',), 1339673336: ('0.0',)} args : 1339673413 depend.output_id : 0 input_args_next_step : {1339673440: ('0.0',), 1339673437: ('0.0',), 1339673434: ('0.0',), 1339673429: ('0.0',), 1339673413: ('0.0',), 1339673411: ()} output_args : {1339673440: ('0.0',), 1339673437: ('0.0',), 1339673434: ('0.0',), 1339673429: ('0.0',), 1339673413: ('0.0',), 1339673411: ('0.0',), 1339673406: ('0.0',), 1339673402: ('0.0',), 1339673399: ('0.0',), 1339673396: ('0.0',), 1339673360: ('0.0',), 1339673355: ('0.0',), 1339673346: ('0.0',), 1339673336: ('0.0',)} args : 1339673411 depend.output_id : 0 input_args_next_step : {1339673440: ('0.0',), 1339673437: ('0.0',), 1339673434: ('0.0',), 1339673429: ('0.0',), 1339673413: ('0.0',), 1339673411: ('0.0',), 1339673406: ()} output_args : {1339673440: ('0.0',), 1339673437: ('0.0',), 1339673434: ('0.0',), 1339673429: ('0.0',), 1339673413: ('0.0',), 1339673411: ('0.0',), 1339673406: ('0.0',), 1339673402: ('0.0',), 1339673399: ('0.0',), 1339673396: ('0.0',), 1339673360: ('0.0',), 1339673355: ('0.0',), 1339673346: ('0.0',), 1339673336: ('0.0',)} args : 1339673406 depend.output_id : 0 input_args_next_step : {1339673440: ('0.0',), 1339673437: ('0.0',), 1339673434: ('0.0',), 1339673429: ('0.0',), 1339673413: ('0.0',), 1339673411: ('0.0',), 1339673406: ('0.0',), 1339673402: ()} output_args : {1339673440: ('0.0',), 1339673437: ('0.0',), 1339673434: ('0.0',), 1339673429: ('0.0',), 1339673413: ('0.0',), 1339673411: ('0.0',), 1339673406: ('0.0',), 1339673402: ('0.0',), 1339673399: ('0.0',), 1339673396: ('0.0',), 1339673360: ('0.0',), 1339673355: ('0.0',), 1339673346: ('0.0',), 1339673336: ('0.0',)} args : 1339673402 depend.output_id : 0 input_args_next_step : {1339673440: ('0.0',), 1339673437: ('0.0',), 1339673434: ('0.0',), 1339673429: ('0.0',), 1339673413: ('0.0',), 1339673411: ('0.0',), 1339673406: ('0.0',), 1339673402: ('0.0',), 1339673399: ()} output_args : {1339673440: ('0.0',), 1339673437: ('0.0',), 1339673434: ('0.0',), 1339673429: ('0.0',), 1339673413: ('0.0',), 1339673411: ('0.0',), 1339673406: ('0.0',), 1339673402: ('0.0',), 1339673399: ('0.0',), 1339673396: ('0.0',), 1339673360: ('0.0',), 1339673355: ('0.0',), 1339673346: ('0.0',), 1339673336: ('0.0',)} args : 1339673399 depend.output_id : 0 input_args_next_step : {1339673440: ('0.0',), 1339673437: ('0.0',), 1339673434: ('0.0',), 1339673429: ('0.0',), 1339673413: ('0.0',), 1339673411: ('0.0',), 1339673406: ('0.0',), 1339673402: ('0.0',), 1339673399: ('0.0',), 1339673396: ()} output_args : {1339673440: ('0.0',), 1339673437: ('0.0',), 1339673434: ('0.0',), 1339673429: ('0.0',), 1339673413: ('0.0',), 1339673411: ('0.0',), 1339673406: ('0.0',), 1339673402: ('0.0',), 1339673399: ('0.0',), 1339673396: ('0.0',), 1339673360: ('0.0',), 1339673355: ('0.0',), 1339673346: ('0.0',), 1339673336: ('0.0',)} args : 1339673396 depend.output_id : 0 input_args_next_step : {1339673440: ('0.0',), 1339673437: ('0.0',), 1339673434: ('0.0',), 1339673429: ('0.0',), 1339673413: ('0.0',), 1339673411: ('0.0',), 1339673406: ('0.0',), 1339673402: ('0.0',), 1339673399: ('0.0',), 1339673396: ('0.0',), 1339673360: ()} output_args : {1339673440: ('0.0',), 1339673437: ('0.0',), 1339673434: ('0.0',), 1339673429: ('0.0',), 1339673413: ('0.0',), 1339673411: ('0.0',), 1339673406: ('0.0',), 1339673402: ('0.0',), 1339673399: ('0.0',), 1339673396: ('0.0',), 1339673360: ('0.0',), 1339673355: ('0.0',), 1339673346: ('0.0',), 1339673336: ('0.0',)} args : 1339673360 depend.output_id : 0 input_args_next_step : {1339673440: ('0.0',), 1339673437: ('0.0',), 1339673434: ('0.0',), 1339673429: ('0.0',), 1339673413: ('0.0',), 1339673411: ('0.0',), 1339673406: ('0.0',), 1339673402: ('0.0',), 1339673399: ('0.0',), 1339673396: ('0.0',), 1339673360: ('0.0',), 1339673355: ()} output_args : {1339673440: ('0.0',), 1339673437: ('0.0',), 1339673434: ('0.0',), 1339673429: ('0.0',), 1339673413: ('0.0',), 1339673411: ('0.0',), 1339673406: ('0.0',), 1339673402: ('0.0',), 1339673399: ('0.0',), 1339673396: ('0.0',), 1339673360: ('0.0',), 1339673355: ('0.0',), 1339673346: ('0.0',), 1339673336: ('0.0',)} args : 1339673355 depend.output_id : 0 input_args_next_step : {1339673440: ('0.0',), 1339673437: ('0.0',), 1339673434: ('0.0',), 1339673429: ('0.0',), 1339673413: ('0.0',), 1339673411: ('0.0',), 1339673406: ('0.0',), 1339673402: ('0.0',), 1339673399: ('0.0',), 1339673396: ('0.0',), 1339673360: ('0.0',), 1339673355: ('0.0',), 1339673346: ()} output_args : {1339673440: ('0.0',), 1339673437: ('0.0',), 1339673434: ('0.0',), 1339673429: ('0.0',), 1339673413: ('0.0',), 1339673411: ('0.0',), 1339673406: ('0.0',), 1339673402: ('0.0',), 1339673399: ('0.0',), 1339673396: ('0.0',), 1339673360: ('0.0',), 1339673355: ('0.0',), 1339673346: ('0.0',), 1339673336: ('0.0',)} args : 1339673346 depend.output_id : 0 input_args_next_step : {1339673440: ('0.0',), 1339673437: ('0.0',), 1339673434: ('0.0',), 1339673429: ('0.0',), 1339673413: ('0.0',), 1339673411: ('0.0',), 1339673406: ('0.0',), 1339673402: ('0.0',), 1339673399: ('0.0',), 1339673396: ('0.0',), 1339673360: ('0.0',), 1339673355: ('0.0',), 1339673346: ('0.0',), 1339673336: ()} output_args : {1339673440: ('0.0',), 1339673437: ('0.0',), 1339673434: ('0.0',), 1339673429: ('0.0',), 1339673413: ('0.0',), 1339673411: ('0.0',), 1339673406: ('0.0',), 1339673402: ('0.0',), 1339673399: ('0.0',), 1339673396: ('0.0',), 1339673360: ('0.0',), 1339673355: ('0.0',), 1339673346: ('0.0',), 1339673336: ('0.0',)} args : 1339673336 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 : {20824472: [{'flou': 20824473, 'Carton_brun': 20824474, 'autre_refus': 20824475, 'Carton_gris': 20824476, 'kraft': 20824477, 'papier': 20824478, 'environnement': 20824479, 'cartonnette': 20824480, 'metal': 20824481, 'Teint_Dans_La_Masse': 20824482, 'mal_croppe': 20824483, 'plastique': 20824484}]} input_args_next_step : {1339673440: ('0.0',), 1339673437: ('0.0',), 1339673434: ('0.0',), 1339673429: ('0.0',), 1339673413: ('0.0',), 1339673411: ('0.0',), 1339673406: ('0.0',), 1339673402: ('0.0',), 1339673399: ('0.0',), 1339673396: ('0.0',), 1339673360: ('0.0',), 1339673355: ('0.0',), 1339673346: ('0.0',), 1339673336: ('0.0',), 20824472: ()} output_args : {20824472: [{'flou': 20824473, 'Carton_brun': 20824474, 'autre_refus': 20824475, 'Carton_gris': 20824476, 'kraft': 20824477, 'papier': 20824478, 'environnement': 20824479, 'cartonnette': 20824480, 'metal': 20824481, 'Teint_Dans_La_Masse': 20824482, 'mal_croppe': 20824483, 'plastique': 20824484}]} args : 20824472 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 (20824472) 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 (1339673440,1339673437,1339673434,1339673429,1339673413,1339673411,1339673406,1339673402,1339673399,1339673396,1339673360,1339673355,1339673346,1339673336) Found this number of photos: 14 ##### Call download_photos : nb_thread : 5 begin to download photo : 1339673336 begin to download photo : 1339673360 begin to download photo : 1339673402 begin to download photo : 1339673413 begin to download photo : 1339673437 download finish for photo 1339673413 begin to download photo : 1339673429 download finish for photo 1339673402 begin to download photo : 1339673406 download finish for photo 1339673437 begin to download photo : 1339673440 download finish for photo 1339673360 begin to download photo : 1339673396 download finish for photo 1339673336 begin to download photo : 1339673346 download finish for photo 1339673429 begin to download photo : 1339673434 download finish for photo 1339673396 begin to download photo : 1339673399 download finish for photo 1339673406 begin to download photo : 1339673411 download finish for photo 1339673346 begin to download photo : 1339673355 download finish for photo 1339673440 download finish for photo 1339673434 download finish for photo 1339673399 download finish for photo 1339673411 download finish for photo 1339673355 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette208244731740546300/ imagette208244751740546300/ imagette208244771740546300/ imagette208244801740546300/ imagette208244811740546300/ imagette208244831740546300/ imagette208244841740546300/ imagette208244741740546300/ imagette208244761740546300/ imagette208244821740546300/ length of list_filenames : 14 ; length of list_pids : 14 ; length of list_args : 14 results_Auto_P20824472_26-02-2025_06_05_00.pdf 20824473 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=20824473 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette208244731740546300 20824475 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=20824475 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette208244751740546300 20824477 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=20824477 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette208244771740546300 20824480 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=20824480 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette208244801740546300 20824481 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=20824481 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette208244811740546300 20824483 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=20824483 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette208244831740546300 20824484 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=20824484 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette208244841740546300 20824474 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=20824474 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette208244741740546300 20824476 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=20824476 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette208244761740546300 20824482 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=20824482 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette208244821740546300 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=20824472 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/20824485,20824486,20824487,20824488,20824489,20824490,20824491,20824492,20824493,20824494,20824495,20824496?tags=flou,Carton_brun,autre_refus,Carton_gris,kraft,papier,environnement,cartonnette,metal,Teint_Dans_La_Masse,mal_croppe,plastique your option no_mail is active, we will not send the real mail to your client args[1339673440] : ('0.0',) no score found for photo 1339673440 We are sending mail with results at report@fotonower.com args[1339673437] : ('0.0',) no score found for photo 1339673437 We are sending mail with results at report@fotonower.com args[1339673434] : ('0.0',) no score found for photo 1339673434 We are sending mail with results at report@fotonower.com args[1339673429] : ('0.0',) no score found for photo 1339673429 We are sending mail with results at report@fotonower.com args[1339673413] : ('0.0',) no score found for photo 1339673413 We are sending mail with results at report@fotonower.com args[1339673411] : ('0.0',) no score found for photo 1339673411 We are sending mail with results at report@fotonower.com args[1339673406] : ('0.0',) no score found for photo 1339673406 We are sending mail with results at report@fotonower.com args[1339673402] : ('0.0',) no score found for photo 1339673402 We are sending mail with results at report@fotonower.com args[1339673399] : ('0.0',) no score found for photo 1339673399 We are sending mail with results at report@fotonower.com args[1339673396] : ('0.0',) no score found for photo 1339673396 We are sending mail with results at report@fotonower.com args[1339673360] : ('0.0',) no score found for photo 1339673360 We are sending mail with results at report@fotonower.com args[1339673355] : ('0.0',) no score found for photo 1339673355 We are sending mail with results at report@fotonower.com args[1339673346] : ('0.0',) no score found for photo 1339673346 We are sending mail with results at report@fotonower.com args[1339673336] : ('0.0',) no score found for photo 1339673336 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=20824472 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_P20824472_26-02-2025_06_05_00.pdf results_Auto_P20824472_26-02-2025_06_05_00.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20824472_26-02-2025_06_05_00.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','20824472','results_Auto_P20824472_26-02-2025_06_05_00.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20824472_26-02-2025_06_05_00.pdf','pdf','','0.13','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20824472]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1339673440, 1339673437, 1339673434, 1339673429, 1339673413, 1339673411, 1339673406, 1339673402, 1339673399, 1339673396, 1339673360, 1339673355, 1339673346, 1339673336] map_info['map_portfolio_photo'] : {20824472: [1339673440, 1339673437, 1339673434, 1339673429, 1339673413, 1339673411, 1339673406, 1339673402, 1339673399, 1339673396, 1339673360, 1339673355, 1339673346, 1339673336]} final : False mtd_id 4302 list_pids : [1339673440, 1339673437, 1339673434, 1339673429, 1339673413, 1339673411, 1339673406, 1339673402, 1339673399, 1339673396, 1339673360, 1339673355, 1339673346, 1339673336] 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, '2614764') ('4302', '20824472', '1339673440', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673437', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673434', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673429', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673413', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673411', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673406', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673402', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673399', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673396', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673360', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673355', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673346', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673336', None, None, None, None, None, '2614764') 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', '20824472', '1339673440', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673437', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673434', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673429', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673413', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673411', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673406', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673402', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673399', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673396', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673360', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673355', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673346', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673336', None, None, None, None, None, '2614764')] time used for this insertion : 0.013961076736450195 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.6030094623565674 time spend to save output : 0.014293432235717773 total time spend for step 4 : 1.6173028945922852 step5:split_time_score Wed Feb 26 06:05: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 complete output_args for input 0 : ['20824472'] 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 : [('20824472',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20824472) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1339673437: {'path': 'temp/1740546300_543098_1339673437_2e47458209e0143efbf34e68ea4fa68c.jpg', 'extension': 'jpg'}, 1339673440: {'path': 'temp/1740546300_543098_1339673440_e0f21d89c8140c385622ea649ccc9bc5.jpg', 'extension': 'jpg'}, 1339673413: {'path': 'temp/1740546300_543098_1339673413_9aeecf25b1e6930ed71bc9f53f4ecc94.jpg', 'extension': 'jpg'}, 1339673429: {'path': 'temp/1740546300_543098_1339673429_b069347e295990d96f638e54576fd24f.jpg', 'extension': 'jpg'}, 1339673434: {'path': 'temp/1740546300_543098_1339673434_3be2bd49f14d4fcda6e3115827943a3b.jpg', 'extension': 'jpg'}, 1339673360: {'path': 'temp/1740546300_543098_1339673360_866254096eda2c6a5bc6ceaa7ac04b54.jpg', 'extension': 'jpg'}, 1339673396: {'path': 'temp/1740546300_543098_1339673396_13ba9c2ee055d23a35433a3a72fc4150.jpg', 'extension': 'jpg'}, 1339673399: {'path': 'temp/1740546300_543098_1339673399_c29a62c85b95c903ce517fcc16c17003.jpg', 'extension': 'jpg'}, 1339673402: {'path': 'temp/1740546300_543098_1339673402_2de10eefdd74f832b6a96bb6e779f408.jpg', 'extension': 'jpg'}, 1339673406: {'path': 'temp/1740546300_543098_1339673406_7cb14927bec2dfe51746f73f3f0ce8d6.jpg', 'extension': 'jpg'}, 1339673411: {'path': 'temp/1740546300_543098_1339673411_571e62dd38b08a14b53c3390a8642201.jpg', 'extension': 'jpg'}, 1339673336: {'path': 'temp/1740546300_543098_1339673336_4f045c56a9cff22576a1d640e303ed8b.jpg', 'extension': 'jpg'}, 1339673346: {'path': 'temp/1740546300_543098_1339673346_ae184fc55d33b762e72b38972681a64a.jpg', 'extension': 'jpg'}, 1339673355: {'path': 'temp/1740546300_543098_1339673355_b1b893553d7f6390cd2bb420e6936337.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 = 20824472; (('arc_en_ciel_jrm',),) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 20824472 group by h (('06', 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=20824472 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 (20824472) 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 (20824472) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 26022025 20824472 Nombre de photos uploadées : 14 / 23040 (0%) 26022025 20824472 Nombre de photos taguées (types de déchets): 0 / 14 (0%) 26022025 20824472 Nombre de photos taguées (volume) : 0 / 14 (0%) [{'photo_id': 1339673360, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/26/866254096eda2c6a5bc6ceaa7ac04b54.jpg', 'username': None, 'uploaded_at': 1740546095, 'text': 'image_26022025_06_00_04_10138.jpg'}, {'photo_id': 1339673355, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/26/b1b893553d7f6390cd2bb420e6936337.jpg', 'username': None, 'uploaded_at': 1740546095, 'text': 'image_26022025_06_00_14_10136.jpg'}, {'photo_id': 1339673346, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/26/ae184fc55d33b762e72b38972681a64a.jpg', 'username': None, 'uploaded_at': 1740546095, 'text': 'image_26022025_06_00_24_10135.jpg'}, {'photo_id': 1339673336, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/26/4f045c56a9cff22576a1d640e303ed8b.jpg', 'username': None, 'uploaded_at': 1740546095, 'text': 'image_26022025_06_00_33_9128.jpg'}] 0 [] elapsed_time : load_data_split_time_score 2.1457672119140625e-06 elapsed_time : order_list_meta_photo_and_scores 1.239776611328125e-05 ?????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0009970664978027344 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 20824472, '2025-02-26' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1624425,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.022961854934692383 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= 1624425 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1624425, 'dashboard_run_id': 1632472, 'mtr_portfolio_id': 20823244, 'dashboard_result_id': 9063329, '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_P20823244_26-02-2025_05_32_29.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20823269, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20823270, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20823271, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20823272, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20823273, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20823274, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20823275, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20823276, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20823277, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20823278, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20823279, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20823280, 'pht': 3726}}"}, {'dashboat_entry_day': 1624425, 'dashboard_run_id': 1632472, 'mtr_portfolio_id': 20823623, 'dashboard_result_id': 9063330, '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_P20823623_26-02-2025_05_48_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20823624, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20823625, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20823626, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20823627, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20823628, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20823629, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20823630, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20823631, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20823632, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20823633, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20823634, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20823635, 'pht': 3726}}"}, {'dashboat_entry_day': 1624425, 'dashboard_run_id': 1632472, 'mtr_portfolio_id': 20823915, 'dashboard_result_id': 9063331, '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_P20823915_26-02-2025_06_00_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20823966, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20823967, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20823968, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20823969, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20823970, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20823971, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20823972, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20823973, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20823974, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20823975, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20823976, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20823977, 'pht': 3726}}"}, {'dashboat_entry_day': 1624425, 'dashboard_run_id': 1632472, 'mtr_portfolio_id': 20824472, 'dashboard_result_id': 9063332, '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 = 20823244 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': 2614611, 'mtr_portfolio_id': 20823244, 'created_at': datetime.datetime(2025, 2, 26, 5, 32, 29), 'result': '0.10682187809457622', 'result_long': None, 'result_double': None}] Qualite : 0.10682187809457622 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20823244 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20823244_26-02-2025_05_32_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20823244 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_P20823244_26-02-2025_05_32_29.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20823269, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20823270, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20823271, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20823272, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20823273, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20823274, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20823275, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20823276, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20823277, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20823278, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20823279, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20823280, 'pht': 3726}}" where mtr_portfolio_id = 20823244 and dashboard_run_id = 1632472 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`=20823244 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9063329, 0.10682187809457622, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20823244_26-02-2025_05_32_29.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20823269, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20823270, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20823271, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20823272, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20823273, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20823274, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20823275, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20823276, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20823277, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20823278, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20823279, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20823280, '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 = 20823623 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': 2614634, 'mtr_portfolio_id': 20823623, 'created_at': datetime.datetime(2025, 2, 26, 5, 48, 58), 'result': '0.09248779747633946', 'result_long': None, 'result_double': None}] Qualite : 0.09248779747633946 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20823623 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20823623_26-02-2025_05_48_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20823623 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_P20823623_26-02-2025_05_48_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20823624, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20823625, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20823626, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20823627, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20823628, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20823629, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20823630, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20823631, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20823632, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20823633, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20823634, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20823635, 'pht': 3726}}" where mtr_portfolio_id = 20823623 and dashboard_run_id = 1632472 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`=20823623 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9063330, 0.09248779747633946, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20823623_26-02-2025_05_48_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20823624, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20823625, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20823626, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20823627, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20823628, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20823629, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20823630, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20823631, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20823632, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20823633, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20823634, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20823635, '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 = 20823915 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': 2614722, 'mtr_portfolio_id': 20823915, 'created_at': datetime.datetime(2025, 2, 26, 6, 0, 57), 'result': '0.08789796612279598', 'result_long': None, 'result_double': None}] Qualite : 0.08789796612279598 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20823915 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20823915_26-02-2025_06_00_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20823915 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_P20823915_26-02-2025_06_00_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20823966, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20823967, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20823968, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20823969, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20823970, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20823971, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20823972, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20823973, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20823974, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20823975, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20823976, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20823977, 'pht': 3726}}" where mtr_portfolio_id = 20823915 and dashboard_run_id = 1632472 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`=20823915 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9063331, 0.08789796612279598, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20823915_26-02-2025_06_00_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20823966, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20823967, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20823968, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20823969, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20823970, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20823971, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20823972, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20823973, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20823974, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20823975, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20823976, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20823977, '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 = 20824472 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 = 20824472 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 = 20824472 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 20824472 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 = 20824472 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 = 20824472 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20824472_26-02-2025_06_05_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20824472 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_P20824472_26-02-2025_06_05_00.pdf'}" where mtr_portfolio_id = 20824472 and dashboard_run_id = 1632472 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20823244,20823623,20823915,20824472) result : ((1339669782,), (1339669998,), (1339670070,), (1339670074,), (1339670078,), (1339670080,), (1339670091,), (1339670094,), (1339670097,), (1339670102,), (1339670106,), (1339670108,), (1339670115,), (1339670118,), (1339670121,), (1339670131,), (1339670133,), (1339670151,), (1339670157,), (1339670160,), (1339670162,), (1339670180,), (1339670197,), (1339670203,), (1339670207,), (1339670289,), (1339670291,), (1339670293,), (1339670300,), (1339670324,), (1339670388,), (1339670427,), (1339670430,), (1339670432,), (1339670435,), (1339670438,), (1339670444,), (1339670447,), (1339670459,), (1339670467,), (1339670469,), (1339670481,), (1339670486,), (1339670490,), (1339670493,), (1339670523,), (1339670549,), (1339670552,), (1339670554,), (1339670557,), (1339670567,), (1339670570,), (1339670573,), (1339670575,), (1339670577,), (1339670579,), (1339670588,), (1339670592,), (1339670594,), (1339670597,), (1339670599,), (1339670612,), (1339670615,), (1339670618,), (1339670620,), (1339670623,), (1339670633,), (1339670639,), (1339670645,), (1339670649,), (1339670651,), (1339670683,), (1339670672,), (1339670674,), (1339670677,), (1339670679,), (1339670699,), (1339670706,), (1339670709,), (1339670712,), (1339670729,), (1339670732,), (1339670735,), (1339670738,), (1339670777,), (1339670800,), (1339671343,), (1339671346,), (1339671349,), (1339671353,), (1339671361,), (1339671625,), (1339671628,), (1339671631,), (1339671633,), (1339671643,), (1339671651,), (1339671662,), (1339671665,), (1339671668,), (1339671671,), (1339671673,), (1339671690,), (1339671693,), (1339671695,), (1339671698,), (1339671701,), (1339671703,), (1339672083,), (1339672087,), (1339672091,), (1339672094,), (1339672101,), (1339672104,), (1339672107,), (1339672109,), (1339672112,), (1339672114,), (1339672121,), (1339672124,), (1339672127,), (1339672157,), (1339672136,), (1339672139,), (1339672141,), (1339672144,), (1339672148,), (1339672167,), (1339672169,), (1339672172,), (1339672174,), (1339672188,), (1339672191,), (1339672194,), (1339672197,), (1339672199,), (1339672203,), (1339672219,), (1339672223,), (1339672230,), (1339672237,), (1339672240,), (1339672284,), (1339672287,), (1339672290,), (1339672293,), (1339672301,), (1339672306,), (1339672354,), (1339672357,), (1339672360,), (1339672362,), (1339672371,), (1339672374,), (1339672376,), (1339672379,), (1339672411,), (1339672414,), (1339672417,), (1339672420,), (1339672423,), (1339672425,), (1339672451,), (1339672455,), (1339672457,), (1339672460,), (1339672576,), (1339672579,), (1339672583,), (1339672595,), (1339672665,), (1339672745,), (1339673187,), (1339673190,), (1339673222,), (1339673247,), (1339673250,), (1339673253,), (1339673282,), (1339673285,), (1339673308,), (1339673311,), (1339673313,), (1339673316,), (1339673318,), (1339673320,), (1339673325,), (1339673327,), (1339673329,), (1339673331,), (1339673363,), (1339673336,), (1339673346,), (1339673355,), (1339673360,), (1339673396,), (1339673399,), (1339673402,), (1339673406,), (1339673411,), (1339673413,), (1339673429,), (1339673434,), (1339673437,), (1339673440,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'26022025': {'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([20824472]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1339673440, 1339673437, 1339673434, 1339673429, 1339673413, 1339673411, 1339673406, 1339673402, 1339673399, 1339673396, 1339673360, 1339673355, 1339673346, 1339673336] map_info['map_portfolio_photo'] : {20824472: [1339673440, 1339673437, 1339673434, 1339673429, 1339673413, 1339673411, 1339673406, 1339673402, 1339673399, 1339673396, 1339673360, 1339673355, 1339673346, 1339673336]} final : True mtd_id 4302 list_pids : [1339673440, 1339673437, 1339673434, 1339673429, 1339673413, 1339673411, 1339673406, 1339673402, 1339673399, 1339673396, 1339673360, 1339673355, 1339673346, 1339673336] Looping around the photos to save general results len do output : 1 /20824472Didn'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, '2614764') ('4302', '20824472', '1339673440', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673437', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673434', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673429', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673413', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673411', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673406', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673402', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673399', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673396', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673360', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673355', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673346', None, None, None, None, None, '2614764') ('4302', None, None, None, None, None, None, None, '2614764') ('4302', '20824472', '1339673336', None, None, None, None, None, '2614764') 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, '20824472', 'None', None, None, None, None, '2614764'), ('4302', '20824472', '1339673440', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673437', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673434', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673429', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673413', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673411', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673406', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673402', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673399', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673396', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673360', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673355', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673346', None, None, None, None, None, '2614764'), ('4302', '20824472', '1339673336', None, None, None, None, None, '2614764')] time used for this insertion : 0.01849055290222168 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.30928802490234375 time spend to save output : 0.018748998641967773 total time spend for step 5 : 0.3280370235443115 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 (2614764) 2.25user 2.54system 0:07.68elapsed 62%CPU (0avgtext+0avgdata 161688maxresident)k 320inputs+8200outputs (14major+64282minor)pagefaults 0swaps