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 : 724289 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 (2566394) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2566394) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20345370 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2566394'] with mtr_portfolio_ids : ['20345370'] and first list_photo_ids : [] new path : /proc/724289/ Name: python3 Umask: 0002 State: R (running) Tgid: 724289 Ngid: 0 Pid: 724289 PPid: 724288 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 724289 NSpid: 724289 NSpgid: 722356 NSsid: 722356 VmPeak: 1106660 kB VmSize: 1106660 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 97136 kB VmRSS: 97136 kB RssAnon: 59740 kB RssFile: 37396 kB RssShmem: 0 kB VmData: 865412 kB VmStk: 132 kB VmExe: 2640 kB VmLib: 130468 kB VmPTE: 588 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63054 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 50 nonvoluntary_ctxt_switches: 101 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '724289', 'Ngid': '0', 'Pid': '724289', 'PPid': '724288', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '724289', 'NSpid': '724289', 'NSpgid': '722356', 'NSsid': '722356', 'VmPeak': '1106660 kB', 'VmSize': '1106660 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '97136 kB', 'VmRSS': '97136 kB', 'RssAnon': '59740 kB', 'RssFile': '37396 kB', 'RssShmem': '0 kB', 'VmData': '865412 kB', 'VmStk': '132 kB', 'VmExe': '2640 kB', 'VmLib': '130468 kB', 'VmPTE': '588 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63054', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '50', 'nonvoluntary_ctxt_switches': '101'} ('datou_batch_current', '724289', '1106660', '0', '1106660', '865412', '97136', b'', 'marlene', '2566394') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (20345370) 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 (2566394 ) ) 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 (20345370) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1335579994, 'portfolio_id': 20345370}, {'photo_id': 1335579507, 'portfolio_id': 20345370}, {'photo_id': 1335579443, 'portfolio_id': 20345370}, {'photo_id': 1335579386, 'portfolio_id': 20345370}, {'photo_id': 1335579324, 'portfolio_id': 20345370}, {'photo_id': 1335579285, 'portfolio_id': 20345370}, {'photo_id': 1335579215, 'portfolio_id': 20345370}, {'photo_id': 1335579212, 'portfolio_id': 20345370}, {'photo_id': 1335579209, 'portfolio_id': 20345370}, {'photo_id': 1335579207, 'portfolio_id': 20345370}, {'photo_id': 1335579158, 'portfolio_id': 20345370}, {'photo_id': 1335579151, 'portfolio_id': 20345370}, {'photo_id': 1335579144, 'portfolio_id': 20345370}, {'photo_id': 1335579112, 'portfolio_id': 20345370}, {'photo_id': 1335579110, 'portfolio_id': 20345370}, {'photo_id': 1335579109, 'portfolio_id': 20345370}, {'photo_id': 1335579107, 'portfolio_id': 20345370}, {'photo_id': 1335579105, 'portfolio_id': 20345370}, {'photo_id': 1335579020, 'portfolio_id': 20345370}, {'photo_id': 1335579018, 'portfolio_id': 20345370}, {'photo_id': 1335579016, 'portfolio_id': 20345370}, {'photo_id': 1335578956, 'portfolio_id': 20345370}, {'photo_id': 1335578953, 'portfolio_id': 20345370}, {'photo_id': 1335578921, 'portfolio_id': 20345370}, {'photo_id': 1335578919, 'portfolio_id': 20345370}, {'photo_id': 1335578918, 'portfolio_id': 20345370}, {'photo_id': 1335578917, 'portfolio_id': 20345370}, {'photo_id': 1335578885, 'portfolio_id': 20345370}, {'photo_id': 1335578882, 'portfolio_id': 20345370}, {'photo_id': 1335578879, 'portfolio_id': 20345370}, {'photo_id': 1335578874, 'portfolio_id': 20345370}, {'photo_id': 1335578868, 'portfolio_id': 20345370}, {'photo_id': 1335578861, 'portfolio_id': 20345370}, {'photo_id': 1335578834, 'portfolio_id': 20345370}, {'photo_id': 1335578818, 'portfolio_id': 20345370}, {'photo_id': 1335578816, 'portfolio_id': 20345370}, {'photo_id': 1335578762, 'portfolio_id': 20345370}, {'photo_id': 1335578757, 'portfolio_id': 20345370}, {'photo_id': 1335578755, 'portfolio_id': 20345370}, {'photo_id': 1335578754, 'portfolio_id': 20345370}, {'photo_id': 1335578733, 'portfolio_id': 20345370}, {'photo_id': 1335578729, 'portfolio_id': 20345370}, {'photo_id': 1335578728, 'portfolio_id': 20345370}, {'photo_id': 1335578726, 'portfolio_id': 20345370}, {'photo_id': 1335578724, 'portfolio_id': 20345370}, {'photo_id': 1335578683, 'portfolio_id': 20345370}, {'photo_id': 1335578652, 'portfolio_id': 20345370}, {'photo_id': 1335578649, 'portfolio_id': 20345370}, {'photo_id': 1335578646, 'portfolio_id': 20345370}, {'photo_id': 1335578644, 'portfolio_id': 20345370}, {'photo_id': 1335578642, 'portfolio_id': 20345370}, {'photo_id': 1335578640, 'portfolio_id': 20345370}, {'photo_id': 1335578614, 'portfolio_id': 20345370}, {'photo_id': 1335578610, 'portfolio_id': 20345370}, {'photo_id': 1335578607, 'portfolio_id': 20345370}, {'photo_id': 1335578603, 'portfolio_id': 20345370}, {'photo_id': 1335578569, 'portfolio_id': 20345370}, {'photo_id': 1335578565, 'portfolio_id': 20345370}, {'photo_id': 1335578560, 'portfolio_id': 20345370}, {'photo_id': 1335578552, 'portfolio_id': 20345370}, {'photo_id': 1335578545, 'portfolio_id': 20345370}, {'photo_id': 1335578542, 'portfolio_id': 20345370}, {'photo_id': 1335578452, 'portfolio_id': 20345370}, {'photo_id': 1335578449, 'portfolio_id': 20345370}, {'photo_id': 1335578446, 'portfolio_id': 20345370}, {'photo_id': 1335578443, 'portfolio_id': 20345370}, {'photo_id': 1335578441, 'portfolio_id': 20345370}, {'photo_id': 1335578269, 'portfolio_id': 20345370}, {'photo_id': 1335578265, 'portfolio_id': 20345370}, {'photo_id': 1335578262, 'portfolio_id': 20345370}] map_portfolio_id_photo_id: {20345370: [1335579994, 1335579507, 1335579443, 1335579386, 1335579324, 1335579285, 1335579215, 1335579212, 1335579209, 1335579207, 1335579158, 1335579151, 1335579144, 1335579112, 1335579110, 1335579109, 1335579107, 1335579105, 1335579020, 1335579018, 1335579016, 1335578956, 1335578953, 1335578921, 1335578919, 1335578918, 1335578917, 1335578885, 1335578882, 1335578879, 1335578874, 1335578868, 1335578861, 1335578834, 1335578818, 1335578816, 1335578762, 1335578757, 1335578755, 1335578754, 1335578733, 1335578729, 1335578728, 1335578726, 1335578724, 1335578683, 1335578652, 1335578649, 1335578646, 1335578644, 1335578642, 1335578640, 1335578614, 1335578610, 1335578607, 1335578603, 1335578569, 1335578565, 1335578560, 1335578552, 1335578545, 1335578542, 1335578452, 1335578449, 1335578446, 1335578443, 1335578441, 1335578269, 1335578265, 1335578262]} ##### 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.017599105834960938 #### 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 Feb 7 19:16: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 (20345370) 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 : 20345370 get user id for portfolio 20345370 get sub ptf for main ptf 20345370, type 3726 and hashtags ['papier', 'autre_refus', 'environnement', 'flou', 'Carton_brun', 'cartonnette', 'plastique', 'Carton_gris', 'kraft', 'Teint_Dans_La_Masse', 'mal_croppe', '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`=20345370 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','autre_refus','environnement','flou','Carton_brun','cartonnette','plastique','Carton_gris','kraft','Teint_Dans_La_Masse','mal_croppe','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`=20345370 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','autre_refus','environnement','flou','Carton_brun','cartonnette','plastique','Carton_gris','kraft','Teint_Dans_La_Masse','mal_croppe','metal')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_brun': {'main_port_id': 20345370, 'sub_port_id': 20345401, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13029302, 'last_updated_at': datetime.datetime(2025, 2, 7, 19, 14, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 7, 19, 14, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 7, 19, 3, 27)}, 'kraft': {'main_port_id': 20345370, 'sub_port_id': 20345402, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13029303, 'last_updated_at': datetime.datetime(2025, 2, 7, 19, 14, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 7, 19, 14, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 7, 19, 3, 27)}, 'flou': {'main_port_id': 20345370, 'sub_port_id': 20345403, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13029304, 'last_updated_at': datetime.datetime(2025, 2, 7, 19, 14, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 7, 19, 14, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 7, 19, 3, 27)}, 'mal_croppe': {'main_port_id': 20345370, 'sub_port_id': 20345404, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13029305, 'last_updated_at': datetime.datetime(2025, 2, 7, 19, 14, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 7, 19, 14, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 7, 19, 3, 27)}, 'autre_refus': {'main_port_id': 20345370, 'sub_port_id': 20345405, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13029306, 'last_updated_at': datetime.datetime(2025, 2, 7, 19, 14, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 7, 19, 14, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 7, 19, 3, 27)}, 'cartonnette': {'main_port_id': 20345370, 'sub_port_id': 20345406, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13029307, 'last_updated_at': datetime.datetime(2025, 2, 7, 19, 14, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 7, 19, 14, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 7, 19, 3, 27)}, 'papier': {'main_port_id': 20345370, 'sub_port_id': 20345407, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13029308, 'last_updated_at': datetime.datetime(2025, 2, 7, 19, 14, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 7, 19, 14, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 7, 19, 3, 27)}, 'environnement': {'main_port_id': 20345370, 'sub_port_id': 20345408, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13029309, 'last_updated_at': datetime.datetime(2025, 2, 7, 19, 14, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 7, 19, 14, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 7, 19, 3, 27)}, 'Carton_gris': {'main_port_id': 20345370, 'sub_port_id': 20345409, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13029310, 'last_updated_at': datetime.datetime(2025, 2, 7, 19, 14, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 7, 19, 14, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 7, 19, 3, 27)}, 'Teint_Dans_La_Masse': {'main_port_id': 20345370, 'sub_port_id': 20345410, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13029311, 'last_updated_at': datetime.datetime(2025, 2, 7, 19, 14, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 7, 19, 14, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 7, 19, 3, 27)}, 'plastique': {'main_port_id': 20345370, 'sub_port_id': 20345411, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13029312, 'last_updated_at': datetime.datetime(2025, 2, 7, 19, 14, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 7, 19, 14, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 7, 19, 3, 27)}, 'metal': {'main_port_id': 20345370, 'sub_port_id': 20345412, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13029313, 'last_updated_at': datetime.datetime(2025, 2, 7, 19, 14, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 7, 19, 14, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 7, 19, 3, 27)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20345401 , 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=20345370 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 (20345401) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20345370) result : ((1335578262,), (1335578265,), (1335578269,), (1335578441,), (1335578443,), (1335578446,), (1335578449,), (1335578452,), (1335578542,), (1335578545,), (1335578552,), (1335578560,), (1335578565,), (1335578569,), (1335578603,), (1335578607,), (1335578610,), (1335578614,), (1335578640,), (1335578642,), (1335578644,), (1335578646,), (1335578649,), (1335578652,), (1335578683,), (1335578724,), (1335578726,), (1335578728,), (1335578729,), (1335578733,), (1335578754,), (1335578755,), (1335578757,), (1335578762,), (1335578816,), (1335578818,), (1335578834,), (1335578861,), (1335578868,), (1335578874,), (1335578879,), (1335578882,), (1335578885,), (1335578917,), (1335578918,), (1335578919,), (1335578921,), (1335578953,), (1335578956,), (1335579016,), (1335579018,), (1335579020,), (1335579105,), (1335579107,), (1335579109,), (1335579110,), (1335579112,), (1335579144,), (1335579151,), (1335579158,), (1335579207,), (1335579209,), (1335579212,), (1335579215,), (1335579285,), (1335579324,), (1335579386,), (1335579443,), (1335579507,), (1335579994,)) 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 20345402 , 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=20345370 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 (20345402) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20345370) result : ((1335578262,), (1335578265,), (1335578269,), (1335578441,), (1335578443,), (1335578446,), (1335578449,), (1335578452,), (1335578542,), (1335578545,), (1335578552,), (1335578560,), (1335578565,), (1335578569,), (1335578603,), (1335578607,), (1335578610,), (1335578614,), (1335578640,), (1335578642,), (1335578644,), (1335578646,), (1335578649,), (1335578652,), (1335578683,), (1335578724,), (1335578726,), (1335578728,), (1335578729,), (1335578733,), (1335578754,), (1335578755,), (1335578757,), (1335578762,), (1335578816,), (1335578818,), (1335578834,), (1335578861,), (1335578868,), (1335578874,), (1335578879,), (1335578882,), (1335578885,), (1335578917,), (1335578918,), (1335578919,), (1335578921,), (1335578953,), (1335578956,), (1335579016,), (1335579018,), (1335579020,), (1335579105,), (1335579107,), (1335579109,), (1335579110,), (1335579112,), (1335579144,), (1335579151,), (1335579158,), (1335579207,), (1335579209,), (1335579212,), (1335579215,), (1335579285,), (1335579324,), (1335579386,), (1335579443,), (1335579507,), (1335579994,)) 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 20345403 , 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=20345370 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 (20345403) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20345370) result : ((1335578262,), (1335578265,), (1335578269,), (1335578441,), (1335578443,), (1335578446,), (1335578449,), (1335578452,), (1335578542,), (1335578545,), (1335578552,), (1335578560,), (1335578565,), (1335578569,), (1335578603,), (1335578607,), (1335578610,), (1335578614,), (1335578640,), (1335578642,), (1335578644,), (1335578646,), (1335578649,), (1335578652,), (1335578683,), (1335578724,), (1335578726,), (1335578728,), (1335578729,), (1335578733,), (1335578754,), (1335578755,), (1335578757,), (1335578762,), (1335578816,), (1335578818,), (1335578834,), (1335578861,), (1335578868,), (1335578874,), (1335578879,), (1335578882,), (1335578885,), (1335578917,), (1335578918,), (1335578919,), (1335578921,), (1335578953,), (1335578956,), (1335579016,), (1335579018,), (1335579020,), (1335579105,), (1335579107,), (1335579109,), (1335579110,), (1335579112,), (1335579144,), (1335579151,), (1335579158,), (1335579207,), (1335579209,), (1335579212,), (1335579215,), (1335579285,), (1335579324,), (1335579386,), (1335579443,), (1335579507,), (1335579994,)) 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 20345404 , 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=20345370 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 (20345404) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20345370) result : ((1335578262,), (1335578265,), (1335578269,), (1335578441,), (1335578443,), (1335578446,), (1335578449,), (1335578452,), (1335578542,), (1335578545,), (1335578552,), (1335578560,), (1335578565,), (1335578569,), (1335578603,), (1335578607,), (1335578610,), (1335578614,), (1335578640,), (1335578642,), (1335578644,), (1335578646,), (1335578649,), (1335578652,), (1335578683,), (1335578724,), (1335578726,), (1335578728,), (1335578729,), (1335578733,), (1335578754,), (1335578755,), (1335578757,), (1335578762,), (1335578816,), (1335578818,), (1335578834,), (1335578861,), (1335578868,), (1335578874,), (1335578879,), (1335578882,), (1335578885,), (1335578917,), (1335578918,), (1335578919,), (1335578921,), (1335578953,), (1335578956,), (1335579016,), (1335579018,), (1335579020,), (1335579105,), (1335579107,), (1335579109,), (1335579110,), (1335579112,), (1335579144,), (1335579151,), (1335579158,), (1335579207,), (1335579209,), (1335579212,), (1335579215,), (1335579285,), (1335579324,), (1335579386,), (1335579443,), (1335579507,), (1335579994,)) 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 20345405 , 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=20345370 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 (20345405) result : ((1335579978,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20345370) result : ((1335578262,), (1335578265,), (1335578269,), (1335578441,), (1335578443,), (1335578446,), (1335578449,), (1335578452,), (1335578542,), (1335578545,), (1335578552,), (1335578560,), (1335578565,), (1335578569,), (1335578603,), (1335578607,), (1335578610,), (1335578614,), (1335578640,), (1335578642,), (1335578644,), (1335578646,), (1335578649,), (1335578652,), (1335578683,), (1335578724,), (1335578726,), (1335578728,), (1335578729,), (1335578733,), (1335578754,), (1335578755,), (1335578757,), (1335578762,), (1335578816,), (1335578818,), (1335578834,), (1335578861,), (1335578868,), (1335578874,), (1335578879,), (1335578882,), (1335578885,), (1335578917,), (1335578918,), (1335578919,), (1335578921,), (1335578953,), (1335578956,), (1335579016,), (1335579018,), (1335579020,), (1335579105,), (1335579107,), (1335579109,), (1335579110,), (1335579112,), (1335579144,), (1335579151,), (1335579158,), (1335579207,), (1335579209,), (1335579212,), (1335579215,), (1335579285,), (1335579324,), (1335579386,), (1335579443,), (1335579507,), (1335579994,)) 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 20345406 , 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=20345370 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 (20345406) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20345370) result : ((1335578262,), (1335578265,), (1335578269,), (1335578441,), (1335578443,), (1335578446,), (1335578449,), (1335578452,), (1335578542,), (1335578545,), (1335578552,), (1335578560,), (1335578565,), (1335578569,), (1335578603,), (1335578607,), (1335578610,), (1335578614,), (1335578640,), (1335578642,), (1335578644,), (1335578646,), (1335578649,), (1335578652,), (1335578683,), (1335578724,), (1335578726,), (1335578728,), (1335578729,), (1335578733,), (1335578754,), (1335578755,), (1335578757,), (1335578762,), (1335578816,), (1335578818,), (1335578834,), (1335578861,), (1335578868,), (1335578874,), (1335578879,), (1335578882,), (1335578885,), (1335578917,), (1335578918,), (1335578919,), (1335578921,), (1335578953,), (1335578956,), (1335579016,), (1335579018,), (1335579020,), (1335579105,), (1335579107,), (1335579109,), (1335579110,), (1335579112,), (1335579144,), (1335579151,), (1335579158,), (1335579207,), (1335579209,), (1335579212,), (1335579215,), (1335579285,), (1335579324,), (1335579386,), (1335579443,), (1335579507,), (1335579994,)) 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 20345407 , 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=20345370 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 (20345407) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20345370) result : ((1335578262,), (1335578265,), (1335578269,), (1335578441,), (1335578443,), (1335578446,), (1335578449,), (1335578452,), (1335578542,), (1335578545,), (1335578552,), (1335578560,), (1335578565,), (1335578569,), (1335578603,), (1335578607,), (1335578610,), (1335578614,), (1335578640,), (1335578642,), (1335578644,), (1335578646,), (1335578649,), (1335578652,), (1335578683,), (1335578724,), (1335578726,), (1335578728,), (1335578729,), (1335578733,), (1335578754,), (1335578755,), (1335578757,), (1335578762,), (1335578816,), (1335578818,), (1335578834,), (1335578861,), (1335578868,), (1335578874,), (1335578879,), (1335578882,), (1335578885,), (1335578917,), (1335578918,), (1335578919,), (1335578921,), (1335578953,), (1335578956,), (1335579016,), (1335579018,), (1335579020,), (1335579105,), (1335579107,), (1335579109,), (1335579110,), (1335579112,), (1335579144,), (1335579151,), (1335579158,), (1335579207,), (1335579209,), (1335579212,), (1335579215,), (1335579285,), (1335579324,), (1335579386,), (1335579443,), (1335579507,), (1335579994,)) 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 20345408 , 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=20345370 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 (20345408) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20345370) result : ((1335578262,), (1335578265,), (1335578269,), (1335578441,), (1335578443,), (1335578446,), (1335578449,), (1335578452,), (1335578542,), (1335578545,), (1335578552,), (1335578560,), (1335578565,), (1335578569,), (1335578603,), (1335578607,), (1335578610,), (1335578614,), (1335578640,), (1335578642,), (1335578644,), (1335578646,), (1335578649,), (1335578652,), (1335578683,), (1335578724,), (1335578726,), (1335578728,), (1335578729,), (1335578733,), (1335578754,), (1335578755,), (1335578757,), (1335578762,), (1335578816,), (1335578818,), (1335578834,), (1335578861,), (1335578868,), (1335578874,), (1335578879,), (1335578882,), (1335578885,), (1335578917,), (1335578918,), (1335578919,), (1335578921,), (1335578953,), (1335578956,), (1335579016,), (1335579018,), (1335579020,), (1335579105,), (1335579107,), (1335579109,), (1335579110,), (1335579112,), (1335579144,), (1335579151,), (1335579158,), (1335579207,), (1335579209,), (1335579212,), (1335579215,), (1335579285,), (1335579324,), (1335579386,), (1335579443,), (1335579507,), (1335579994,)) 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 20345409 , 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=20345370 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 (20345409) result : ((1335579991,), (1335579992,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20345370) result : ((1335578262,), (1335578265,), (1335578269,), (1335578441,), (1335578443,), (1335578446,), (1335578449,), (1335578452,), (1335578542,), (1335578545,), (1335578552,), (1335578560,), (1335578565,), (1335578569,), (1335578603,), (1335578607,), (1335578610,), (1335578614,), (1335578640,), (1335578642,), (1335578644,), (1335578646,), (1335578649,), (1335578652,), (1335578683,), (1335578724,), (1335578726,), (1335578728,), (1335578729,), (1335578733,), (1335578754,), (1335578755,), (1335578757,), (1335578762,), (1335578816,), (1335578818,), (1335578834,), (1335578861,), (1335578868,), (1335578874,), (1335578879,), (1335578882,), (1335578885,), (1335578917,), (1335578918,), (1335578919,), (1335578921,), (1335578953,), (1335578956,), (1335579016,), (1335579018,), (1335579020,), (1335579105,), (1335579107,), (1335579109,), (1335579110,), (1335579112,), (1335579144,), (1335579151,), (1335579158,), (1335579207,), (1335579209,), (1335579212,), (1335579215,), (1335579285,), (1335579324,), (1335579386,), (1335579443,), (1335579507,), (1335579994,)) 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 20345410 , 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=20345370 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 (20345410) result : ((1335579977,), (1335579989,), (1335579990,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20345370) result : ((1335578262,), (1335578265,), (1335578269,), (1335578441,), (1335578443,), (1335578446,), (1335578449,), (1335578452,), (1335578542,), (1335578545,), (1335578552,), (1335578560,), (1335578565,), (1335578569,), (1335578603,), (1335578607,), (1335578610,), (1335578614,), (1335578640,), (1335578642,), (1335578644,), (1335578646,), (1335578649,), (1335578652,), (1335578683,), (1335578724,), (1335578726,), (1335578728,), (1335578729,), (1335578733,), (1335578754,), (1335578755,), (1335578757,), (1335578762,), (1335578816,), (1335578818,), (1335578834,), (1335578861,), (1335578868,), (1335578874,), (1335578879,), (1335578882,), (1335578885,), (1335578917,), (1335578918,), (1335578919,), (1335578921,), (1335578953,), (1335578956,), (1335579016,), (1335579018,), (1335579020,), (1335579105,), (1335579107,), (1335579109,), (1335579110,), (1335579112,), (1335579144,), (1335579151,), (1335579158,), (1335579207,), (1335579209,), (1335579212,), (1335579215,), (1335579285,), (1335579324,), (1335579386,), (1335579443,), (1335579507,), (1335579994,)) 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 20345411 , 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=20345370 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 (20345411) result : ((1335579993,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20345370) result : ((1335578262,), (1335578265,), (1335578269,), (1335578441,), (1335578443,), (1335578446,), (1335578449,), (1335578452,), (1335578542,), (1335578545,), (1335578552,), (1335578560,), (1335578565,), (1335578569,), (1335578603,), (1335578607,), (1335578610,), (1335578614,), (1335578640,), (1335578642,), (1335578644,), (1335578646,), (1335578649,), (1335578652,), (1335578683,), (1335578724,), (1335578726,), (1335578728,), (1335578729,), (1335578733,), (1335578754,), (1335578755,), (1335578757,), (1335578762,), (1335578816,), (1335578818,), (1335578834,), (1335578861,), (1335578868,), (1335578874,), (1335578879,), (1335578882,), (1335578885,), (1335578917,), (1335578918,), (1335578919,), (1335578921,), (1335578953,), (1335578956,), (1335579016,), (1335579018,), (1335579020,), (1335579105,), (1335579107,), (1335579109,), (1335579110,), (1335579112,), (1335579144,), (1335579151,), (1335579158,), (1335579207,), (1335579209,), (1335579212,), (1335579215,), (1335579285,), (1335579324,), (1335579386,), (1335579443,), (1335579507,), (1335579994,)) 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 20345412 , 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=20345370 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 (20345412) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20345370) result : ((1335578262,), (1335578265,), (1335578269,), (1335578441,), (1335578443,), (1335578446,), (1335578449,), (1335578452,), (1335578542,), (1335578545,), (1335578552,), (1335578560,), (1335578565,), (1335578569,), (1335578603,), (1335578607,), (1335578610,), (1335578614,), (1335578640,), (1335578642,), (1335578644,), (1335578646,), (1335578649,), (1335578652,), (1335578683,), (1335578724,), (1335578726,), (1335578728,), (1335578729,), (1335578733,), (1335578754,), (1335578755,), (1335578757,), (1335578762,), (1335578816,), (1335578818,), (1335578834,), (1335578861,), (1335578868,), (1335578874,), (1335578879,), (1335578882,), (1335578885,), (1335578917,), (1335578918,), (1335578919,), (1335578921,), (1335578953,), (1335578956,), (1335579016,), (1335579018,), (1335579020,), (1335579105,), (1335579107,), (1335579109,), (1335579110,), (1335579112,), (1335579144,), (1335579151,), (1335579158,), (1335579207,), (1335579209,), (1335579212,), (1335579215,), (1335579285,), (1335579324,), (1335579386,), (1335579443,), (1335579507,), (1335579994,)) 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`=20345370 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','autre_refus','environnement','flou','Carton_brun','cartonnette','plastique','Carton_gris','kraft','Teint_Dans_La_Masse','mal_croppe','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`=20345370 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','autre_refus','environnement','flou','Carton_brun','cartonnette','plastique','Carton_gris','kraft','Teint_Dans_La_Masse','mal_croppe','metal')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_brun': {'main_port_id': 20345370, 'sub_port_id': 20345414, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13029314, 'last_updated_at': datetime.datetime(2025, 2, 7, 19, 3, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 7, 19, 3, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 7, 19, 3, 29)}, 'kraft': {'main_port_id': 20345370, 'sub_port_id': 20345415, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13029315, 'last_updated_at': datetime.datetime(2025, 2, 7, 19, 3, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 7, 19, 3, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 7, 19, 3, 29)}, 'flou': {'main_port_id': 20345370, 'sub_port_id': 20345416, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13029316, 'last_updated_at': datetime.datetime(2025, 2, 7, 19, 3, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 7, 19, 3, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 7, 19, 3, 29)}, 'mal_croppe': {'main_port_id': 20345370, 'sub_port_id': 20345417, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13029317, 'last_updated_at': datetime.datetime(2025, 2, 7, 19, 3, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 7, 19, 3, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 7, 19, 3, 29)}, 'autre_refus': {'main_port_id': 20345370, 'sub_port_id': 20345418, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13029318, 'last_updated_at': datetime.datetime(2025, 2, 7, 19, 3, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 7, 19, 3, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 7, 19, 3, 29)}, 'cartonnette': {'main_port_id': 20345370, 'sub_port_id': 20345419, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13029319, 'last_updated_at': datetime.datetime(2025, 2, 7, 19, 3, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 7, 19, 3, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 7, 19, 3, 29)}, 'papier': {'main_port_id': 20345370, 'sub_port_id': 20345420, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13029320, 'last_updated_at': datetime.datetime(2025, 2, 7, 19, 3, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 7, 19, 3, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 7, 19, 3, 29)}, 'environnement': {'main_port_id': 20345370, 'sub_port_id': 20345421, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13029321, 'last_updated_at': datetime.datetime(2025, 2, 7, 19, 3, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 7, 19, 3, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 7, 19, 3, 29)}, 'Carton_gris': {'main_port_id': 20345370, 'sub_port_id': 20345422, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13029322, 'last_updated_at': datetime.datetime(2025, 2, 7, 19, 3, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 7, 19, 3, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 7, 19, 3, 29)}, 'Teint_Dans_La_Masse': {'main_port_id': 20345370, 'sub_port_id': 20345423, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13029323, 'last_updated_at': datetime.datetime(2025, 2, 7, 19, 3, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 7, 19, 3, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 7, 19, 3, 29)}, 'plastique': {'main_port_id': 20345370, 'sub_port_id': 20345424, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13029324, 'last_updated_at': datetime.datetime(2025, 2, 7, 19, 3, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 7, 19, 3, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 7, 19, 3, 29)}, 'metal': {'main_port_id': 20345370, 'sub_port_id': 20345425, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13029325, 'last_updated_at': datetime.datetime(2025, 2, 7, 19, 14, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 7, 19, 14, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 7, 19, 3, 29)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20345414,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20345401 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20345415,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20345402 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20345416,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20345403 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20345417,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20345404 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20345418,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20345405 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20345419,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20345406 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20345420,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20345407 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20345421,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20345408 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20345422,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20345409 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20345423,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20345410 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20345424,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20345411 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20345425,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20345412 lien utilise dans velours : https://www.fotonower.com/velours/20345414,20345415,20345416,20345417,20345418,20345419,20345420,20345421,20345422,20345423,20345424,20345425?tags=Carton_brun,kraft,flou,mal_croppe,autre_refus,cartonnette,papier,environnement,Carton_gris,Teint_Dans_La_Masse,plastique,metal After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20345370]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1335579994, 1335579507, 1335579443, 1335579386, 1335579324, 1335579285] map_info['map_portfolio_photo'] : {20345370: [1335579994, 1335579507, 1335579443, 1335579386, 1335579324, 1335579285, 1335579215, 1335579212, 1335579209, 1335579207, 1335579158, 1335579151, 1335579144, 1335579112, 1335579110, 1335579109, 1335579107, 1335579105, 1335579020, 1335579018, 1335579016, 1335578956, 1335578953, 1335578921, 1335578919, 1335578918, 1335578917, 1335578885, 1335578882, 1335578879, 1335578874, 1335578868, 1335578861, 1335578834, 1335578818, 1335578816, 1335578762, 1335578757, 1335578755, 1335578754, 1335578733, 1335578729, 1335578728, 1335578726, 1335578724, 1335578683, 1335578652, 1335578649, 1335578646, 1335578644, 1335578642, 1335578640, 1335578614, 1335578610, 1335578607, 1335578603, 1335578569, 1335578565, 1335578560, 1335578552, 1335578545, 1335578542, 1335578452, 1335578449, 1335578446, 1335578443, 1335578441, 1335578269, 1335578265, 1335578262]} final : False mtd_id 4302 list_pids : [1335579994, 1335579507, 1335579443, 1335579386, 1335579324, 1335579285] Looping around the photos to save general results len do output : 1 /20345370. 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, '2566394') ('4302', '20345370', '1335579994', None, None, None, None, None, '2566394') ('4302', None, None, None, None, None, None, None, '2566394') ('4302', '20345370', '1335579507', None, None, None, None, None, '2566394') ('4302', None, None, None, None, None, None, None, '2566394') ('4302', '20345370', '1335579443', None, None, None, None, None, '2566394') ('4302', None, None, None, None, None, None, None, '2566394') ('4302', '20345370', '1335579386', None, None, None, None, None, '2566394') ('4302', None, None, None, None, None, None, None, '2566394') ('4302', '20345370', '1335579324', None, None, None, None, None, '2566394') ('4302', None, None, None, None, None, None, None, '2566394') ('4302', '20345370', '1335579285', None, None, None, None, None, '2566394') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 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, '20345370', "{'Carton_brun': 20345401, 'kraft': 20345402, 'flou': 20345403, 'mal_croppe': 20345404, 'autre_refus': 20345405, 'cartonnette': 20345406, 'papier': 20345407, 'environnement': 20345408, 'Carton_gris': 20345409, 'Teint_Dans_La_Masse': 20345410, 'plastique': 20345411, 'metal': 20345412}", None, None, None, None, '2566394'), ('4302', '20345370', '1335579994', None, None, None, None, None, '2566394'), ('4302', '20345370', '1335579507', None, None, None, None, None, '2566394'), ('4302', '20345370', '1335579443', None, None, None, None, None, '2566394'), ('4302', '20345370', '1335579386', None, None, None, None, None, '2566394'), ('4302', '20345370', '1335579324', None, None, None, None, None, '2566394'), ('4302', '20345370', '1335579285', None, None, None, None, None, '2566394')] time used for this insertion : 0.019415855407714844 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.63541579246521 time spend to save output : 0.01973581314086914 total time spend for step 1 : 1.655151605606079 step2:final Fri Feb 7 19:16:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20345370) 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 20345370 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1335578269,1335578265,1335578262,1335578452,1335578449,1335578446,1335578443,1335578441,1335578569,1335578565,1335578560,1335578552,1335578545,1335578542,1335578614,1335578610,1335578607,1335578603,1335578652,1335578649,1335578646,1335578644,1335578642,1335578640,1335578733,1335578729,1335578728,1335578726,1335578724,1335578683,1335578762,1335578757,1335578755,1335578754,1335578834,1335578818,1335578816,1335578885,1335578882,1335578879,1335578874,1335578868,1335578861,1335578921,1335578919,1335578918,1335578917,1335579020,1335579018,1335579016,1335578956,1335578953,1335579112,1335579110,1335579109,1335579107,1335579105,1335579158,1335579151,1335579144,1335579215,1335579212,1335579209,1335579207,1335579507,1335579443,1335579386,1335579324,1335579994,1335579285); insert ignore into MTRUser.portfolio_carac_ratio (portfolio_id, hashtag_type, hashtag_id, value) values (%s,%s,%s,%s) on DUPLICATE KEY UPDATE value=VALUES(value) After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20345370]) Inside saveOutput : final : False verbose : True original output for save of step final : {1335579994: ('0.024892283304878502',), 1335579507: ('0.024892283304878502',), 1335579443: ('0.024892283304878502',), 1335579386: ('0.024892283304878502',), 1335579324: ('0.024892283304878502',), 1335579285: ('0.024892283304878502',)} new output for save of step final : {1335579994: ('0.024892283304878502',), 1335579507: ('0.024892283304878502',), 1335579443: ('0.024892283304878502',), 1335579386: ('0.024892283304878502',), 1335579324: ('0.024892283304878502',), 1335579285: ('0.024892283304878502',)} [1335579994, 1335579507, 1335579443, 1335579386, 1335579324, 1335579285] map_info['map_portfolio_photo'] : {20345370: [1335579994, 1335579507, 1335579443, 1335579386, 1335579324, 1335579285, 1335579215, 1335579212, 1335579209, 1335579207, 1335579158, 1335579151, 1335579144, 1335579112, 1335579110, 1335579109, 1335579107, 1335579105, 1335579020, 1335579018, 1335579016, 1335578956, 1335578953, 1335578921, 1335578919, 1335578918, 1335578917, 1335578885, 1335578882, 1335578879, 1335578874, 1335578868, 1335578861, 1335578834, 1335578818, 1335578816, 1335578762, 1335578757, 1335578755, 1335578754, 1335578733, 1335578729, 1335578728, 1335578726, 1335578724, 1335578683, 1335578652, 1335578649, 1335578646, 1335578644, 1335578642, 1335578640, 1335578614, 1335578610, 1335578607, 1335578603, 1335578569, 1335578565, 1335578560, 1335578552, 1335578545, 1335578542, 1335578452, 1335578449, 1335578446, 1335578443, 1335578441, 1335578269, 1335578265, 1335578262]} final : False mtd_id 4302 list_pids : [1335579994, 1335579507, 1335579443, 1335579386, 1335579324, 1335579285] Looping around the photos to save general results len do output : 6 /1335579994.Didn't retrieve data . /1335579507.Didn't retrieve data . /1335579443.Didn't retrieve data . /1335579386.Didn't retrieve data . /1335579324.Didn't retrieve data . /1335579285.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, '2566394') ('4302', '20345370', '1335579994', None, None, None, None, None, '2566394') ('4302', None, None, None, None, None, None, None, '2566394') ('4302', '20345370', '1335579507', None, None, None, None, None, '2566394') ('4302', None, None, None, None, None, None, None, '2566394') ('4302', '20345370', '1335579443', None, None, None, None, None, '2566394') ('4302', None, None, None, None, None, None, None, '2566394') ('4302', '20345370', '1335579386', None, None, None, None, None, '2566394') ('4302', None, None, None, None, None, None, None, '2566394') ('4302', '20345370', '1335579324', None, None, None, None, None, '2566394') ('4302', None, None, None, None, None, None, None, '2566394') ('4302', '20345370', '1335579285', None, None, None, None, None, '2566394') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 18 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', '20345370', '1335579994', '0.024892283304878502', None, None, None, None, '2566394'), ('4302', '20345370', '1335579507', '0.024892283304878502', None, None, None, None, '2566394'), ('4302', '20345370', '1335579443', '0.024892283304878502', None, None, None, None, '2566394'), ('4302', '20345370', '1335579386', '0.024892283304878502', None, None, None, None, '2566394'), ('4302', '20345370', '1335579324', '0.024892283304878502', None, None, None, None, '2566394'), ('4302', '20345370', '1335579285', '0.024892283304878502', None, None, None, None, '2566394')] time used for this insertion : 0.014307498931884766 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.07516980171203613 time spend to save output : 0.014693737030029297 total time spend for step 2 : 0.08986353874206543 step3:velours_tree Fri Feb 7 19:16:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {20345370: [{'Carton_brun': 20345401, 'kraft': 20345402, 'flou': 20345403, 'mal_croppe': 20345404, 'autre_refus': 20345405, 'cartonnette': 20345406, 'papier': 20345407, 'environnement': 20345408, 'Carton_gris': 20345409, 'Teint_Dans_La_Masse': 20345410, 'plastique': 20345411, 'metal': 20345412}]} input_args_next_step : {20345370: ()} output_args : {20345370: [{'Carton_brun': 20345401, 'kraft': 20345402, 'flou': 20345403, 'mal_croppe': 20345404, 'autre_refus': 20345405, 'cartonnette': 20345406, 'papier': 20345407, 'environnement': 20345408, 'Carton_gris': 20345409, 'Teint_Dans_La_Masse': 20345410, 'plastique': 20345411, 'metal': 20345412}]} args : 20345370 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 : ({'Carton_brun': 20345401, 'kraft': 20345402, 'flou': 20345403, 'mal_croppe': 20345404, 'autre_refus': 20345405, 'cartonnette': 20345406, 'papier': 20345407, 'environnement': 20345408, 'Carton_gris': 20345409, 'Teint_Dans_La_Masse': 20345410, 'plastique': 20345411, 'metal': 20345412},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20345370) 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([20345370]) 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.3265678882598877 time spend to save output : 4.38690185546875e-05 total time spend for step 3 : 0.3266117572784424 step4:send_mail_cod Fri Feb 7 19:17:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1335579994: ('0.024892283304878502',), 1335579507: ('0.024892283304878502',), 1335579443: ('0.024892283304878502',), 1335579386: ('0.024892283304878502',), 1335579324: ('0.024892283304878502',), 1335579285: ('0.024892283304878502',)} input_args_next_step : {1335579994: ()} output_args : {1335579994: ('0.024892283304878502',), 1335579507: ('0.024892283304878502',), 1335579443: ('0.024892283304878502',), 1335579386: ('0.024892283304878502',), 1335579324: ('0.024892283304878502',), 1335579285: ('0.024892283304878502',)} args : 1335579994 depend.output_id : 0 input_args_next_step : {1335579994: ('0.024892283304878502',), 1335579507: ()} output_args : {1335579994: ('0.024892283304878502',), 1335579507: ('0.024892283304878502',), 1335579443: ('0.024892283304878502',), 1335579386: ('0.024892283304878502',), 1335579324: ('0.024892283304878502',), 1335579285: ('0.024892283304878502',)} args : 1335579507 depend.output_id : 0 input_args_next_step : {1335579994: ('0.024892283304878502',), 1335579507: ('0.024892283304878502',), 1335579443: ()} output_args : {1335579994: ('0.024892283304878502',), 1335579507: ('0.024892283304878502',), 1335579443: ('0.024892283304878502',), 1335579386: ('0.024892283304878502',), 1335579324: ('0.024892283304878502',), 1335579285: ('0.024892283304878502',)} args : 1335579443 depend.output_id : 0 input_args_next_step : {1335579994: ('0.024892283304878502',), 1335579507: ('0.024892283304878502',), 1335579443: ('0.024892283304878502',), 1335579386: ()} output_args : {1335579994: ('0.024892283304878502',), 1335579507: ('0.024892283304878502',), 1335579443: ('0.024892283304878502',), 1335579386: ('0.024892283304878502',), 1335579324: ('0.024892283304878502',), 1335579285: ('0.024892283304878502',)} args : 1335579386 depend.output_id : 0 input_args_next_step : {1335579994: ('0.024892283304878502',), 1335579507: ('0.024892283304878502',), 1335579443: ('0.024892283304878502',), 1335579386: ('0.024892283304878502',), 1335579324: ()} output_args : {1335579994: ('0.024892283304878502',), 1335579507: ('0.024892283304878502',), 1335579443: ('0.024892283304878502',), 1335579386: ('0.024892283304878502',), 1335579324: ('0.024892283304878502',), 1335579285: ('0.024892283304878502',)} args : 1335579324 depend.output_id : 0 input_args_next_step : {1335579994: ('0.024892283304878502',), 1335579507: ('0.024892283304878502',), 1335579443: ('0.024892283304878502',), 1335579386: ('0.024892283304878502',), 1335579324: ('0.024892283304878502',), 1335579285: ()} output_args : {1335579994: ('0.024892283304878502',), 1335579507: ('0.024892283304878502',), 1335579443: ('0.024892283304878502',), 1335579386: ('0.024892283304878502',), 1335579324: ('0.024892283304878502',), 1335579285: ('0.024892283304878502',)} args : 1335579285 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 : {20345370: [{'Carton_brun': 20345401, 'kraft': 20345402, 'flou': 20345403, 'mal_croppe': 20345404, 'autre_refus': 20345405, 'cartonnette': 20345406, 'papier': 20345407, 'environnement': 20345408, 'Carton_gris': 20345409, 'Teint_Dans_La_Masse': 20345410, 'plastique': 20345411, 'metal': 20345412}]} input_args_next_step : {1335579994: ('0.024892283304878502',), 1335579507: ('0.024892283304878502',), 1335579443: ('0.024892283304878502',), 1335579386: ('0.024892283304878502',), 1335579324: ('0.024892283304878502',), 1335579285: ('0.024892283304878502',), 20345370: ()} output_args : {20345370: [{'Carton_brun': 20345401, 'kraft': 20345402, 'flou': 20345403, 'mal_croppe': 20345404, 'autre_refus': 20345405, 'cartonnette': 20345406, 'papier': 20345407, 'environnement': 20345408, 'Carton_gris': 20345409, 'Teint_Dans_La_Masse': 20345410, 'plastique': 20345411, 'metal': 20345412}]} args : 20345370 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 :7, first value : ('0.024892283304878502',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20345370) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos ph WHERE photo_id IN (1335579994,1335579507,1335579443,1335579386,1335579324,1335579285) Found this number of photos: 6 ##### Call download_photos : nb_thread : 5 begin to download photo : 1335579285 begin to download photo : 1335579386 begin to download photo : 1335579507 download finish for photo 1335579386 begin to download photo : 1335579443 download finish for photo 1335579507 begin to download photo : 1335579994 download finish for photo 1335579285 begin to download photo : 1335579324 download finish for photo 1335579443 download finish for photo 1335579994 download finish for photo 1335579324 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette203454021738952220/ imagette203454031738952220/ imagette203454041738952220/ length of list_filenames : 6 ; length of list_pids : 6 ; length of list_args : 6 results_Auto_P20345370_07-02-2025_19_17_00.pdf 20345402 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20345402 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette203454021738952220 20345403 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20345403 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette203454031738952220 20345404 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20345404 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette203454041738952220 20345405 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20345405 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1335579978: '1738952056_3490249_1335578918_c2b6d1c06eea789e42a40b143344adef_rle_crop_3660274863_0.png'} change filename to text .imagette203454051738952220/ imagette203454051738952220/1738952056_3490249_1335578918_c2b6d1c06eea789e42a40b143344adef_rle_crop_3660274863_0.png.png imagette203454061738952220/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/7/993b5615e6e4032eaa9d2d5791304183_10435719.png imagette203454051738952220 20345406 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20345406 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette203454061738952220 20345411 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20345411 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1335579993: '1738952072_3490440_1335578882_cb27f8cb26d5a52cb5344d574fc11494_rle_crop_3660274901_0.png'} change filename to text .imagette203454111738952220/ imagette203454111738952220/1738952072_3490440_1335578882_cb27f8cb26d5a52cb5344d574fc11494_rle_crop_3660274901_0.png.png imagette203454121738952220/ imagette203454011738952220/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/7/909c105f371a179a6cc3a0a3f7ba78f6_99254171.png imagette203454111738952220 20345412 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20345412 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette203454121738952220 20345401 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20345401 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette203454011738952220 20345409 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20345409 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1335579991: '1738952072_3490440_1335578882_cb27f8cb26d5a52cb5344d574fc11494_rle_crop_3660274902_0.png', 1335579992: '1738952072_3490440_1335578861_22dbf8b9ac3f817a35b9f9bb4df43479_rle_crop_3660274961_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/7/587a0981159d2587d5f3b01c6bb84d2e_32664727.png change filename to text .imagette203454091738952220/ imagette203454091738952220/1738952072_3490440_1335578861_22dbf8b9ac3f817a35b9f9bb4df43479_rle_crop_3660274961_0.png.png imagette203454091738952220/1738952072_3490440_1335578882_cb27f8cb26d5a52cb5344d574fc11494_rle_crop_3660274902_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/7/c07e91999b7c2978a62470f59d9a9574_79956346.png imagette203454091738952220 20345410 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20345410 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1335579977: '1738952056_3490249_1335578919_e4c4592595d17f20e5c46ec6a2d85b4b_rle_crop_3660274851_0.png', 1335579989: '1738952072_3490440_1335578874_b82d3eacac3c2f258edf9f725d2468df_rle_crop_3660274932_0.png', 1335579990: '1738952072_3490440_1335578868_cea8397652825de97687ccbec75f7cdc_rle_crop_3660274958_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/7/5aed1b4ca920bf8876213bd9c85fb4a1_10478912.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/7/98213e8b20a44b48a3f939785e92ac0b_81580906.png change filename to text .imagette203454101738952220/ imagette203454101738952220/1738952056_3490249_1335578919_e4c4592595d17f20e5c46ec6a2d85b4b_rle_crop_3660274851_0.png.png imagette203454101738952220/1738952072_3490440_1335578868_cea8397652825de97687ccbec75f7cdc_rle_crop_3660274958_0.png.png imagette203454101738952220/1738952072_3490440_1335578874_b82d3eacac3c2f258edf9f725d2468df_rle_crop_3660274932_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/7/8df38198c3fdfd454f900b3d4bd81222_31621427.png imagette203454101738952220 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=20345370 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/20345414,20345415,20345416,20345417,20345418,20345419,20345420,20345421,20345422,20345423,20345424,20345425?tags=Carton_brun,kraft,flou,mal_croppe,autre_refus,cartonnette,papier,environnement,Carton_gris,Teint_Dans_La_Masse,plastique,metal your option no_mail is active, we will not send the real mail to your client args[1335579994] : ('0.024892283304878502',) no score found for photo 1335579994 apple ('0.024892283304878502',) We are sending mail with results at report@fotonower.com args[1335579507] : ('0.024892283304878502',) no score found for photo 1335579507 apple ('0.024892283304878502',) We are sending mail with results at report@fotonower.com args[1335579443] : ('0.024892283304878502',) no score found for photo 1335579443 apple ('0.024892283304878502',) We are sending mail with results at report@fotonower.com args[1335579386] : ('0.024892283304878502',) no score found for photo 1335579386 apple ('0.024892283304878502',) We are sending mail with results at report@fotonower.com args[1335579324] : ('0.024892283304878502',) no score found for photo 1335579324 apple ('0.024892283304878502',) We are sending mail with results at report@fotonower.com args[1335579285] : ('0.024892283304878502',) no score found for photo 1335579285 apple ('0.024892283304878502',) We are sending mail with results at report@fotonower.com refus_total : 0.024892283304878502 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20345370 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_P20345370_07-02-2025_19_17_00.pdf results_Auto_P20345370_07-02-2025_19_17_00.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20345370_07-02-2025_19_17_00.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','20345370','results_Auto_P20345370_07-02-2025_19_17_00.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20345370_07-02-2025_19_17_00.pdf','pdf','','0.09','0.024892283304878502') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20345370]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1335579994, 1335579507, 1335579443, 1335579386, 1335579324, 1335579285] map_info['map_portfolio_photo'] : {20345370: [1335579994, 1335579507, 1335579443, 1335579386, 1335579324, 1335579285, 1335579215, 1335579212, 1335579209, 1335579207, 1335579158, 1335579151, 1335579144, 1335579112, 1335579110, 1335579109, 1335579107, 1335579105, 1335579020, 1335579018, 1335579016, 1335578956, 1335578953, 1335578921, 1335578919, 1335578918, 1335578917, 1335578885, 1335578882, 1335578879, 1335578874, 1335578868, 1335578861, 1335578834, 1335578818, 1335578816, 1335578762, 1335578757, 1335578755, 1335578754, 1335578733, 1335578729, 1335578728, 1335578726, 1335578724, 1335578683, 1335578652, 1335578649, 1335578646, 1335578644, 1335578642, 1335578640, 1335578614, 1335578610, 1335578607, 1335578603, 1335578569, 1335578565, 1335578560, 1335578552, 1335578545, 1335578542, 1335578452, 1335578449, 1335578446, 1335578443, 1335578441, 1335578269, 1335578265, 1335578262]} final : False mtd_id 4302 list_pids : [1335579994, 1335579507, 1335579443, 1335579386, 1335579324, 1335579285] 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, '2566394') ('4302', '20345370', '1335579994', None, None, None, None, None, '2566394') ('4302', None, None, None, None, None, None, None, '2566394') ('4302', '20345370', '1335579507', None, None, None, None, None, '2566394') ('4302', None, None, None, None, None, None, None, '2566394') ('4302', '20345370', '1335579443', None, None, None, None, None, '2566394') ('4302', None, None, None, None, None, None, None, '2566394') ('4302', '20345370', '1335579386', None, None, None, None, None, '2566394') ('4302', None, None, None, None, None, None, None, '2566394') ('4302', '20345370', '1335579324', None, None, None, None, None, '2566394') ('4302', None, None, None, None, None, None, None, '2566394') ('4302', '20345370', '1335579285', None, None, None, None, None, '2566394') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '20345370', '1335579994', None, None, None, None, None, '2566394'), ('4302', '20345370', '1335579507', None, None, None, None, None, '2566394'), ('4302', '20345370', '1335579443', None, None, None, None, None, '2566394'), ('4302', '20345370', '1335579386', None, None, None, None, None, '2566394'), ('4302', '20345370', '1335579324', None, None, None, None, None, '2566394'), ('4302', '20345370', '1335579285', None, None, None, None, None, '2566394')] time used for this insertion : 0.022255659103393555 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.7511835098266602 time spend to save output : 0.02250075340270996 total time spend for step 4 : 1.7736842632293701 step5:split_time_score Fri Feb 7 19:17: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 : ['20345370'] 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 : [('20345370',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20345370) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1335579386: {'path': 'temp/1738952220_724289_1335579386_703f755ad3c6c5a01f518402f04d20a2.jpg', 'extension': 'jpg'}, 1335579443: {'path': 'temp/1738952220_724289_1335579443_79cc21ba1562a1d1330f3ab1377e2d8b.jpg', 'extension': 'jpg'}, 1335579507: {'path': 'temp/1738952220_724289_1335579507_16f0964ab3e0b39dd756f1fc51fa7d9e.jpg', 'extension': 'jpg'}, 1335579994: {'path': 'temp/1738952220_724289_1335579994_773627be5ce7b2ca2409392cbc5c2b32.jpg', 'extension': 'jpg'}, 1335579285: {'path': 'temp/1738952220_724289_1335579285_653bb8545d4ab53263cda034d9d5795a.jpg', 'extension': 'jpg'}, 1335579324: {'path': 'temp/1738952220_724289_1335579324_15cfe46d1328acad578654122fcfe55d.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 = 20345370; (('arc_en_ciel_jrm',),) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 20345370 group by h (('19', 70),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20345370 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 (20345370) 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 (20345370) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 07022025 20345370 Nombre de photos uploadées : 70 / 23040 (0%) 07022025 20345370 Nombre de photos taguées (types de déchets): 0 / 70 (0%) 07022025 20345370 Nombre de photos taguées (volume) : 0 / 70 (0%) [{'photo_id': 1335578269, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/7/476b038c64eb08c706f3da077dc2b9b7.jpg', 'username': None, 'uploaded_at': 1738951267, 'text': 'image_07022025_19_00_14_10183.jpg'}, {'photo_id': 1335578265, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/7/5f4ec2961c5fe2497f26458466a9ba7d.jpg', 'username': None, 'uploaded_at': 1738951267, 'text': 'image_07022025_19_00_24_10133.jpg'}, {'photo_id': 1335578262, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/7/d36210e7a3ba33e2c9050fa5f376541f.jpg', 'username': None, 'uploaded_at': 1738951267, 'text': 'image_07022025_19_00_34_10134.jpg'}, {'photo_id': 1335578452, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/7/e4b28a3ed011ac20870580568b40db2e.jpg', 'username': None, 'uploaded_at': 1738951327, 'text': 'image_07022025_19_00_54_10136.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.9073486328125e-06 elapsed_time : order_list_meta_photo_and_scores 5.245208740234375e-06 ?????????????????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.00410771369934082 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 20345370, '2025-02-07' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1584783,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.028242111206054688 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= 1584783 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1584783, 'dashboard_run_id': 1594643, 'mtr_portfolio_id': 20344230, 'dashboard_result_id': 8769170, '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_P20344230_07-02-2025_18_48_57.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 20344231, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20344232, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20344233, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20344234, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20344235, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20344236, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20344237, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20344238, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20344239, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20344240, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20344241, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20344242, 'pht': 3726}}"}, {'dashboat_entry_day': 1584783, 'dashboard_run_id': 1594643, 'mtr_portfolio_id': 20344666, 'dashboard_result_id': 8769171, '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_P20344666_07-02-2025_19_02_57.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20344709, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20344710, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20344711, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20344712, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20344713, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20344714, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20344715, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20344716, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20344717, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20344718, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20344719, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20344720, 'pht': 3726}}"}, {'dashboat_entry_day': 1584783, 'dashboard_run_id': 1594643, 'mtr_portfolio_id': 20345370, 'dashboard_result_id': 8769172, '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_P20345370_07-02-2025_19_15_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20345401, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20345402, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20345403, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20345404, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20345405, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20345406, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20345407, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20345408, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20345409, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20345410, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20345411, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20345412, 'pht': 3726}}"}] SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 20344230 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': 2565947, 'mtr_portfolio_id': 20344230, 'created_at': datetime.datetime(2025, 2, 7, 18, 48, 57), 'result': '0.03734942722547355', 'result_long': None, 'result_double': None}] Qualite : 0.03734942722547355 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20344230 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20344230_07-02-2025_18_48_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20344230 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_P20344230_07-02-2025_18_48_57.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 20344231, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20344232, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20344233, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20344234, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20344235, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20344236, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20344237, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20344238, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20344239, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20344240, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20344241, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20344242, 'pht': 3726}}" where mtr_portfolio_id = 20344230 and dashboard_run_id = 1594643 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`=20344230 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (8769170, 0.03734942722547355, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20344230_07-02-2025_18_48_57.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 20344231, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20344232, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20344233, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20344234, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20344235, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20344236, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20344237, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20344238, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20344239, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20344240, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20344241, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20344242, '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 = 20344666 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': 2566126, 'mtr_portfolio_id': 20344666, 'created_at': datetime.datetime(2025, 2, 7, 19, 2, 57), 'result': '0.027172037783226806', 'result_long': None, 'result_double': None}] Qualite : 0.027172037783226806 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20344666 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20344666_07-02-2025_19_02_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20344666 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_P20344666_07-02-2025_19_02_57.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20344709, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20344710, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20344711, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20344712, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20344713, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20344714, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20344715, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20344716, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20344717, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20344718, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20344719, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20344720, 'pht': 3726}}" where mtr_portfolio_id = 20344666 and dashboard_run_id = 1594643 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`=20344666 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (8769171, 0.027172037783226806, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20344666_07-02-2025_19_02_57.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20344709, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20344710, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20344711, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20344712, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20344713, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20344714, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20344715, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20344716, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20344717, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20344718, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20344719, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20344720, '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 = 20345370 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': 2566394, 'mtr_portfolio_id': 20345370, 'created_at': datetime.datetime(2025, 2, 7, 19, 16, 59), 'result': '0.024892283304878502', 'result_long': None, 'result_double': None}] Qualite : 0.024892283304878502 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20345370 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20345370_07-02-2025_19_17_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20345370 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_P20345370_07-02-2025_19_17_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20345401, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20345402, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20345403, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20345404, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20345405, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20345406, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20345407, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20345408, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20345409, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20345410, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20345411, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20345412, 'pht': 3726}}" where mtr_portfolio_id = 20345370 and dashboard_run_id = 1594643 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`=20345370 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (8769172, 0.024892283304878502, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20345370_07-02-2025_19_17_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20345401, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20345402, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20345403, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20345404, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20345405, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20345406, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20345407, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20345408, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20345409, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20345410, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20345411, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20345412, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20344230,20344666,20345370) result : ((1335571074,), (1335571078,), (1335571082,), (1335571227,), (1335571253,), (1335571275,), (1335571278,), (1335571322,), (1335571325,), (1335571343,), (1335571344,), (1335571346,), (1335571367,), (1335571402,), (1335571403,), (1335571405,), (1335571407,), (1335571408,), (1335571410,), (1335571479,), (1335571532,), (1335571607,), (1335571613,), (1335571615,), (1335571654,), (1335571657,), (1335571658,), (1335571661,), (1335571726,), (1335571729,), (1335571739,), (1335571742,), (1335571747,), (1335571749,), (1335571887,), (1335571898,), (1335571911,), (1335571920,), (1335571926,), (1335571944,), (1335571946,), (1335571949,), (1335571952,), (1335571954,), (1335571961,), (1335571994,), (1335571995,), (1335571998,), (1335572001,), (1335572062,), (1335572064,), (1335572066,), (1335572068,), (1335572071,), (1335572096,), (1335572097,), (1335572099,), (1335572101,), (1335572300,), (1335572302,), (1335572304,), (1335572305,), (1335572343,), (1335572378,), (1335572379,), (1335572381,), (1335572383,), (1335572385,), (1335572430,), (1335572432,), (1335572434,), (1335572862,), (1335572717,), (1335572718,), (1335572764,), (1335572830,), (1335572840,), (1335572956,), (1335572960,), (1335572963,), (1335572968,), (1335572973,), (1335572977,), (1335572995,), (1335572996,), (1335573000,), (1335573121,), (1335573181,), (1335573318,), (1335573443,), (1335573813,), (1335573814,), (1335573816,), (1335575107,), (1335575283,), (1335575316,), (1335575320,), (1335575323,), (1335575341,), (1335575348,), (1335575351,), (1335575354,), (1335575737,), (1335575800,), (1335575831,), (1335575833,), (1335575836,), (1335575839,), (1335575940,), (1335575941,), (1335575942,), (1335575944,), (1335576338,), (1335576340,), (1335576351,), (1335576354,), (1335576357,), (1335576359,), (1335576909,), (1335576959,), (1335577026,), (1335577027,), (1335577030,), (1335577528,), (1335577541,), (1335577545,), (1335577549,), (1335577773,), (1335577775,), (1335577787,), (1335577862,), (1335577877,), (1335578184,), (1335578188,), (1335578192,), (1335578198,), (1335578205,), (1335578273,), (1335578262,), (1335578265,), (1335578269,), (1335578441,), (1335578443,), (1335578446,), (1335578449,), (1335578452,), (1335578542,), (1335578545,), (1335578552,), (1335578560,), (1335578565,), (1335578569,), (1335578603,), (1335578607,), (1335578610,), (1335578614,), (1335578640,), (1335578642,), (1335578644,), (1335578646,), (1335578649,), (1335578652,), (1335578683,), (1335578724,), (1335578726,), (1335578728,), (1335578729,), (1335578733,), (1335578754,), (1335578755,), (1335578757,), (1335578762,), (1335578816,), (1335578818,), (1335578834,), (1335578861,), (1335578868,), (1335578874,), (1335578879,), (1335578882,), (1335578885,), (1335578917,), (1335578918,), (1335578919,), (1335578921,), (1335578953,), (1335578956,), (1335579016,), (1335579018,), (1335579020,), (1335579105,), (1335579107,), (1335579109,), (1335579110,), (1335579112,), (1335579144,), (1335579151,), (1335579158,), (1335579207,), (1335579209,), (1335579212,), (1335579215,), (1335579285,), (1335579324,), (1335579386,), (1335579443,), (1335579507,), (1335579994,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'07022025': {'nb_upload': 70, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20345370]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1335579994, 1335579507, 1335579443, 1335579386, 1335579324, 1335579285] map_info['map_portfolio_photo'] : {20345370: [1335579994, 1335579507, 1335579443, 1335579386, 1335579324, 1335579285, 1335579215, 1335579212, 1335579209, 1335579207, 1335579158, 1335579151, 1335579144, 1335579112, 1335579110, 1335579109, 1335579107, 1335579105, 1335579020, 1335579018, 1335579016, 1335578956, 1335578953, 1335578921, 1335578919, 1335578918, 1335578917, 1335578885, 1335578882, 1335578879, 1335578874, 1335578868, 1335578861, 1335578834, 1335578818, 1335578816, 1335578762, 1335578757, 1335578755, 1335578754, 1335578733, 1335578729, 1335578728, 1335578726, 1335578724, 1335578683, 1335578652, 1335578649, 1335578646, 1335578644, 1335578642, 1335578640, 1335578614, 1335578610, 1335578607, 1335578603, 1335578569, 1335578565, 1335578560, 1335578552, 1335578545, 1335578542, 1335578452, 1335578449, 1335578446, 1335578443, 1335578441, 1335578269, 1335578265, 1335578262]} final : True mtd_id 4302 list_pids : [1335579994, 1335579507, 1335579443, 1335579386, 1335579324, 1335579285] Looping around the photos to save general results len do output : 1 /20345370Didn'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, '2566394') ('4302', '20345370', '1335579994', None, None, None, None, None, '2566394') ('4302', None, None, None, None, None, None, None, '2566394') ('4302', '20345370', '1335579507', None, None, None, None, None, '2566394') ('4302', None, None, None, None, None, None, None, '2566394') ('4302', '20345370', '1335579443', None, None, None, None, None, '2566394') ('4302', None, None, None, None, None, None, None, '2566394') ('4302', '20345370', '1335579386', None, None, None, None, None, '2566394') ('4302', None, None, None, None, None, None, None, '2566394') ('4302', '20345370', '1335579324', None, None, None, None, None, '2566394') ('4302', None, None, None, None, None, None, None, '2566394') ('4302', '20345370', '1335579285', None, None, None, None, None, '2566394') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 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, '20345370', 'None', None, None, None, None, '2566394'), ('4302', '20345370', '1335579994', None, None, None, None, None, '2566394'), ('4302', '20345370', '1335579507', None, None, None, None, None, '2566394'), ('4302', '20345370', '1335579443', None, None, None, None, None, '2566394'), ('4302', '20345370', '1335579386', None, None, None, None, None, '2566394'), ('4302', '20345370', '1335579324', None, None, None, None, None, '2566394'), ('4302', '20345370', '1335579285', None, None, None, None, None, '2566394')] time used for this insertion : 0.018220186233520508 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.3427276611328125 time spend to save output : 0.01845526695251465 total time spend for step 5 : 0.36118292808532715 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 (2566394) 1.85user 2.07system 0:07.24elapsed 54%CPU (0avgtext+0avgdata 157560maxresident)k 704inputs+5232outputs (15major+77862minor)pagefaults 0swaps