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 : 19725 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 (4191180) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (4191180) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29228704 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['4191180'] with mtr_portfolio_ids : ['29228704'] and first list_photo_ids : [] new path : /proc/19725/ Name: python3 Umask: 0002 State: R (running) Tgid: 19725 Ngid: 0 Pid: 19725 PPid: 19724 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 19725 NSpid: 19725 NSpgid: 18189 NSsid: 18189 VmPeak: 1113364 kB VmSize: 1113364 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 106884 kB VmRSS: 106884 kB RssAnon: 66292 kB RssFile: 40592 kB RssShmem: 0 kB VmData: 872092 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130476 kB VmPTE: 608 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 49 nonvoluntary_ctxt_switches: 95 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '19725', 'Ngid': '0', 'Pid': '19725', 'PPid': '19724', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '19725', 'NSpid': '19725', 'NSpgid': '18189', 'NSsid': '18189', 'VmPeak': '1113364 kB', 'VmSize': '1113364 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '106884 kB', 'VmRSS': '106884 kB', 'RssAnon': '66292 kB', 'RssFile': '40592 kB', 'RssShmem': '0 kB', 'VmData': '872092 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130476 kB', 'VmPTE': '608 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '49', 'nonvoluntary_ctxt_switches': '95'} ('datou_batch_current', '19725', '1113364', '0', '1113364', '872092', '106884', b'', 'marlene', '4191180') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos_view ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (29228704) 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 (4191180 ) ) 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 (29228704) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1398098668, 'portfolio_id': 29228704}, {'photo_id': 1398098666, 'portfolio_id': 29228704}, {'photo_id': 1398098664, 'portfolio_id': 29228704}, {'photo_id': 1398098662, 'portfolio_id': 29228704}, {'photo_id': 1398098630, 'portfolio_id': 29228704}, {'photo_id': 1398098627, 'portfolio_id': 29228704}, {'photo_id': 1398098624, 'portfolio_id': 29228704}, {'photo_id': 1398098591, 'portfolio_id': 29228704}, {'photo_id': 1398098588, 'portfolio_id': 29228704}, {'photo_id': 1398098585, 'portfolio_id': 29228704}, {'photo_id': 1398098584, 'portfolio_id': 29228704}, {'photo_id': 1398098548, 'portfolio_id': 29228704}, {'photo_id': 1398098542, 'portfolio_id': 29228704}, {'photo_id': 1398098443, 'portfolio_id': 29228704}] map_portfolio_id_photo_id: {29228704: [1398098668, 1398098666, 1398098664, 1398098662, 1398098630, 1398098627, 1398098624, 1398098591, 1398098588, 1398098585, 1398098584, 1398098548, 1398098542, 1398098443]} ##### 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.017050504684448242 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Fri Dec 5 15:38:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29228704) 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 : 29228704 get user id for portfolio 29228704 get sub ptf for main ptf 29228704, type 3726 and hashtags ['plastique', 'autre_refus', 'Carton_gris', 'mal_croppe', 'flou', 'Carton_brun', 'environnement', 'kraft', 'Teint_Dans_La_Masse', 'papier', 'cartonnette', 'metal'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=29228704 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','autre_refus','Carton_gris','mal_croppe','flou','Carton_brun','environnement','kraft','Teint_Dans_La_Masse','papier','cartonnette','metal')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=29228704 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','autre_refus','Carton_gris','mal_croppe','flou','Carton_brun','environnement','kraft','Teint_Dans_La_Masse','papier','cartonnette','metal')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__05122025_15_32_44_010143_3726_plastique_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__05122025_15_32_44_010143_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__05122025_15_32_44_010143_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__05122025_15_32_44_010143_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__05122025_15_32_44_010143_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__05122025_15_32_44_010143_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__05122025_15_32_44_010143_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__05122025_15_32_44_010143_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__05122025_15_32_44_010143_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__05122025_15_32_44_010143_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__05122025_15_32_44_010143_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__05122025_15_32_44_010143_3726_metal_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio INSERT IGNORE INTO MTRPhoto.mtr_port_to_port_ids (`mtr_portfolio_id_1`, `mtr_portfolio_id_2`, `type`, `min_score`, `hashtag_id`, `mtr_user_id`) VALUES (%s,%s,%s,%s,%s,%s)[[29228704, 29228708, 3726, 0.5, 492725882, 979], [29228704, 29228709, 3726, 0.5, 2107752406, 979], [29228704, 29228710, 3726, 0.5, 2107753020, 979], [29228704, 29228711, 3726, 0.5, 2107755527, 979], [29228704, 29228712, 3726, 0.5, 492777938, 979], [29228704, 29228713, 3726, 0.5, 2107753024, 979], [29228704, 29228714, 3726, 0.5, 493012381, 979], [29228704, 29228715, 3726, 0.5, 493202403, 979], [29228704, 29228716, 3726, 0.5, 2107752385, 979], [29228704, 29228717, 3726, 0.5, 492668766, 979], [29228704, 29228718, 3726, 0.5, 702398920, 979], [29228704, 29228719, 3726, 0.5, 492628673, 979]] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=29228704 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','autre_refus','Carton_gris','mal_croppe','flou','Carton_brun','environnement','kraft','Teint_Dans_La_Masse','papier','cartonnette','metal')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=29228704 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','autre_refus','Carton_gris','mal_croppe','flou','Carton_brun','environnement','kraft','Teint_Dans_La_Masse','papier','cartonnette','metal')) AND mptpi.`min_score`=0.5 To do returned map {'plastique': {'main_port_id': 29228704, 'sub_port_id': 29228708, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19881172, 'last_updated_at': datetime.datetime(2025, 12, 5, 15, 38, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 5, 15, 38, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 5, 15, 38, 58)}, 'autre_refus': {'main_port_id': 29228704, 'sub_port_id': 29228709, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19881173, 'last_updated_at': datetime.datetime(2025, 12, 5, 15, 38, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 5, 15, 38, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 5, 15, 38, 58)}, 'Carton_gris': {'main_port_id': 29228704, 'sub_port_id': 29228710, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19881174, 'last_updated_at': datetime.datetime(2025, 12, 5, 15, 38, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 5, 15, 38, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 5, 15, 38, 58)}, 'mal_croppe': {'main_port_id': 29228704, 'sub_port_id': 29228711, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19881175, 'last_updated_at': datetime.datetime(2025, 12, 5, 15, 38, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 5, 15, 38, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 5, 15, 38, 58)}, 'flou': {'main_port_id': 29228704, 'sub_port_id': 29228712, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19881176, 'last_updated_at': datetime.datetime(2025, 12, 5, 15, 38, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 5, 15, 38, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 5, 15, 38, 58)}, 'Carton_brun': {'main_port_id': 29228704, 'sub_port_id': 29228713, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19881177, 'last_updated_at': datetime.datetime(2025, 12, 5, 15, 38, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 5, 15, 38, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 5, 15, 38, 58)}, 'environnement': {'main_port_id': 29228704, 'sub_port_id': 29228714, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19881178, 'last_updated_at': datetime.datetime(2025, 12, 5, 15, 38, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 5, 15, 38, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 5, 15, 38, 58)}, 'kraft': {'main_port_id': 29228704, 'sub_port_id': 29228715, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19881179, 'last_updated_at': datetime.datetime(2025, 12, 5, 15, 38, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 5, 15, 38, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 5, 15, 38, 58)}, 'Teint_Dans_La_Masse': {'main_port_id': 29228704, 'sub_port_id': 29228716, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19881180, 'last_updated_at': datetime.datetime(2025, 12, 5, 15, 38, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 5, 15, 38, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 5, 15, 38, 58)}, 'papier': {'main_port_id': 29228704, 'sub_port_id': 29228717, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19881181, 'last_updated_at': datetime.datetime(2025, 12, 5, 15, 38, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 5, 15, 38, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 5, 15, 38, 58)}, 'cartonnette': {'main_port_id': 29228704, 'sub_port_id': 29228718, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19881182, 'last_updated_at': datetime.datetime(2025, 12, 5, 15, 38, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 5, 15, 38, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 5, 15, 38, 58)}, 'metal': {'main_port_id': 29228704, 'sub_port_id': 29228719, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19881183, 'last_updated_at': datetime.datetime(2025, 12, 5, 15, 38, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 5, 15, 38, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 5, 15, 38, 58)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 29228708 , 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=29228704 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 (29228708) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29228704) result : ((1398098443,), (1398098542,), (1398098548,), (1398098584,), (1398098585,), (1398098588,), (1398098591,), (1398098624,), (1398098627,), (1398098630,), (1398098662,), (1398098664,), (1398098666,), (1398098668,)) 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 29228709 , 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=29228704 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 (29228709) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29228704) result : ((1398098443,), (1398098542,), (1398098548,), (1398098584,), (1398098585,), (1398098588,), (1398098591,), (1398098624,), (1398098627,), (1398098630,), (1398098662,), (1398098664,), (1398098666,), (1398098668,)) 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 29228710 , 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=29228704 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 (29228710) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29228704) result : ((1398098443,), (1398098542,), (1398098548,), (1398098584,), (1398098585,), (1398098588,), (1398098591,), (1398098624,), (1398098627,), (1398098630,), (1398098662,), (1398098664,), (1398098666,), (1398098668,)) 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 29228711 , 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=29228704 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 (29228711) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29228704) result : ((1398098443,), (1398098542,), (1398098548,), (1398098584,), (1398098585,), (1398098588,), (1398098591,), (1398098624,), (1398098627,), (1398098630,), (1398098662,), (1398098664,), (1398098666,), (1398098668,)) 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 29228712 , 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=29228704 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 (29228712) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29228704) result : ((1398098443,), (1398098542,), (1398098548,), (1398098584,), (1398098585,), (1398098588,), (1398098591,), (1398098624,), (1398098627,), (1398098630,), (1398098662,), (1398098664,), (1398098666,), (1398098668,)) 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 29228713 , 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=29228704 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 (29228713) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29228704) result : ((1398098443,), (1398098542,), (1398098548,), (1398098584,), (1398098585,), (1398098588,), (1398098591,), (1398098624,), (1398098627,), (1398098630,), (1398098662,), (1398098664,), (1398098666,), (1398098668,)) 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 29228714 , 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=29228704 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 (29228714) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29228704) result : ((1398098443,), (1398098542,), (1398098548,), (1398098584,), (1398098585,), (1398098588,), (1398098591,), (1398098624,), (1398098627,), (1398098630,), (1398098662,), (1398098664,), (1398098666,), (1398098668,)) 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 29228715 , 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=29228704 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 (29228715) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29228704) result : ((1398098443,), (1398098542,), (1398098548,), (1398098584,), (1398098585,), (1398098588,), (1398098591,), (1398098624,), (1398098627,), (1398098630,), (1398098662,), (1398098664,), (1398098666,), (1398098668,)) 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 29228716 , 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=29228704 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 (29228716) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29228704) result : ((1398098443,), (1398098542,), (1398098548,), (1398098584,), (1398098585,), (1398098588,), (1398098591,), (1398098624,), (1398098627,), (1398098630,), (1398098662,), (1398098664,), (1398098666,), (1398098668,)) 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 29228717 , 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=29228704 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 (29228717) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29228704) result : ((1398098443,), (1398098542,), (1398098548,), (1398098584,), (1398098585,), (1398098588,), (1398098591,), (1398098624,), (1398098627,), (1398098630,), (1398098662,), (1398098664,), (1398098666,), (1398098668,)) 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 29228718 , 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=29228704 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 (29228718) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29228704) result : ((1398098443,), (1398098542,), (1398098548,), (1398098584,), (1398098585,), (1398098588,), (1398098591,), (1398098624,), (1398098627,), (1398098630,), (1398098662,), (1398098664,), (1398098666,), (1398098668,)) 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 29228719 , 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=29228704 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 (29228719) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29228704) result : ((1398098443,), (1398098542,), (1398098548,), (1398098584,), (1398098585,), (1398098588,), (1398098591,), (1398098624,), (1398098627,), (1398098630,), (1398098662,), (1398098664,), (1398098666,), (1398098668,)) 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`=29228704 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','autre_refus','Carton_gris','mal_croppe','flou','Carton_brun','environnement','kraft','Teint_Dans_La_Masse','papier','cartonnette','metal')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=29228704 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','autre_refus','Carton_gris','mal_croppe','flou','Carton_brun','environnement','kraft','Teint_Dans_La_Masse','papier','cartonnette','metal')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__05122025_15_32_44_010143_4417_plastique_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__05122025_15_32_44_010143_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__05122025_15_32_44_010143_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__05122025_15_32_44_010143_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__05122025_15_32_44_010143_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__05122025_15_32_44_010143_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__05122025_15_32_44_010143_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__05122025_15_32_44_010143_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__05122025_15_32_44_010143_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__05122025_15_32_44_010143_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__05122025_15_32_44_010143_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__05122025_15_32_44_010143_4417_metal_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio INSERT IGNORE INTO MTRPhoto.mtr_port_to_port_ids (`mtr_portfolio_id_1`, `mtr_portfolio_id_2`, `type`, `min_score`, `hashtag_id`, `mtr_user_id`) VALUES (%s,%s,%s,%s,%s,%s)[[29228704, 29228720, 4417, 0.5, 492725882, 979], [29228704, 29228721, 4417, 0.5, 2107752406, 979], [29228704, 29228722, 4417, 0.5, 2107753020, 979], [29228704, 29228723, 4417, 0.5, 2107755527, 979], [29228704, 29228724, 4417, 0.5, 492777938, 979], [29228704, 29228725, 4417, 0.5, 2107753024, 979], [29228704, 29228726, 4417, 0.5, 493012381, 979], [29228704, 29228727, 4417, 0.5, 493202403, 979], [29228704, 29228728, 4417, 0.5, 2107752385, 979], [29228704, 29228729, 4417, 0.5, 492668766, 979], [29228704, 29228730, 4417, 0.5, 702398920, 979], [29228704, 29228731, 4417, 0.5, 492628673, 979]] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=29228704 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','autre_refus','Carton_gris','mal_croppe','flou','Carton_brun','environnement','kraft','Teint_Dans_La_Masse','papier','cartonnette','metal')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=29228704 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','autre_refus','Carton_gris','mal_croppe','flou','Carton_brun','environnement','kraft','Teint_Dans_La_Masse','papier','cartonnette','metal')) AND mptpi.`min_score`=0.5 To do returned map {'plastique': {'main_port_id': 29228704, 'sub_port_id': 29228720, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19881184, 'last_updated_at': datetime.datetime(2025, 12, 5, 15, 39), 'last_updated_at_desc': datetime.datetime(2025, 12, 5, 15, 39), 'last_updated_at_asc': datetime.datetime(2025, 12, 5, 15, 39)}, 'autre_refus': {'main_port_id': 29228704, 'sub_port_id': 29228721, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19881185, 'last_updated_at': datetime.datetime(2025, 12, 5, 15, 39), 'last_updated_at_desc': datetime.datetime(2025, 12, 5, 15, 39), 'last_updated_at_asc': datetime.datetime(2025, 12, 5, 15, 39)}, 'Carton_gris': {'main_port_id': 29228704, 'sub_port_id': 29228722, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19881186, 'last_updated_at': datetime.datetime(2025, 12, 5, 15, 39), 'last_updated_at_desc': datetime.datetime(2025, 12, 5, 15, 39), 'last_updated_at_asc': datetime.datetime(2025, 12, 5, 15, 39)}, 'mal_croppe': {'main_port_id': 29228704, 'sub_port_id': 29228723, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19881187, 'last_updated_at': datetime.datetime(2025, 12, 5, 15, 39), 'last_updated_at_desc': datetime.datetime(2025, 12, 5, 15, 39), 'last_updated_at_asc': datetime.datetime(2025, 12, 5, 15, 39)}, 'flou': {'main_port_id': 29228704, 'sub_port_id': 29228724, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19881188, 'last_updated_at': datetime.datetime(2025, 12, 5, 15, 39), 'last_updated_at_desc': datetime.datetime(2025, 12, 5, 15, 39), 'last_updated_at_asc': datetime.datetime(2025, 12, 5, 15, 39)}, 'Carton_brun': {'main_port_id': 29228704, 'sub_port_id': 29228725, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19881189, 'last_updated_at': datetime.datetime(2025, 12, 5, 15, 39), 'last_updated_at_desc': datetime.datetime(2025, 12, 5, 15, 39), 'last_updated_at_asc': datetime.datetime(2025, 12, 5, 15, 39)}, 'environnement': {'main_port_id': 29228704, 'sub_port_id': 29228726, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19881190, 'last_updated_at': datetime.datetime(2025, 12, 5, 15, 39), 'last_updated_at_desc': datetime.datetime(2025, 12, 5, 15, 39), 'last_updated_at_asc': datetime.datetime(2025, 12, 5, 15, 39)}, 'kraft': {'main_port_id': 29228704, 'sub_port_id': 29228727, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19881191, 'last_updated_at': datetime.datetime(2025, 12, 5, 15, 39), 'last_updated_at_desc': datetime.datetime(2025, 12, 5, 15, 39), 'last_updated_at_asc': datetime.datetime(2025, 12, 5, 15, 39)}, 'Teint_Dans_La_Masse': {'main_port_id': 29228704, 'sub_port_id': 29228728, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19881192, 'last_updated_at': datetime.datetime(2025, 12, 5, 15, 39), 'last_updated_at_desc': datetime.datetime(2025, 12, 5, 15, 39), 'last_updated_at_asc': datetime.datetime(2025, 12, 5, 15, 39)}, 'papier': {'main_port_id': 29228704, 'sub_port_id': 29228729, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19881193, 'last_updated_at': datetime.datetime(2025, 12, 5, 15, 39), 'last_updated_at_desc': datetime.datetime(2025, 12, 5, 15, 39), 'last_updated_at_asc': datetime.datetime(2025, 12, 5, 15, 39)}, 'cartonnette': {'main_port_id': 29228704, 'sub_port_id': 29228730, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19881194, 'last_updated_at': datetime.datetime(2025, 12, 5, 15, 39), 'last_updated_at_desc': datetime.datetime(2025, 12, 5, 15, 39), 'last_updated_at_asc': datetime.datetime(2025, 12, 5, 15, 39)}, 'metal': {'main_port_id': 29228704, 'sub_port_id': 29228731, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19881195, 'last_updated_at': datetime.datetime(2025, 12, 5, 15, 39), 'last_updated_at_desc': datetime.datetime(2025, 12, 5, 15, 39), 'last_updated_at_asc': datetime.datetime(2025, 12, 5, 15, 39)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29228720,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29228708 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29228721,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29228709 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29228722,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29228710 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29228723,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29228711 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29228724,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29228712 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29228725,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29228713 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29228726,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29228714 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29228727,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29228715 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29228728,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29228716 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29228729,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29228717 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29228730,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29228718 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29228731,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29228719 lien utilise dans velours : https://marlene.fotonower.com/velours/29228720,29228721,29228722,29228723,29228724,29228725,29228726,29228727,29228728,29228729,29228730,29228731?tags=plastique,autre_refus,Carton_gris,mal_croppe,flou,Carton_brun,environnement,kraft,Teint_Dans_La_Masse,papier,cartonnette,metal After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29228704]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1398098668, 1398098666, 1398098664, 1398098662, 1398098630, 1398098627, 1398098624, 1398098591, 1398098588, 1398098585, 1398098584, 1398098548, 1398098542, 1398098443] map_info['map_portfolio_photo'] : {29228704: [1398098668, 1398098666, 1398098664, 1398098662, 1398098630, 1398098627, 1398098624, 1398098591, 1398098588, 1398098585, 1398098584, 1398098548, 1398098542, 1398098443]} final : False mtd_id 4302 list_pids : [1398098668, 1398098666, 1398098664, 1398098662, 1398098630, 1398098627, 1398098624, 1398098591, 1398098588, 1398098585, 1398098584, 1398098548, 1398098542, 1398098443] Looping around the photos to save general results len do output : 1 /29228704. 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, '4191180') ('4302', '29228704', '1398098668', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098666', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098664', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098662', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098630', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098627', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098624', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098591', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098588', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098585', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098584', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098548', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098542', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098443', None, None, None, None, None, '4191180') 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, '29228704', "{'plastique': 29228708, 'autre_refus': 29228709, 'Carton_gris': 29228710, 'mal_croppe': 29228711, 'flou': 29228712, 'Carton_brun': 29228713, 'environnement': 29228714, 'kraft': 29228715, 'Teint_Dans_La_Masse': 29228716, 'papier': 29228717, 'cartonnette': 29228718, 'metal': 29228719}", None, None, None, None, '4191180'), ('4302', '29228704', '1398098668', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098666', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098664', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098662', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098630', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098627', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098624', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098591', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098588', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098585', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098584', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098548', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098542', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098443', None, None, None, None, None, '4191180')] time used for this insertion : 0.018700838088989258 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.5447804927825928 time spend to save output : 0.018999814987182617 total time spend for step 1 : 2.5637803077697754 step2:final Fri Dec 5 15:39:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29228704) 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 29228704 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1398098591,1398098443,1398098588,1398098585,1398098584,1398098548,1398098542,1398098630,1398098627,1398098624,1398098668,1398098666,1398098664,1398098662); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29228704]) Inside saveOutput : final : False verbose : True original output for save of step final : {1398098668: ('0.0',), 1398098666: ('0.0',), 1398098664: ('0.0',), 1398098662: ('0.0',), 1398098630: ('0.0',), 1398098627: ('0.0',), 1398098624: ('0.0',), 1398098591: ('0.0',), 1398098588: ('0.0',), 1398098585: ('0.0',), 1398098584: ('0.0',), 1398098548: ('0.0',), 1398098542: ('0.0',), 1398098443: ('0.0',)} new output for save of step final : {1398098668: ('0.0',), 1398098666: ('0.0',), 1398098664: ('0.0',), 1398098662: ('0.0',), 1398098630: ('0.0',), 1398098627: ('0.0',), 1398098624: ('0.0',), 1398098591: ('0.0',), 1398098588: ('0.0',), 1398098585: ('0.0',), 1398098584: ('0.0',), 1398098548: ('0.0',), 1398098542: ('0.0',), 1398098443: ('0.0',)} [1398098668, 1398098666, 1398098664, 1398098662, 1398098630, 1398098627, 1398098624, 1398098591, 1398098588, 1398098585, 1398098584, 1398098548, 1398098542, 1398098443] map_info['map_portfolio_photo'] : {29228704: [1398098668, 1398098666, 1398098664, 1398098662, 1398098630, 1398098627, 1398098624, 1398098591, 1398098588, 1398098585, 1398098584, 1398098548, 1398098542, 1398098443]} final : False mtd_id 4302 list_pids : [1398098668, 1398098666, 1398098664, 1398098662, 1398098630, 1398098627, 1398098624, 1398098591, 1398098588, 1398098585, 1398098584, 1398098548, 1398098542, 1398098443] Looping around the photos to save general results len do output : 14 /1398098668.Didn't retrieve data . /1398098666.Didn't retrieve data . /1398098664.Didn't retrieve data . /1398098662.Didn't retrieve data . /1398098630.Didn't retrieve data . /1398098627.Didn't retrieve data . /1398098624.Didn't retrieve data . /1398098591.Didn't retrieve data . /1398098588.Didn't retrieve data . /1398098585.Didn't retrieve data . /1398098584.Didn't retrieve data . /1398098548.Didn't retrieve data . /1398098542.Didn't retrieve data . /1398098443.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, '4191180') ('4302', '29228704', '1398098668', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098666', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098664', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098662', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098630', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098627', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098624', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098591', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098588', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098585', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098584', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098548', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098542', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098443', None, None, None, None, None, '4191180') 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', '29228704', '1398098668', '0.0', None, None, None, None, '4191180'), ('4302', '29228704', '1398098666', '0.0', None, None, None, None, '4191180'), ('4302', '29228704', '1398098664', '0.0', None, None, None, None, '4191180'), ('4302', '29228704', '1398098662', '0.0', None, None, None, None, '4191180'), ('4302', '29228704', '1398098630', '0.0', None, None, None, None, '4191180'), ('4302', '29228704', '1398098627', '0.0', None, None, None, None, '4191180'), ('4302', '29228704', '1398098624', '0.0', None, None, None, None, '4191180'), ('4302', '29228704', '1398098591', '0.0', None, None, None, None, '4191180'), ('4302', '29228704', '1398098588', '0.0', None, None, None, None, '4191180'), ('4302', '29228704', '1398098585', '0.0', None, None, None, None, '4191180'), ('4302', '29228704', '1398098584', '0.0', None, None, None, None, '4191180'), ('4302', '29228704', '1398098548', '0.0', None, None, None, None, '4191180'), ('4302', '29228704', '1398098542', '0.0', None, None, None, None, '4191180'), ('4302', '29228704', '1398098443', '0.0', None, None, None, None, '4191180')] time used for this insertion : 0.01629948616027832 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.01714348793029785 time spend to save output : 0.016946792602539062 total time spend for step 2 : 0.034090280532836914 step3:velours_tree Fri Dec 5 15:39:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {29228704: [{'plastique': 29228708, 'autre_refus': 29228709, 'Carton_gris': 29228710, 'mal_croppe': 29228711, 'flou': 29228712, 'Carton_brun': 29228713, 'environnement': 29228714, 'kraft': 29228715, 'Teint_Dans_La_Masse': 29228716, 'papier': 29228717, 'cartonnette': 29228718, 'metal': 29228719}]} input_args_next_step : {29228704: ()} output_args : {29228704: [{'plastique': 29228708, 'autre_refus': 29228709, 'Carton_gris': 29228710, 'mal_croppe': 29228711, 'flou': 29228712, 'Carton_brun': 29228713, 'environnement': 29228714, 'kraft': 29228715, 'Teint_Dans_La_Masse': 29228716, 'papier': 29228717, 'cartonnette': 29228718, 'metal': 29228719}]} args : 29228704 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'plastique': 29228708, 'autre_refus': 29228709, 'Carton_gris': 29228710, 'mal_croppe': 29228711, 'flou': 29228712, 'Carton_brun': 29228713, 'environnement': 29228714, 'kraft': 29228715, 'Teint_Dans_La_Masse': 29228716, 'papier': 29228717, 'cartonnette': 29228718, 'metal': 29228719},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29228704) 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([29228704]) 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.24354887008666992 time spend to save output : 5.269050598144531e-05 total time spend for step 3 : 0.24360156059265137 step4:send_mail_cod Fri Dec 5 15:39:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1398098668: ('0.0',), 1398098666: ('0.0',), 1398098664: ('0.0',), 1398098662: ('0.0',), 1398098630: ('0.0',), 1398098627: ('0.0',), 1398098624: ('0.0',), 1398098591: ('0.0',), 1398098588: ('0.0',), 1398098585: ('0.0',), 1398098584: ('0.0',), 1398098548: ('0.0',), 1398098542: ('0.0',), 1398098443: ('0.0',)} input_args_next_step : {1398098668: ()} output_args : {1398098668: ('0.0',), 1398098666: ('0.0',), 1398098664: ('0.0',), 1398098662: ('0.0',), 1398098630: ('0.0',), 1398098627: ('0.0',), 1398098624: ('0.0',), 1398098591: ('0.0',), 1398098588: ('0.0',), 1398098585: ('0.0',), 1398098584: ('0.0',), 1398098548: ('0.0',), 1398098542: ('0.0',), 1398098443: ('0.0',)} args : 1398098668 depend.output_id : 0 input_args_next_step : {1398098668: ('0.0',), 1398098666: ()} output_args : {1398098668: ('0.0',), 1398098666: ('0.0',), 1398098664: ('0.0',), 1398098662: ('0.0',), 1398098630: ('0.0',), 1398098627: ('0.0',), 1398098624: ('0.0',), 1398098591: ('0.0',), 1398098588: ('0.0',), 1398098585: ('0.0',), 1398098584: ('0.0',), 1398098548: ('0.0',), 1398098542: ('0.0',), 1398098443: ('0.0',)} args : 1398098666 depend.output_id : 0 input_args_next_step : {1398098668: ('0.0',), 1398098666: ('0.0',), 1398098664: ()} output_args : {1398098668: ('0.0',), 1398098666: ('0.0',), 1398098664: ('0.0',), 1398098662: ('0.0',), 1398098630: ('0.0',), 1398098627: ('0.0',), 1398098624: ('0.0',), 1398098591: ('0.0',), 1398098588: ('0.0',), 1398098585: ('0.0',), 1398098584: ('0.0',), 1398098548: ('0.0',), 1398098542: ('0.0',), 1398098443: ('0.0',)} args : 1398098664 depend.output_id : 0 input_args_next_step : {1398098668: ('0.0',), 1398098666: ('0.0',), 1398098664: ('0.0',), 1398098662: ()} output_args : {1398098668: ('0.0',), 1398098666: ('0.0',), 1398098664: ('0.0',), 1398098662: ('0.0',), 1398098630: ('0.0',), 1398098627: ('0.0',), 1398098624: ('0.0',), 1398098591: ('0.0',), 1398098588: ('0.0',), 1398098585: ('0.0',), 1398098584: ('0.0',), 1398098548: ('0.0',), 1398098542: ('0.0',), 1398098443: ('0.0',)} args : 1398098662 depend.output_id : 0 input_args_next_step : {1398098668: ('0.0',), 1398098666: ('0.0',), 1398098664: ('0.0',), 1398098662: ('0.0',), 1398098630: ()} output_args : {1398098668: ('0.0',), 1398098666: ('0.0',), 1398098664: ('0.0',), 1398098662: ('0.0',), 1398098630: ('0.0',), 1398098627: ('0.0',), 1398098624: ('0.0',), 1398098591: ('0.0',), 1398098588: ('0.0',), 1398098585: ('0.0',), 1398098584: ('0.0',), 1398098548: ('0.0',), 1398098542: ('0.0',), 1398098443: ('0.0',)} args : 1398098630 depend.output_id : 0 input_args_next_step : {1398098668: ('0.0',), 1398098666: ('0.0',), 1398098664: ('0.0',), 1398098662: ('0.0',), 1398098630: ('0.0',), 1398098627: ()} output_args : {1398098668: ('0.0',), 1398098666: ('0.0',), 1398098664: ('0.0',), 1398098662: ('0.0',), 1398098630: ('0.0',), 1398098627: ('0.0',), 1398098624: ('0.0',), 1398098591: ('0.0',), 1398098588: ('0.0',), 1398098585: ('0.0',), 1398098584: ('0.0',), 1398098548: ('0.0',), 1398098542: ('0.0',), 1398098443: ('0.0',)} args : 1398098627 depend.output_id : 0 input_args_next_step : {1398098668: ('0.0',), 1398098666: ('0.0',), 1398098664: ('0.0',), 1398098662: ('0.0',), 1398098630: ('0.0',), 1398098627: ('0.0',), 1398098624: ()} output_args : {1398098668: ('0.0',), 1398098666: ('0.0',), 1398098664: ('0.0',), 1398098662: ('0.0',), 1398098630: ('0.0',), 1398098627: ('0.0',), 1398098624: ('0.0',), 1398098591: ('0.0',), 1398098588: ('0.0',), 1398098585: ('0.0',), 1398098584: ('0.0',), 1398098548: ('0.0',), 1398098542: ('0.0',), 1398098443: ('0.0',)} args : 1398098624 depend.output_id : 0 input_args_next_step : {1398098668: ('0.0',), 1398098666: ('0.0',), 1398098664: ('0.0',), 1398098662: ('0.0',), 1398098630: ('0.0',), 1398098627: ('0.0',), 1398098624: ('0.0',), 1398098591: ()} output_args : {1398098668: ('0.0',), 1398098666: ('0.0',), 1398098664: ('0.0',), 1398098662: ('0.0',), 1398098630: ('0.0',), 1398098627: ('0.0',), 1398098624: ('0.0',), 1398098591: ('0.0',), 1398098588: ('0.0',), 1398098585: ('0.0',), 1398098584: ('0.0',), 1398098548: ('0.0',), 1398098542: ('0.0',), 1398098443: ('0.0',)} args : 1398098591 depend.output_id : 0 input_args_next_step : {1398098668: ('0.0',), 1398098666: ('0.0',), 1398098664: ('0.0',), 1398098662: ('0.0',), 1398098630: ('0.0',), 1398098627: ('0.0',), 1398098624: ('0.0',), 1398098591: ('0.0',), 1398098588: ()} output_args : {1398098668: ('0.0',), 1398098666: ('0.0',), 1398098664: ('0.0',), 1398098662: ('0.0',), 1398098630: ('0.0',), 1398098627: ('0.0',), 1398098624: ('0.0',), 1398098591: ('0.0',), 1398098588: ('0.0',), 1398098585: ('0.0',), 1398098584: ('0.0',), 1398098548: ('0.0',), 1398098542: ('0.0',), 1398098443: ('0.0',)} args : 1398098588 depend.output_id : 0 input_args_next_step : {1398098668: ('0.0',), 1398098666: ('0.0',), 1398098664: ('0.0',), 1398098662: ('0.0',), 1398098630: ('0.0',), 1398098627: ('0.0',), 1398098624: ('0.0',), 1398098591: ('0.0',), 1398098588: ('0.0',), 1398098585: ()} output_args : {1398098668: ('0.0',), 1398098666: ('0.0',), 1398098664: ('0.0',), 1398098662: ('0.0',), 1398098630: ('0.0',), 1398098627: ('0.0',), 1398098624: ('0.0',), 1398098591: ('0.0',), 1398098588: ('0.0',), 1398098585: ('0.0',), 1398098584: ('0.0',), 1398098548: ('0.0',), 1398098542: ('0.0',), 1398098443: ('0.0',)} args : 1398098585 depend.output_id : 0 input_args_next_step : {1398098668: ('0.0',), 1398098666: ('0.0',), 1398098664: ('0.0',), 1398098662: ('0.0',), 1398098630: ('0.0',), 1398098627: ('0.0',), 1398098624: ('0.0',), 1398098591: ('0.0',), 1398098588: ('0.0',), 1398098585: ('0.0',), 1398098584: ()} output_args : {1398098668: ('0.0',), 1398098666: ('0.0',), 1398098664: ('0.0',), 1398098662: ('0.0',), 1398098630: ('0.0',), 1398098627: ('0.0',), 1398098624: ('0.0',), 1398098591: ('0.0',), 1398098588: ('0.0',), 1398098585: ('0.0',), 1398098584: ('0.0',), 1398098548: ('0.0',), 1398098542: ('0.0',), 1398098443: ('0.0',)} args : 1398098584 depend.output_id : 0 input_args_next_step : {1398098668: ('0.0',), 1398098666: ('0.0',), 1398098664: ('0.0',), 1398098662: ('0.0',), 1398098630: ('0.0',), 1398098627: ('0.0',), 1398098624: ('0.0',), 1398098591: ('0.0',), 1398098588: ('0.0',), 1398098585: ('0.0',), 1398098584: ('0.0',), 1398098548: ()} output_args : {1398098668: ('0.0',), 1398098666: ('0.0',), 1398098664: ('0.0',), 1398098662: ('0.0',), 1398098630: ('0.0',), 1398098627: ('0.0',), 1398098624: ('0.0',), 1398098591: ('0.0',), 1398098588: ('0.0',), 1398098585: ('0.0',), 1398098584: ('0.0',), 1398098548: ('0.0',), 1398098542: ('0.0',), 1398098443: ('0.0',)} args : 1398098548 depend.output_id : 0 input_args_next_step : {1398098668: ('0.0',), 1398098666: ('0.0',), 1398098664: ('0.0',), 1398098662: ('0.0',), 1398098630: ('0.0',), 1398098627: ('0.0',), 1398098624: ('0.0',), 1398098591: ('0.0',), 1398098588: ('0.0',), 1398098585: ('0.0',), 1398098584: ('0.0',), 1398098548: ('0.0',), 1398098542: ()} output_args : {1398098668: ('0.0',), 1398098666: ('0.0',), 1398098664: ('0.0',), 1398098662: ('0.0',), 1398098630: ('0.0',), 1398098627: ('0.0',), 1398098624: ('0.0',), 1398098591: ('0.0',), 1398098588: ('0.0',), 1398098585: ('0.0',), 1398098584: ('0.0',), 1398098548: ('0.0',), 1398098542: ('0.0',), 1398098443: ('0.0',)} args : 1398098542 depend.output_id : 0 input_args_next_step : {1398098668: ('0.0',), 1398098666: ('0.0',), 1398098664: ('0.0',), 1398098662: ('0.0',), 1398098630: ('0.0',), 1398098627: ('0.0',), 1398098624: ('0.0',), 1398098591: ('0.0',), 1398098588: ('0.0',), 1398098585: ('0.0',), 1398098584: ('0.0',), 1398098548: ('0.0',), 1398098542: ('0.0',), 1398098443: ()} output_args : {1398098668: ('0.0',), 1398098666: ('0.0',), 1398098664: ('0.0',), 1398098662: ('0.0',), 1398098630: ('0.0',), 1398098627: ('0.0',), 1398098624: ('0.0',), 1398098591: ('0.0',), 1398098588: ('0.0',), 1398098585: ('0.0',), 1398098584: ('0.0',), 1398098548: ('0.0',), 1398098542: ('0.0',), 1398098443: ('0.0',)} args : 1398098443 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 : {29228704: [{'plastique': 29228708, 'autre_refus': 29228709, 'Carton_gris': 29228710, 'mal_croppe': 29228711, 'flou': 29228712, 'Carton_brun': 29228713, 'environnement': 29228714, 'kraft': 29228715, 'Teint_Dans_La_Masse': 29228716, 'papier': 29228717, 'cartonnette': 29228718, 'metal': 29228719}]} input_args_next_step : {1398098668: ('0.0',), 1398098666: ('0.0',), 1398098664: ('0.0',), 1398098662: ('0.0',), 1398098630: ('0.0',), 1398098627: ('0.0',), 1398098624: ('0.0',), 1398098591: ('0.0',), 1398098588: ('0.0',), 1398098585: ('0.0',), 1398098584: ('0.0',), 1398098548: ('0.0',), 1398098542: ('0.0',), 1398098443: ('0.0',), 29228704: ()} output_args : {29228704: [{'plastique': 29228708, 'autre_refus': 29228709, 'Carton_gris': 29228710, 'mal_croppe': 29228711, 'flou': 29228712, 'Carton_brun': 29228713, 'environnement': 29228714, 'kraft': 29228715, 'Teint_Dans_La_Masse': 29228716, 'papier': 29228717, 'cartonnette': 29228718, 'metal': 29228719}]} args : 29228704 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 (29228704) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos_view ph WHERE photo_id IN (1398098668,1398098666,1398098664,1398098662,1398098630,1398098627,1398098624,1398098591,1398098588,1398098585,1398098584,1398098548,1398098542,1398098443) Found this number of photos: 14 ##### Call download_photos : nb_thread : 5 begin to download photo : 1398098443 begin to download photo : 1398098584 begin to download photo : 1398098591 begin to download photo : 1398098630 begin to download photo : 1398098666 download finish for photo 1398098630 begin to download photo : 1398098662 download finish for photo 1398098591 begin to download photo : 1398098624 download finish for photo 1398098443 begin to download photo : 1398098542 download finish for photo 1398098666 begin to download photo : 1398098668 download finish for photo 1398098584 begin to download photo : 1398098585 download finish for photo 1398098662 begin to download photo : 1398098664 download finish for photo 1398098668 download finish for photo 1398098624 begin to download photo : 1398098627 download finish for photo 1398098585 begin to download photo : 1398098588 download finish for photo 1398098542 begin to download photo : 1398098548 download finish for photo 1398098664 download finish for photo 1398098627 download finish for photo 1398098548 download finish for photo 1398098588 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette292287081764945541/ imagette292287091764945541/ imagette292287111764945541/ imagette292287121764945541/ imagette292287151764945541/ imagette292287181764945541/ imagette292287191764945541/ imagette292287101764945541/ imagette292287131764945541/ imagette292287161764945541/ length of list_filenames : 14 ; length of list_pids : 14 ; length of list_args : 14 results_Auto_P29228704_05-12-2025_15_39_01.pdf 29228708 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29228708 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette292287081764945541 29228709 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29228709 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette292287091764945541 29228711 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29228711 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette292287111764945541 29228712 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29228712 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette292287121764945541 29228715 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29228715 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette292287151764945541 29228718 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29228718 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette292287181764945541 29228719 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29228719 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette292287191764945541 29228710 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29228710 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette292287101764945541 29228713 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29228713 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette292287131764945541 29228716 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29228716 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette292287161764945541 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=29228704 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/29228720,29228721,29228722,29228723,29228724,29228725,29228726,29228727,29228728,29228729,29228730,29228731?tags=plastique,autre_refus,Carton_gris,mal_croppe,flou,Carton_brun,environnement,kraft,Teint_Dans_La_Masse,papier,cartonnette,metal your option no_mail is active, we will not send the real mail to your client args[1398098668] : ('0.0',) no score found for photo 1398098668 We are sending mail with results at report@fotonower.com args[1398098666] : ('0.0',) no score found for photo 1398098666 We are sending mail with results at report@fotonower.com args[1398098664] : ('0.0',) no score found for photo 1398098664 We are sending mail with results at report@fotonower.com args[1398098662] : ('0.0',) no score found for photo 1398098662 We are sending mail with results at report@fotonower.com args[1398098630] : ('0.0',) no score found for photo 1398098630 We are sending mail with results at report@fotonower.com args[1398098627] : ('0.0',) no score found for photo 1398098627 We are sending mail with results at report@fotonower.com args[1398098624] : ('0.0',) no score found for photo 1398098624 We are sending mail with results at report@fotonower.com args[1398098591] : ('0.0',) no score found for photo 1398098591 We are sending mail with results at report@fotonower.com args[1398098588] : ('0.0',) no score found for photo 1398098588 We are sending mail with results at report@fotonower.com args[1398098585] : ('0.0',) no score found for photo 1398098585 We are sending mail with results at report@fotonower.com args[1398098584] : ('0.0',) no score found for photo 1398098584 We are sending mail with results at report@fotonower.com args[1398098548] : ('0.0',) no score found for photo 1398098548 We are sending mail with results at report@fotonower.com args[1398098542] : ('0.0',) no score found for photo 1398098542 We are sending mail with results at report@fotonower.com args[1398098443] : ('0.0',) no score found for photo 1398098443 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_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29228704 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_P29228704_05-12-2025_15_39_01.pdf results_Auto_P29228704_05-12-2025_15_39_01.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29228704_05-12-2025_15_39_01.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','29228704','results_Auto_P29228704_05-12-2025_15_39_01.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29228704_05-12-2025_15_39_01.pdf','pdf','','0.13','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29228704]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1398098668, 1398098666, 1398098664, 1398098662, 1398098630, 1398098627, 1398098624, 1398098591, 1398098588, 1398098585, 1398098584, 1398098548, 1398098542, 1398098443] map_info['map_portfolio_photo'] : {29228704: [1398098668, 1398098666, 1398098664, 1398098662, 1398098630, 1398098627, 1398098624, 1398098591, 1398098588, 1398098585, 1398098584, 1398098548, 1398098542, 1398098443]} final : False mtd_id 4302 list_pids : [1398098668, 1398098666, 1398098664, 1398098662, 1398098630, 1398098627, 1398098624, 1398098591, 1398098588, 1398098585, 1398098584, 1398098548, 1398098542, 1398098443] 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, '4191180') ('4302', '29228704', '1398098668', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098666', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098664', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098662', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098630', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098627', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098624', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098591', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098588', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098585', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098584', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098548', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098542', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098443', None, None, None, None, None, '4191180') 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', '29228704', '1398098668', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098666', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098664', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098662', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098630', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098627', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098624', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098591', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098588', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098585', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098584', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098548', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098542', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098443', None, None, None, None, None, '4191180')] time used for this insertion : 0.01679062843322754 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.8804125785827637 time spend to save output : 0.01703953742980957 total time spend for step 4 : 1.8974521160125732 step5:split_time_score Fri Dec 5 15:39:02 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 : ['29228704'] 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 : [('29228704',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29228704) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1398098666: {'path': 'temp/1764945541_19725_1398098666_19409082b19cedb191dac4fefd18d2e8.jpg', 'extension': 'jpg'}, 1398098668: {'path': 'temp/1764945541_19725_1398098668_fa06b97861903ea671a11fdb6587e356.jpg', 'extension': 'jpg'}, 1398098630: {'path': 'temp/1764945541_19725_1398098630_8b68527bd19d1be6de28c79d6e2bc36c.jpg', 'extension': 'jpg'}, 1398098662: {'path': 'temp/1764945541_19725_1398098662_b3c4e2980c28327a9872fc668502e76d.jpg', 'extension': 'jpg'}, 1398098664: {'path': 'temp/1764945541_19725_1398098664_99d89cf030bc52f44686ef676783cc7f.jpg', 'extension': 'jpg'}, 1398098591: {'path': 'temp/1764945541_19725_1398098591_7d01dbeafc6d6be24b008dd9cd2740f1.jpg', 'extension': 'jpg'}, 1398098624: {'path': 'temp/1764945541_19725_1398098624_120f8838a5adaa1cc6d0633326ace0ea.jpg', 'extension': 'jpg'}, 1398098627: {'path': 'temp/1764945541_19725_1398098627_faf33e6936523c1236c0f907d438471c.jpg', 'extension': 'jpg'}, 1398098443: {'path': 'temp/1764945541_19725_1398098443_6f29db8b0a290eb6ecd6add5aabb48e5.jpg', 'extension': 'jpg'}, 1398098542: {'path': 'temp/1764945541_19725_1398098542_01e03a72afded9e988257e7e112ed727.jpg', 'extension': 'jpg'}, 1398098548: {'path': 'temp/1764945541_19725_1398098548_b137bcd10bf4fd02b61002913134b673.jpg', 'extension': 'jpg'}, 1398098584: {'path': 'temp/1764945541_19725_1398098584_433da9eb62eafb9b03f2ad74a32f3d3e.jpg', 'extension': 'jpg'}, 1398098585: {'path': 'temp/1764945541_19725_1398098585_3edb5a61218b4e69efa95f954efd3f60.jpg', 'extension': 'jpg'}, 1398098588: {'path': 'temp/1764945541_19725_1398098588_b747f46647a0d3f54200a8880882aa7b.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 = 29228704; (('arc_en_ciel_jrm_live',),) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos_view ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 29228704 group by h (('15', 14),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29228704 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 (29228704) 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 (29228704) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 05122025 29228704 Nombre de photos uploadées : 14 / 23040 (0%) 05122025 29228704 Nombre de photos taguées (types de déchets): 0 / 14 (0%) 05122025 29228704 Nombre de photos taguées (volume) : 0 / 14 (0%) [{'photo_id': 1398098591, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/5/7d01dbeafc6d6be24b008dd9cd2740f1.jpg', 'username': None, 'uploaded_at': 1764945367, 'text': 'image_05122025_15_32_44_10143.jpg'}, {'photo_id': 1398098443, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/5/6f29db8b0a290eb6ecd6add5aabb48e5.jpg', 'username': None, 'uploaded_at': 1764945248, 'text': 'image_05122025_15_33_03_10151.jpg'}, {'photo_id': 1398098588, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/5/b747f46647a0d3f54200a8880882aa7b.jpg', 'username': None, 'uploaded_at': 1764945367, 'text': 'image_05122025_15_35_04_10157.jpg'}, {'photo_id': 1398098585, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/5/3edb5a61218b4e69efa95f954efd3f60.jpg', 'username': None, 'uploaded_at': 1764945367, 'text': 'image_05122025_15_35_13_9128.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.6689300537109375e-06 elapsed_time : order_list_meta_photo_and_scores 4.5299530029296875e-06 ?????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0006811618804931641 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 218, 29228704, '2025-12-05' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 218 and date = '2025-12-05' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2697078,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.28810811042785645 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= 2697078 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2697078, 'dashboard_run_id': 2708265, 'mtr_portfolio_id': 29227102, 'dashboard_result_id': 18121427, '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_P29227102_05-12-2025_15_04_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29227110, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29227111, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29227112, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29227113, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29227114, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29227115, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29227116, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29227117, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29227118, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29227119, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29227120, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29227121, 'pht': 3726}}"}, {'dashboat_entry_day': 2697078, 'dashboard_run_id': 2708265, 'mtr_portfolio_id': 29227474, 'dashboard_result_id': 18121428, '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_P29227474_05-12-2025_15_18_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29227506, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29227507, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29227508, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29227509, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29227510, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29227511, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29227512, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29227513, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29227514, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29227515, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29227516, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29227517, 'pht': 3726}}"}, {'dashboat_entry_day': 2697078, 'dashboard_run_id': 2708265, 'mtr_portfolio_id': 29228095, 'dashboard_result_id': 18121429, '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_P29228095_05-12-2025_15_35_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 29228121, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29228122, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29228123, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29228124, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29228125, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29228126, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29228127, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29228128, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29228129, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29228130, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29228131, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29228132, 'pht': 3726}}"}, {'dashboat_entry_day': 2697078, 'dashboard_run_id': 2708265, 'mtr_portfolio_id': 29228704, 'dashboard_result_id': 18121430, '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 = 29227102 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': 4190961, 'mtr_portfolio_id': 29227102, 'created_at': datetime.datetime(2025, 12, 5, 15, 4, 59), 'result': '0.0609662418281561', 'result_long': None, 'result_double': None}] Qualite : 0.0609662418281561 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29227102 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29227102_05-12-2025_15_04_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29227102 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_P29227102_05-12-2025_15_04_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29227110, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29227111, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29227112, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29227113, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29227114, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29227115, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29227116, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29227117, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29227118, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29227119, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29227120, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29227121, 'pht': 3726}}" where mtr_portfolio_id = 29227102 and dashboard_run_id = 2708265 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`=29227102 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18121427, 0.0609662418281561, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29227102_05-12-2025_15_04_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29227110, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29227111, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29227112, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29227113, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29227114, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29227115, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29227116, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29227117, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29227118, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29227119, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29227120, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29227121, '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 = 29227474 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': 4191041, 'mtr_portfolio_id': 29227474, 'created_at': datetime.datetime(2025, 12, 5, 15, 18, 57), 'result': '0.03943726262312119', 'result_long': None, 'result_double': None}] Qualite : 0.03943726262312119 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29227474 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29227474_05-12-2025_15_18_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29227474 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_P29227474_05-12-2025_15_18_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29227506, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29227507, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29227508, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29227509, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29227510, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29227511, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29227512, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29227513, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29227514, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29227515, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29227516, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29227517, 'pht': 3726}}" where mtr_portfolio_id = 29227474 and dashboard_run_id = 2708265 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`=29227474 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18121428, 0.03943726262312119, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29227474_05-12-2025_15_18_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29227506, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29227507, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29227508, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29227509, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29227510, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29227511, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29227512, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29227513, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29227514, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29227515, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29227516, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29227517, '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 = 29228095 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': 4191109, 'mtr_portfolio_id': 29228095, 'created_at': datetime.datetime(2025, 12, 5, 15, 35), 'result': '0.043121215843922985', 'result_long': None, 'result_double': None}] Qualite : 0.043121215843922985 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29228095 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29228095_05-12-2025_15_35_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29228095 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_P29228095_05-12-2025_15_35_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 29228121, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29228122, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29228123, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29228124, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29228125, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29228126, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29228127, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29228128, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29228129, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29228130, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29228131, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29228132, 'pht': 3726}}" where mtr_portfolio_id = 29228095 and dashboard_run_id = 2708265 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`=29228095 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18121429, 0.043121215843922985, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29228095_05-12-2025_15_35_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 29228121, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29228122, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29228123, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29228124, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29228125, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29228126, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29228127, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29228128, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29228129, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29228130, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29228131, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29228132, '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 = 29228704 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 = 29228704 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 = 29228704 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 29228704 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 = 29228704 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 = 29228704 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29228704_05-12-2025_15_39_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29228704 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_P29228704_05-12-2025_15_39_01.pdf'}" where mtr_portfolio_id = 29228704 and dashboard_run_id = 2708265 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29227102,29227474,29228095,29228704) result : ((1398093490,), (1398093491,), (1398093492,), (1398093493,), (1398093496,), (1398093509,), (1398093510,), (1398093511,), (1398093512,), (1398093514,), (1398093537,), (1398093538,), (1398093539,), (1398093540,), (1398093560,), (1398093561,), (1398093562,), (1398093563,), (1398093565,), (1398093567,), (1398093579,), (1398093580,), (1398093581,), (1398093583,), (1398093585,), (1398093587,), (1398093603,), (1398093604,), (1398093607,), (1398093610,), (1398093614,), (1398093617,), (1398093623,), (1398093624,), (1398093628,), (1398093631,), (1398093634,), (1398093636,), (1398093643,), (1398093644,), (1398093646,), (1398093648,), (1398093651,), (1398093653,), (1398093654,), (1398093656,), (1398093658,), (1398093661,), (1398093690,), (1398093691,), (1398093692,), (1398093693,), (1398093696,), (1398093726,), (1398093728,), (1398093730,), (1398093732,), (1398093735,), (1398093755,), (1398093756,), (1398093757,), (1398093758,), (1398093761,), (1398093775,), (1398093777,), (1398093779,), (1398093781,), (1398093784,), (1398093787,), (1398094013,), (1398094048,), (1398094068,), (1398094085,), (1398094139,), (1398094143,), (1398094145,), (1398094149,), (1398094152,), (1398094155,), (1398094476,), (1398094601,), (1398094639,), (1398094671,), (1398094706,), (1398094738,), (1398094748,), (1398094866,), (1398094896,), (1398094930,), (1398094302,), (1398094338,), (1398094372,), (1398094405,), (1398094439,), (1398094754,), (1398094756,), (1398094761,), (1398094796,), (1398094829,), (1398094995,), (1398094998,), (1398095000,), (1398095031,), (1398095068,), (1398095367,), (1398095400,), (1398095432,), (1398095463,), (1398095876,), (1398095911,), (1398095945,), (1398095990,), (1398096026,), (1398096339,), (1398096340,), (1398096358,), (1398096361,), (1398096363,), (1398096365,), (1398096393,), (1398096395,), (1398096397,), (1398096400,), (1398096652,), (1398096684,), (1398096715,), (1398096749,), (1398096802,), (1398096846,), (1398097022,), (1398097030,), (1398097131,), (1398097133,), (1398097135,), (1398097138,), (1398097140,), (1398097142,), (1398097458,), (1398097491,), (1398097494,), (1398097497,), (1398097500,), (1398097504,), (1398097537,), (1398097544,), (1398097547,), (1398097557,), (1398097558,), (1398097564,), (1398097568,), (1398097571,), (1398097574,), (1398097585,), (1398097591,), (1398097631,), (1398097632,), (1398097634,), (1398097636,), (1398097679,), (1398097685,), (1398097686,), (1398097687,), (1398097689,), (1398097690,), (1398097717,), (1398097718,), (1398097720,), (1398097721,), (1398097724,), (1398097875,), (1398097868,), (1398097870,), (1398097873,), (1398097923,), (1398097945,), (1398097947,), (1398097950,), (1398097953,), (1398097956,), (1398097959,), (1398097970,), (1398097972,), (1398097974,), (1398097976,), (1398097977,), (1398097981,), (1398098022,), (1398098028,), (1398098036,), (1398098042,), (1398098046,), (1398098050,), (1398098054,), (1398098058,), (1398098067,), (1398098068,), (1398098070,), (1398098093,), (1398098099,), (1398098101,), (1398098103,), (1398098106,), (1398098108,), (1398098152,), (1398098154,), (1398098157,), (1398098180,), (1398098182,), (1398098184,), (1398098393,), (1398098443,), (1398098542,), (1398098548,), (1398098584,), (1398098585,), (1398098588,), (1398098591,), (1398098624,), (1398098627,), (1398098630,), (1398098662,), (1398098664,), (1398098666,), (1398098668,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'05122025': {'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([29228704]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1398098668, 1398098666, 1398098664, 1398098662, 1398098630, 1398098627, 1398098624, 1398098591, 1398098588, 1398098585, 1398098584, 1398098548, 1398098542, 1398098443] map_info['map_portfolio_photo'] : {29228704: [1398098668, 1398098666, 1398098664, 1398098662, 1398098630, 1398098627, 1398098624, 1398098591, 1398098588, 1398098585, 1398098584, 1398098548, 1398098542, 1398098443]} final : True mtd_id 4302 list_pids : [1398098668, 1398098666, 1398098664, 1398098662, 1398098630, 1398098627, 1398098624, 1398098591, 1398098588, 1398098585, 1398098584, 1398098548, 1398098542, 1398098443] Looping around the photos to save general results len do output : 1 /29228704Didn'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, '4191180') ('4302', '29228704', '1398098668', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098666', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098664', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098662', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098630', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098627', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098624', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098591', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098588', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098585', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098584', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098548', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098542', None, None, None, None, None, '4191180') ('4302', None, None, None, None, None, None, None, '4191180') ('4302', '29228704', '1398098443', None, None, None, None, None, '4191180') 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, '29228704', 'None', None, None, None, None, '4191180'), ('4302', '29228704', '1398098668', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098666', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098664', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098662', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098630', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098627', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098624', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098591', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098588', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098585', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098584', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098548', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098542', None, None, None, None, None, '4191180'), ('4302', '29228704', '1398098443', None, None, None, None, None, '4191180')] time used for this insertion : 0.01950526237487793 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.6338629722595215 time spend to save output : 0.01973128318786621 total time spend for step 5 : 0.6535942554473877 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 (4191180) 2.13user 2.51system 0:09.37elapsed 49%CPU (0avgtext+0avgdata 169320maxresident)k 32inputs+8976outputs (4major+67577minor)pagefaults 0swaps