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 : 218073 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 (2649406) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2649406) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21155517 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2649406'] with mtr_portfolio_ids : ['21155517'] and first list_photo_ids : [] new path : /proc/218073/ Name: python3 Umask: 0002 State: R (running) Tgid: 218073 Ngid: 0 Pid: 218073 PPid: 218072 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 218073 NSpid: 218073 NSpgid: 214717 NSsid: 214717 VmPeak: 1106844 kB VmSize: 1106844 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98668 kB VmRSS: 98668 kB RssAnon: 59768 kB RssFile: 38900 kB RssShmem: 0 kB VmData: 865592 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 616 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 3/63054 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 47 nonvoluntary_ctxt_switches: 101 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '218073', 'Ngid': '0', 'Pid': '218073', 'PPid': '218072', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '218073', 'NSpid': '218073', 'NSpgid': '214717', 'NSsid': '214717', 'VmPeak': '1106844 kB', 'VmSize': '1106844 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98668 kB', 'VmRSS': '98668 kB', 'RssAnon': '59768 kB', 'RssFile': '38900 kB', 'RssShmem': '0 kB', 'VmData': '865592 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '616 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '3/63054', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '47', 'nonvoluntary_ctxt_switches': '101'} ('datou_batch_current', '218073', '1106844', '0', '1106844', '865592', '98668', b'', 'marlene', '2649406') 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 (21155517) 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 (2649406 ) ) 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 (21155517) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1341541818, 'portfolio_id': 21155517}, {'photo_id': 1341541813, 'portfolio_id': 21155517}, {'photo_id': 1341541801, 'portfolio_id': 21155517}, {'photo_id': 1341541790, 'portfolio_id': 21155517}, {'photo_id': 1341541779, 'portfolio_id': 21155517}, {'photo_id': 1341541774, 'portfolio_id': 21155517}, {'photo_id': 1341541720, 'portfolio_id': 21155517}, {'photo_id': 1341541710, 'portfolio_id': 21155517}, {'photo_id': 1341541674, 'portfolio_id': 21155517}, {'photo_id': 1341541669, 'portfolio_id': 21155517}, {'photo_id': 1341541656, 'portfolio_id': 21155517}, {'photo_id': 1341541528, 'portfolio_id': 21155517}, {'photo_id': 1341541506, 'portfolio_id': 21155517}, {'photo_id': 1341541500, 'portfolio_id': 21155517}, {'photo_id': 1341541461, 'portfolio_id': 21155517}, {'photo_id': 1341541458, 'portfolio_id': 21155517}] map_portfolio_id_photo_id: {21155517: [1341541818, 1341541813, 1341541801, 1341541790, 1341541779, 1341541774, 1341541720, 1341541710, 1341541674, 1341541669, 1341541656, 1341541528, 1341541506, 1341541500, 1341541461, 1341541458]} ##### 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.01446223258972168 #### 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 Mar 7 19:35:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21155517) 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 : 21155517 get user id for portfolio 21155517 get sub ptf for main ptf 21155517, type 3726 and hashtags ['environnement', 'Teint_Dans_La_Masse', 'metal', 'papier', 'autre_refus', 'plastique', 'Carton_brun', 'Carton_gris', 'cartonnette', 'flou', 'mal_croppe', 'kraft'] 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`=21155517 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','Teint_Dans_La_Masse','metal','papier','autre_refus','plastique','Carton_brun','Carton_gris','cartonnette','flou','mal_croppe','kraft')) 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`=21155517 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','Teint_Dans_La_Masse','metal','papier','autre_refus','plastique','Carton_brun','Carton_gris','cartonnette','flou','mal_croppe','kraft')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__07032025_19_30_04_10155_3726_environnement_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__07032025_19_30_04_10155_3726_Teint_Dans_La_Masse_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__07032025_19_30_04_10155_3726_metal_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__07032025_19_30_04_10155_3726_papier_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__07032025_19_30_04_10155_3726_autre_refus_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__07032025_19_30_04_10155_3726_plastique_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__07032025_19_30_04_10155_3726_Carton_brun_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__07032025_19_30_04_10155_3726_Carton_gris_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__07032025_19_30_04_10155_3726_cartonnette_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__07032025_19_30_04_10155_3726_flou_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__07032025_19_30_04_10155_3726_mal_croppe_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__07032025_19_30_04_10155_3726_kraft_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio INSERT IGNORE INTO MTRPhoto.mtr_port_to_port_ids (`mtr_portfolio_id_1`, `mtr_portfolio_id_2`, `type`, `min_score`, `hashtag_id`, `mtr_user_id`) VALUES (%s,%s,%s,%s,%s,%s)[[21155517, 21155598, 3726, 0.5, 493012381, 979], [21155517, 21155599, 3726, 0.5, 2107752385, 979], [21155517, 21155600, 3726, 0.5, 492628673, 979], [21155517, 21155601, 3726, 0.5, 492668766, 979], [21155517, 21155602, 3726, 0.5, 2107752406, 979], [21155517, 21155603, 3726, 0.5, 492725882, 979], [21155517, 21155610, 3726, 0.5, 2107753024, 979], [21155517, 21155617, 3726, 0.5, 2107753020, 979], [21155517, 21155618, 3726, 0.5, 702398920, 979], [21155517, 21155619, 3726, 0.5, 492777938, 979], [21155517, 21155620, 3726, 0.5, 2107755527, 979], [21155517, 21155621, 3726, 0.5, 493202403, 979]] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21155517 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','Teint_Dans_La_Masse','metal','papier','autre_refus','plastique','Carton_brun','Carton_gris','cartonnette','flou','mal_croppe','kraft')) 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`=21155517 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','Teint_Dans_La_Masse','metal','papier','autre_refus','plastique','Carton_brun','Carton_gris','cartonnette','flou','mal_croppe','kraft')) AND mptpi.`min_score`=0.5 To do returned map {'environnement': {'main_port_id': 21155517, 'sub_port_id': 21155598, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13753652, 'last_updated_at': datetime.datetime(2025, 3, 7, 19, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 3, 7, 19, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 3, 7, 19, 35, 1)}, 'Teint_Dans_La_Masse': {'main_port_id': 21155517, 'sub_port_id': 21155599, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13753653, 'last_updated_at': datetime.datetime(2025, 3, 7, 19, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 3, 7, 19, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 3, 7, 19, 35, 1)}, 'metal': {'main_port_id': 21155517, 'sub_port_id': 21155600, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13753654, 'last_updated_at': datetime.datetime(2025, 3, 7, 19, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 3, 7, 19, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 3, 7, 19, 35, 1)}, 'papier': {'main_port_id': 21155517, 'sub_port_id': 21155601, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13753655, 'last_updated_at': datetime.datetime(2025, 3, 7, 19, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 3, 7, 19, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 3, 7, 19, 35, 1)}, 'autre_refus': {'main_port_id': 21155517, 'sub_port_id': 21155602, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13753656, 'last_updated_at': datetime.datetime(2025, 3, 7, 19, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 3, 7, 19, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 3, 7, 19, 35, 1)}, 'plastique': {'main_port_id': 21155517, 'sub_port_id': 21155603, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13753657, 'last_updated_at': datetime.datetime(2025, 3, 7, 19, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 3, 7, 19, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 3, 7, 19, 35, 1)}, 'Carton_brun': {'main_port_id': 21155517, 'sub_port_id': 21155610, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13753658, 'last_updated_at': datetime.datetime(2025, 3, 7, 19, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 3, 7, 19, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 3, 7, 19, 35, 1)}, 'Carton_gris': {'main_port_id': 21155517, 'sub_port_id': 21155617, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13753659, 'last_updated_at': datetime.datetime(2025, 3, 7, 19, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 3, 7, 19, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 3, 7, 19, 35, 1)}, 'cartonnette': {'main_port_id': 21155517, 'sub_port_id': 21155618, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13753660, 'last_updated_at': datetime.datetime(2025, 3, 7, 19, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 3, 7, 19, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 3, 7, 19, 35, 1)}, 'flou': {'main_port_id': 21155517, 'sub_port_id': 21155619, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13753661, 'last_updated_at': datetime.datetime(2025, 3, 7, 19, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 3, 7, 19, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 3, 7, 19, 35, 1)}, 'mal_croppe': {'main_port_id': 21155517, 'sub_port_id': 21155620, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13753662, 'last_updated_at': datetime.datetime(2025, 3, 7, 19, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 3, 7, 19, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 3, 7, 19, 35, 1)}, 'kraft': {'main_port_id': 21155517, 'sub_port_id': 21155621, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13753663, 'last_updated_at': datetime.datetime(2025, 3, 7, 19, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 3, 7, 19, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 3, 7, 19, 35, 1)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21155598 , 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=21155517 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 (21155598) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21155517) result : ((1341541458,), (1341541461,), (1341541500,), (1341541506,), (1341541528,), (1341541656,), (1341541669,), (1341541674,), (1341541710,), (1341541720,), (1341541774,), (1341541779,), (1341541790,), (1341541801,), (1341541813,), (1341541818,)) 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 (1341541500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21155599 , 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=21155517 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 (21155599) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21155517) result : ((1341541458,), (1341541461,), (1341541500,), (1341541506,), (1341541528,), (1341541656,), (1341541669,), (1341541674,), (1341541710,), (1341541720,), (1341541774,), (1341541779,), (1341541790,), (1341541801,), (1341541813,), (1341541818,)) 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 (1341541500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21155600 , 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=21155517 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 (21155600) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21155517) result : ((1341541458,), (1341541461,), (1341541500,), (1341541506,), (1341541528,), (1341541656,), (1341541669,), (1341541674,), (1341541710,), (1341541720,), (1341541774,), (1341541779,), (1341541790,), (1341541801,), (1341541813,), (1341541818,)) 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 (1341541500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21155601 , 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=21155517 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 (21155601) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21155517) result : ((1341541458,), (1341541461,), (1341541500,), (1341541506,), (1341541528,), (1341541656,), (1341541669,), (1341541674,), (1341541710,), (1341541720,), (1341541774,), (1341541779,), (1341541790,), (1341541801,), (1341541813,), (1341541818,)) 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 (1341541500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21155602 , 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=21155517 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 (21155602) result : ((1341541979,), (1341541980,), (1341541981,), (1341541982,), (1341541983,), (1341541984,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21155517) result : ((1341541458,), (1341541461,), (1341541500,), (1341541506,), (1341541528,), (1341541656,), (1341541669,), (1341541674,), (1341541710,), (1341541720,), (1341541774,), (1341541779,), (1341541790,), (1341541801,), (1341541813,), (1341541818,)) 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 (1341541500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21155603 , 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=21155517 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 (21155603) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21155517) result : ((1341541458,), (1341541461,), (1341541500,), (1341541506,), (1341541528,), (1341541656,), (1341541669,), (1341541674,), (1341541710,), (1341541720,), (1341541774,), (1341541779,), (1341541790,), (1341541801,), (1341541813,), (1341541818,)) 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 (1341541500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21155610 , 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=21155517 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 (21155610) result : ((1341542005,), (1341542006,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21155517) result : ((1341541458,), (1341541461,), (1341541500,), (1341541506,), (1341541528,), (1341541656,), (1341541669,), (1341541674,), (1341541710,), (1341541720,), (1341541774,), (1341541779,), (1341541790,), (1341541801,), (1341541813,), (1341541818,)) 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 (1341541500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21155617 , 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=21155517 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 (21155617) result : ((1341541988,), (1341541989,), (1341541990,), (1341541991,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21155517) result : ((1341541458,), (1341541461,), (1341541500,), (1341541506,), (1341541528,), (1341541656,), (1341541669,), (1341541674,), (1341541710,), (1341541720,), (1341541774,), (1341541779,), (1341541790,), (1341541801,), (1341541813,), (1341541818,)) 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 (1341541500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21155618 , 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=21155517 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 (21155618) result : ((1341541998,), (1341541999,), (1341542000,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21155517) result : ((1341541458,), (1341541461,), (1341541500,), (1341541506,), (1341541528,), (1341541656,), (1341541669,), (1341541674,), (1341541710,), (1341541720,), (1341541774,), (1341541779,), (1341541790,), (1341541801,), (1341541813,), (1341541818,)) 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 (1341541500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21155619 , 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=21155517 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 (21155619) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21155517) result : ((1341541458,), (1341541461,), (1341541500,), (1341541506,), (1341541528,), (1341541656,), (1341541669,), (1341541674,), (1341541710,), (1341541720,), (1341541774,), (1341541779,), (1341541790,), (1341541801,), (1341541813,), (1341541818,)) 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 (1341541500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21155620 , 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=21155517 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 (21155620) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21155517) result : ((1341541458,), (1341541461,), (1341541500,), (1341541506,), (1341541528,), (1341541656,), (1341541669,), (1341541674,), (1341541710,), (1341541720,), (1341541774,), (1341541779,), (1341541790,), (1341541801,), (1341541813,), (1341541818,)) 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 (1341541500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21155621 , 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=21155517 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 (21155621) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21155517) result : ((1341541458,), (1341541461,), (1341541500,), (1341541506,), (1341541528,), (1341541656,), (1341541669,), (1341541674,), (1341541710,), (1341541720,), (1341541774,), (1341541779,), (1341541790,), (1341541801,), (1341541813,), (1341541818,)) 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 (1341541500) and cspi.crop_hashtag_id = chi.id; 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`=21155517 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','Teint_Dans_La_Masse','metal','papier','autre_refus','plastique','Carton_brun','Carton_gris','cartonnette','flou','mal_croppe','kraft')) 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`=21155517 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','Teint_Dans_La_Masse','metal','papier','autre_refus','plastique','Carton_brun','Carton_gris','cartonnette','flou','mal_croppe','kraft')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__07032025_19_30_04_10155_4417_environnement_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__07032025_19_30_04_10155_4417_Teint_Dans_La_Masse_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__07032025_19_30_04_10155_4417_metal_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__07032025_19_30_04_10155_4417_papier_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__07032025_19_30_04_10155_4417_autre_refus_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__07032025_19_30_04_10155_4417_plastique_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__07032025_19_30_04_10155_4417_Carton_brun_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__07032025_19_30_04_10155_4417_Carton_gris_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__07032025_19_30_04_10155_4417_cartonnette_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__07032025_19_30_04_10155_4417_flou_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__07032025_19_30_04_10155_4417_mal_croppe_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__07032025_19_30_04_10155_4417_kraft_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio INSERT IGNORE INTO MTRPhoto.mtr_port_to_port_ids (`mtr_portfolio_id_1`, `mtr_portfolio_id_2`, `type`, `min_score`, `hashtag_id`, `mtr_user_id`) VALUES (%s,%s,%s,%s,%s,%s)[[21155517, 21155622, 4417, 0.5, 493012381, 979], [21155517, 21155623, 4417, 0.5, 2107752385, 979], [21155517, 21155624, 4417, 0.5, 492628673, 979], [21155517, 21155625, 4417, 0.5, 492668766, 979], [21155517, 21155626, 4417, 0.5, 2107752406, 979], [21155517, 21155627, 4417, 0.5, 492725882, 979], [21155517, 21155628, 4417, 0.5, 2107753024, 979], [21155517, 21155629, 4417, 0.5, 2107753020, 979], [21155517, 21155630, 4417, 0.5, 702398920, 979], [21155517, 21155631, 4417, 0.5, 492777938, 979], [21155517, 21155632, 4417, 0.5, 2107755527, 979], [21155517, 21155633, 4417, 0.5, 493202403, 979]] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21155517 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','Teint_Dans_La_Masse','metal','papier','autre_refus','plastique','Carton_brun','Carton_gris','cartonnette','flou','mal_croppe','kraft')) 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`=21155517 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','Teint_Dans_La_Masse','metal','papier','autre_refus','plastique','Carton_brun','Carton_gris','cartonnette','flou','mal_croppe','kraft')) AND mptpi.`min_score`=0.5 To do returned map {'environnement': {'main_port_id': 21155517, 'sub_port_id': 21155622, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13753664, 'last_updated_at': datetime.datetime(2025, 3, 7, 19, 35, 2), 'last_updated_at_desc': datetime.datetime(2025, 3, 7, 19, 35, 2), 'last_updated_at_asc': datetime.datetime(2025, 3, 7, 19, 35, 2)}, 'Teint_Dans_La_Masse': {'main_port_id': 21155517, 'sub_port_id': 21155623, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13753665, 'last_updated_at': datetime.datetime(2025, 3, 7, 19, 35, 2), 'last_updated_at_desc': datetime.datetime(2025, 3, 7, 19, 35, 2), 'last_updated_at_asc': datetime.datetime(2025, 3, 7, 19, 35, 2)}, 'metal': {'main_port_id': 21155517, 'sub_port_id': 21155624, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13753666, 'last_updated_at': datetime.datetime(2025, 3, 7, 19, 35, 2), 'last_updated_at_desc': datetime.datetime(2025, 3, 7, 19, 35, 2), 'last_updated_at_asc': datetime.datetime(2025, 3, 7, 19, 35, 2)}, 'papier': {'main_port_id': 21155517, 'sub_port_id': 21155625, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13753667, 'last_updated_at': datetime.datetime(2025, 3, 7, 19, 35, 2), 'last_updated_at_desc': datetime.datetime(2025, 3, 7, 19, 35, 2), 'last_updated_at_asc': datetime.datetime(2025, 3, 7, 19, 35, 2)}, 'autre_refus': {'main_port_id': 21155517, 'sub_port_id': 21155626, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13753668, 'last_updated_at': datetime.datetime(2025, 3, 7, 19, 35, 2), 'last_updated_at_desc': datetime.datetime(2025, 3, 7, 19, 35, 2), 'last_updated_at_asc': datetime.datetime(2025, 3, 7, 19, 35, 2)}, 'plastique': {'main_port_id': 21155517, 'sub_port_id': 21155627, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13753669, 'last_updated_at': datetime.datetime(2025, 3, 7, 19, 35, 2), 'last_updated_at_desc': datetime.datetime(2025, 3, 7, 19, 35, 2), 'last_updated_at_asc': datetime.datetime(2025, 3, 7, 19, 35, 2)}, 'Carton_brun': {'main_port_id': 21155517, 'sub_port_id': 21155628, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13753670, 'last_updated_at': datetime.datetime(2025, 3, 7, 19, 35, 2), 'last_updated_at_desc': datetime.datetime(2025, 3, 7, 19, 35, 2), 'last_updated_at_asc': datetime.datetime(2025, 3, 7, 19, 35, 2)}, 'Carton_gris': {'main_port_id': 21155517, 'sub_port_id': 21155629, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13753671, 'last_updated_at': datetime.datetime(2025, 3, 7, 19, 35, 2), 'last_updated_at_desc': datetime.datetime(2025, 3, 7, 19, 35, 2), 'last_updated_at_asc': datetime.datetime(2025, 3, 7, 19, 35, 2)}, 'cartonnette': {'main_port_id': 21155517, 'sub_port_id': 21155630, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13753672, 'last_updated_at': datetime.datetime(2025, 3, 7, 19, 35, 2), 'last_updated_at_desc': datetime.datetime(2025, 3, 7, 19, 35, 2), 'last_updated_at_asc': datetime.datetime(2025, 3, 7, 19, 35, 2)}, 'flou': {'main_port_id': 21155517, 'sub_port_id': 21155631, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13753673, 'last_updated_at': datetime.datetime(2025, 3, 7, 19, 35, 2), 'last_updated_at_desc': datetime.datetime(2025, 3, 7, 19, 35, 2), 'last_updated_at_asc': datetime.datetime(2025, 3, 7, 19, 35, 2)}, 'mal_croppe': {'main_port_id': 21155517, 'sub_port_id': 21155632, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13753674, 'last_updated_at': datetime.datetime(2025, 3, 7, 19, 35, 2), 'last_updated_at_desc': datetime.datetime(2025, 3, 7, 19, 35, 2), 'last_updated_at_asc': datetime.datetime(2025, 3, 7, 19, 35, 2)}, 'kraft': {'main_port_id': 21155517, 'sub_port_id': 21155633, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13753675, 'last_updated_at': datetime.datetime(2025, 3, 7, 19, 35, 2), 'last_updated_at_desc': datetime.datetime(2025, 3, 7, 19, 35, 2), 'last_updated_at_asc': datetime.datetime(2025, 3, 7, 19, 35, 2)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21155622,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21155598 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21155623,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21155599 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21155624,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21155600 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21155625,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21155601 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21155626,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21155602 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21155627,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21155603 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21155628,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21155610 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21155629,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21155617 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21155630,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21155618 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21155631,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21155619 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21155632,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21155620 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21155633,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21155621 lien utilise dans velours : https://www.fotonower.com/velours/21155622,21155623,21155624,21155625,21155626,21155627,21155628,21155629,21155630,21155631,21155632,21155633?tags=environnement,Teint_Dans_La_Masse,metal,papier,autre_refus,plastique,Carton_brun,Carton_gris,cartonnette,flou,mal_croppe,kraft After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21155517]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1341541818, 1341541813, 1341541801, 1341541790, 1341541779, 1341541774, 1341541720, 1341541710, 1341541674, 1341541669, 1341541656, 1341541528, 1341541506, 1341541500, 1341541461, 1341541458] map_info['map_portfolio_photo'] : {21155517: [1341541818, 1341541813, 1341541801, 1341541790, 1341541779, 1341541774, 1341541720, 1341541710, 1341541674, 1341541669, 1341541656, 1341541528, 1341541506, 1341541500, 1341541461, 1341541458]} final : False mtd_id 4302 list_pids : [1341541818, 1341541813, 1341541801, 1341541790, 1341541779, 1341541774, 1341541720, 1341541710, 1341541674, 1341541669, 1341541656, 1341541528, 1341541506, 1341541500, 1341541461, 1341541458] Looping around the photos to save general results len do output : 1 /21155517. 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, '2649406') ('4302', '21155517', '1341541818', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541813', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541801', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541790', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541779', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541774', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541720', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541710', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541674', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541669', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541656', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541528', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541506', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541500', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541461', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541458', None, None, None, None, None, '2649406') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 17 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, '21155517', "{'environnement': 21155598, 'Teint_Dans_La_Masse': 21155599, 'metal': 21155600, 'papier': 21155601, 'autre_refus': 21155602, 'plastique': 21155603, 'Carton_brun': 21155610, 'Carton_gris': 21155617, 'cartonnette': 21155618, 'flou': 21155619, 'mal_croppe': 21155620, 'kraft': 21155621}", None, None, None, None, '2649406'), ('4302', '21155517', '1341541818', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541813', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541801', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541790', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541779', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541774', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541720', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541710', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541674', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541669', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541656', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541528', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541506', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541500', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541461', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541458', None, None, None, None, None, '2649406')] time used for this insertion : 0.015752553939819336 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.2316737174987793 time spend to save output : 0.01610088348388672 total time spend for step 1 : 1.247774600982666 step2:final Fri Mar 7 19:35: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 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 (21155517) 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 21155517 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1341541528,1341541506,1341541500,1341541461,1341541458,1341541720,1341541710,1341541674,1341541669,1341541656,1341541818,1341541813,1341541801,1341541790,1341541779,1341541774); 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([21155517]) Inside saveOutput : final : False verbose : True original output for save of step final : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ('0.06628188854320889',), 1341541779: ('0.06628188854320889',), 1341541774: ('0.06628188854320889',), 1341541720: ('0.06628188854320889',), 1341541710: ('0.06628188854320889',), 1341541674: ('0.06628188854320889',), 1341541669: ('0.06628188854320889',), 1341541656: ('0.06628188854320889',), 1341541528: ('0.06628188854320889',), 1341541506: ('0.06628188854320889',), 1341541500: ('0.06628188854320889',), 1341541461: ('0.06628188854320889',), 1341541458: ('0.06628188854320889',)} new output for save of step final : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ('0.06628188854320889',), 1341541779: ('0.06628188854320889',), 1341541774: ('0.06628188854320889',), 1341541720: ('0.06628188854320889',), 1341541710: ('0.06628188854320889',), 1341541674: ('0.06628188854320889',), 1341541669: ('0.06628188854320889',), 1341541656: ('0.06628188854320889',), 1341541528: ('0.06628188854320889',), 1341541506: ('0.06628188854320889',), 1341541500: ('0.06628188854320889',), 1341541461: ('0.06628188854320889',), 1341541458: ('0.06628188854320889',)} [1341541818, 1341541813, 1341541801, 1341541790, 1341541779, 1341541774, 1341541720, 1341541710, 1341541674, 1341541669, 1341541656, 1341541528, 1341541506, 1341541500, 1341541461, 1341541458] map_info['map_portfolio_photo'] : {21155517: [1341541818, 1341541813, 1341541801, 1341541790, 1341541779, 1341541774, 1341541720, 1341541710, 1341541674, 1341541669, 1341541656, 1341541528, 1341541506, 1341541500, 1341541461, 1341541458]} final : False mtd_id 4302 list_pids : [1341541818, 1341541813, 1341541801, 1341541790, 1341541779, 1341541774, 1341541720, 1341541710, 1341541674, 1341541669, 1341541656, 1341541528, 1341541506, 1341541500, 1341541461, 1341541458] Looping around the photos to save general results len do output : 16 /1341541818.Didn't retrieve data . /1341541813.Didn't retrieve data . /1341541801.Didn't retrieve data . /1341541790.Didn't retrieve data . /1341541779.Didn't retrieve data . /1341541774.Didn't retrieve data . /1341541720.Didn't retrieve data . /1341541710.Didn't retrieve data . /1341541674.Didn't retrieve data . /1341541669.Didn't retrieve data . /1341541656.Didn't retrieve data . /1341541528.Didn't retrieve data . /1341541506.Didn't retrieve data . /1341541500.Didn't retrieve data . /1341541461.Didn't retrieve data . /1341541458.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, '2649406') ('4302', '21155517', '1341541818', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541813', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541801', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541790', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541779', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541774', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541720', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541710', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541674', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541669', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541656', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541528', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541506', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541500', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541461', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541458', None, None, None, None, None, '2649406') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 48 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', '21155517', '1341541818', '0.06628188854320889', None, None, None, None, '2649406'), ('4302', '21155517', '1341541813', '0.06628188854320889', None, None, None, None, '2649406'), ('4302', '21155517', '1341541801', '0.06628188854320889', None, None, None, None, '2649406'), ('4302', '21155517', '1341541790', '0.06628188854320889', None, None, None, None, '2649406'), ('4302', '21155517', '1341541779', '0.06628188854320889', None, None, None, None, '2649406'), ('4302', '21155517', '1341541774', '0.06628188854320889', None, None, None, None, '2649406'), ('4302', '21155517', '1341541720', '0.06628188854320889', None, None, None, None, '2649406'), ('4302', '21155517', '1341541710', '0.06628188854320889', None, None, None, None, '2649406'), ('4302', '21155517', '1341541674', '0.06628188854320889', None, None, None, None, '2649406'), ('4302', '21155517', '1341541669', '0.06628188854320889', None, None, None, None, '2649406'), ('4302', '21155517', '1341541656', '0.06628188854320889', None, None, None, None, '2649406'), ('4302', '21155517', '1341541528', '0.06628188854320889', None, None, None, None, '2649406'), ('4302', '21155517', '1341541506', '0.06628188854320889', None, None, None, None, '2649406'), ('4302', '21155517', '1341541500', '0.06628188854320889', None, None, None, None, '2649406'), ('4302', '21155517', '1341541461', '0.06628188854320889', None, None, None, None, '2649406'), ('4302', '21155517', '1341541458', '0.06628188854320889', None, None, None, None, '2649406')] time used for this insertion : 0.014379739761352539 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.028899192810058594 time spend to save output : 0.01500844955444336 total time spend for step 2 : 0.04390764236450195 step3:velours_tree Fri Mar 7 19:35: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 : {21155517: [{'environnement': 21155598, 'Teint_Dans_La_Masse': 21155599, 'metal': 21155600, 'papier': 21155601, 'autre_refus': 21155602, 'plastique': 21155603, 'Carton_brun': 21155610, 'Carton_gris': 21155617, 'cartonnette': 21155618, 'flou': 21155619, 'mal_croppe': 21155620, 'kraft': 21155621}]} input_args_next_step : {21155517: ()} output_args : {21155517: [{'environnement': 21155598, 'Teint_Dans_La_Masse': 21155599, 'metal': 21155600, 'papier': 21155601, 'autre_refus': 21155602, 'plastique': 21155603, 'Carton_brun': 21155610, 'Carton_gris': 21155617, 'cartonnette': 21155618, 'flou': 21155619, 'mal_croppe': 21155620, 'kraft': 21155621}]} args : 21155517 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 : ({'environnement': 21155598, 'Teint_Dans_La_Masse': 21155599, 'metal': 21155600, 'papier': 21155601, 'autre_refus': 21155602, 'plastique': 21155603, 'Carton_brun': 21155610, 'Carton_gris': 21155617, 'cartonnette': 21155618, 'flou': 21155619, 'mal_croppe': 21155620, 'kraft': 21155621},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21155517) 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([21155517]) 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.33289289474487305 time spend to save output : 5.340576171875e-05 total time spend for step 3 : 0.3329463005065918 step4:send_mail_cod Fri Mar 7 19:35:03 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed 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 : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ('0.06628188854320889',), 1341541779: ('0.06628188854320889',), 1341541774: ('0.06628188854320889',), 1341541720: ('0.06628188854320889',), 1341541710: ('0.06628188854320889',), 1341541674: ('0.06628188854320889',), 1341541669: ('0.06628188854320889',), 1341541656: ('0.06628188854320889',), 1341541528: ('0.06628188854320889',), 1341541506: ('0.06628188854320889',), 1341541500: ('0.06628188854320889',), 1341541461: ('0.06628188854320889',), 1341541458: ('0.06628188854320889',)} input_args_next_step : {1341541818: ()} output_args : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ('0.06628188854320889',), 1341541779: ('0.06628188854320889',), 1341541774: ('0.06628188854320889',), 1341541720: ('0.06628188854320889',), 1341541710: ('0.06628188854320889',), 1341541674: ('0.06628188854320889',), 1341541669: ('0.06628188854320889',), 1341541656: ('0.06628188854320889',), 1341541528: ('0.06628188854320889',), 1341541506: ('0.06628188854320889',), 1341541500: ('0.06628188854320889',), 1341541461: ('0.06628188854320889',), 1341541458: ('0.06628188854320889',)} args : 1341541818 depend.output_id : 0 input_args_next_step : {1341541818: ('0.06628188854320889',), 1341541813: ()} output_args : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ('0.06628188854320889',), 1341541779: ('0.06628188854320889',), 1341541774: ('0.06628188854320889',), 1341541720: ('0.06628188854320889',), 1341541710: ('0.06628188854320889',), 1341541674: ('0.06628188854320889',), 1341541669: ('0.06628188854320889',), 1341541656: ('0.06628188854320889',), 1341541528: ('0.06628188854320889',), 1341541506: ('0.06628188854320889',), 1341541500: ('0.06628188854320889',), 1341541461: ('0.06628188854320889',), 1341541458: ('0.06628188854320889',)} args : 1341541813 depend.output_id : 0 input_args_next_step : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ()} output_args : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ('0.06628188854320889',), 1341541779: ('0.06628188854320889',), 1341541774: ('0.06628188854320889',), 1341541720: ('0.06628188854320889',), 1341541710: ('0.06628188854320889',), 1341541674: ('0.06628188854320889',), 1341541669: ('0.06628188854320889',), 1341541656: ('0.06628188854320889',), 1341541528: ('0.06628188854320889',), 1341541506: ('0.06628188854320889',), 1341541500: ('0.06628188854320889',), 1341541461: ('0.06628188854320889',), 1341541458: ('0.06628188854320889',)} args : 1341541801 depend.output_id : 0 input_args_next_step : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ()} output_args : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ('0.06628188854320889',), 1341541779: ('0.06628188854320889',), 1341541774: ('0.06628188854320889',), 1341541720: ('0.06628188854320889',), 1341541710: ('0.06628188854320889',), 1341541674: ('0.06628188854320889',), 1341541669: ('0.06628188854320889',), 1341541656: ('0.06628188854320889',), 1341541528: ('0.06628188854320889',), 1341541506: ('0.06628188854320889',), 1341541500: ('0.06628188854320889',), 1341541461: ('0.06628188854320889',), 1341541458: ('0.06628188854320889',)} args : 1341541790 depend.output_id : 0 input_args_next_step : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ('0.06628188854320889',), 1341541779: ()} output_args : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ('0.06628188854320889',), 1341541779: ('0.06628188854320889',), 1341541774: ('0.06628188854320889',), 1341541720: ('0.06628188854320889',), 1341541710: ('0.06628188854320889',), 1341541674: ('0.06628188854320889',), 1341541669: ('0.06628188854320889',), 1341541656: ('0.06628188854320889',), 1341541528: ('0.06628188854320889',), 1341541506: ('0.06628188854320889',), 1341541500: ('0.06628188854320889',), 1341541461: ('0.06628188854320889',), 1341541458: ('0.06628188854320889',)} args : 1341541779 depend.output_id : 0 input_args_next_step : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ('0.06628188854320889',), 1341541779: ('0.06628188854320889',), 1341541774: ()} output_args : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ('0.06628188854320889',), 1341541779: ('0.06628188854320889',), 1341541774: ('0.06628188854320889',), 1341541720: ('0.06628188854320889',), 1341541710: ('0.06628188854320889',), 1341541674: ('0.06628188854320889',), 1341541669: ('0.06628188854320889',), 1341541656: ('0.06628188854320889',), 1341541528: ('0.06628188854320889',), 1341541506: ('0.06628188854320889',), 1341541500: ('0.06628188854320889',), 1341541461: ('0.06628188854320889',), 1341541458: ('0.06628188854320889',)} args : 1341541774 depend.output_id : 0 input_args_next_step : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ('0.06628188854320889',), 1341541779: ('0.06628188854320889',), 1341541774: ('0.06628188854320889',), 1341541720: ()} output_args : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ('0.06628188854320889',), 1341541779: ('0.06628188854320889',), 1341541774: ('0.06628188854320889',), 1341541720: ('0.06628188854320889',), 1341541710: ('0.06628188854320889',), 1341541674: ('0.06628188854320889',), 1341541669: ('0.06628188854320889',), 1341541656: ('0.06628188854320889',), 1341541528: ('0.06628188854320889',), 1341541506: ('0.06628188854320889',), 1341541500: ('0.06628188854320889',), 1341541461: ('0.06628188854320889',), 1341541458: ('0.06628188854320889',)} args : 1341541720 depend.output_id : 0 input_args_next_step : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ('0.06628188854320889',), 1341541779: ('0.06628188854320889',), 1341541774: ('0.06628188854320889',), 1341541720: ('0.06628188854320889',), 1341541710: ()} output_args : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ('0.06628188854320889',), 1341541779: ('0.06628188854320889',), 1341541774: ('0.06628188854320889',), 1341541720: ('0.06628188854320889',), 1341541710: ('0.06628188854320889',), 1341541674: ('0.06628188854320889',), 1341541669: ('0.06628188854320889',), 1341541656: ('0.06628188854320889',), 1341541528: ('0.06628188854320889',), 1341541506: ('0.06628188854320889',), 1341541500: ('0.06628188854320889',), 1341541461: ('0.06628188854320889',), 1341541458: ('0.06628188854320889',)} args : 1341541710 depend.output_id : 0 input_args_next_step : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ('0.06628188854320889',), 1341541779: ('0.06628188854320889',), 1341541774: ('0.06628188854320889',), 1341541720: ('0.06628188854320889',), 1341541710: ('0.06628188854320889',), 1341541674: ()} output_args : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ('0.06628188854320889',), 1341541779: ('0.06628188854320889',), 1341541774: ('0.06628188854320889',), 1341541720: ('0.06628188854320889',), 1341541710: ('0.06628188854320889',), 1341541674: ('0.06628188854320889',), 1341541669: ('0.06628188854320889',), 1341541656: ('0.06628188854320889',), 1341541528: ('0.06628188854320889',), 1341541506: ('0.06628188854320889',), 1341541500: ('0.06628188854320889',), 1341541461: ('0.06628188854320889',), 1341541458: ('0.06628188854320889',)} args : 1341541674 depend.output_id : 0 input_args_next_step : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ('0.06628188854320889',), 1341541779: ('0.06628188854320889',), 1341541774: ('0.06628188854320889',), 1341541720: ('0.06628188854320889',), 1341541710: ('0.06628188854320889',), 1341541674: ('0.06628188854320889',), 1341541669: ()} output_args : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ('0.06628188854320889',), 1341541779: ('0.06628188854320889',), 1341541774: ('0.06628188854320889',), 1341541720: ('0.06628188854320889',), 1341541710: ('0.06628188854320889',), 1341541674: ('0.06628188854320889',), 1341541669: ('0.06628188854320889',), 1341541656: ('0.06628188854320889',), 1341541528: ('0.06628188854320889',), 1341541506: ('0.06628188854320889',), 1341541500: ('0.06628188854320889',), 1341541461: ('0.06628188854320889',), 1341541458: ('0.06628188854320889',)} args : 1341541669 depend.output_id : 0 input_args_next_step : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ('0.06628188854320889',), 1341541779: ('0.06628188854320889',), 1341541774: ('0.06628188854320889',), 1341541720: ('0.06628188854320889',), 1341541710: ('0.06628188854320889',), 1341541674: ('0.06628188854320889',), 1341541669: ('0.06628188854320889',), 1341541656: ()} output_args : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ('0.06628188854320889',), 1341541779: ('0.06628188854320889',), 1341541774: ('0.06628188854320889',), 1341541720: ('0.06628188854320889',), 1341541710: ('0.06628188854320889',), 1341541674: ('0.06628188854320889',), 1341541669: ('0.06628188854320889',), 1341541656: ('0.06628188854320889',), 1341541528: ('0.06628188854320889',), 1341541506: ('0.06628188854320889',), 1341541500: ('0.06628188854320889',), 1341541461: ('0.06628188854320889',), 1341541458: ('0.06628188854320889',)} args : 1341541656 depend.output_id : 0 input_args_next_step : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ('0.06628188854320889',), 1341541779: ('0.06628188854320889',), 1341541774: ('0.06628188854320889',), 1341541720: ('0.06628188854320889',), 1341541710: ('0.06628188854320889',), 1341541674: ('0.06628188854320889',), 1341541669: ('0.06628188854320889',), 1341541656: ('0.06628188854320889',), 1341541528: ()} output_args : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ('0.06628188854320889',), 1341541779: ('0.06628188854320889',), 1341541774: ('0.06628188854320889',), 1341541720: ('0.06628188854320889',), 1341541710: ('0.06628188854320889',), 1341541674: ('0.06628188854320889',), 1341541669: ('0.06628188854320889',), 1341541656: ('0.06628188854320889',), 1341541528: ('0.06628188854320889',), 1341541506: ('0.06628188854320889',), 1341541500: ('0.06628188854320889',), 1341541461: ('0.06628188854320889',), 1341541458: ('0.06628188854320889',)} args : 1341541528 depend.output_id : 0 input_args_next_step : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ('0.06628188854320889',), 1341541779: ('0.06628188854320889',), 1341541774: ('0.06628188854320889',), 1341541720: ('0.06628188854320889',), 1341541710: ('0.06628188854320889',), 1341541674: ('0.06628188854320889',), 1341541669: ('0.06628188854320889',), 1341541656: ('0.06628188854320889',), 1341541528: ('0.06628188854320889',), 1341541506: ()} output_args : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ('0.06628188854320889',), 1341541779: ('0.06628188854320889',), 1341541774: ('0.06628188854320889',), 1341541720: ('0.06628188854320889',), 1341541710: ('0.06628188854320889',), 1341541674: ('0.06628188854320889',), 1341541669: ('0.06628188854320889',), 1341541656: ('0.06628188854320889',), 1341541528: ('0.06628188854320889',), 1341541506: ('0.06628188854320889',), 1341541500: ('0.06628188854320889',), 1341541461: ('0.06628188854320889',), 1341541458: ('0.06628188854320889',)} args : 1341541506 depend.output_id : 0 input_args_next_step : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ('0.06628188854320889',), 1341541779: ('0.06628188854320889',), 1341541774: ('0.06628188854320889',), 1341541720: ('0.06628188854320889',), 1341541710: ('0.06628188854320889',), 1341541674: ('0.06628188854320889',), 1341541669: ('0.06628188854320889',), 1341541656: ('0.06628188854320889',), 1341541528: ('0.06628188854320889',), 1341541506: ('0.06628188854320889',), 1341541500: ()} output_args : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ('0.06628188854320889',), 1341541779: ('0.06628188854320889',), 1341541774: ('0.06628188854320889',), 1341541720: ('0.06628188854320889',), 1341541710: ('0.06628188854320889',), 1341541674: ('0.06628188854320889',), 1341541669: ('0.06628188854320889',), 1341541656: ('0.06628188854320889',), 1341541528: ('0.06628188854320889',), 1341541506: ('0.06628188854320889',), 1341541500: ('0.06628188854320889',), 1341541461: ('0.06628188854320889',), 1341541458: ('0.06628188854320889',)} args : 1341541500 depend.output_id : 0 input_args_next_step : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ('0.06628188854320889',), 1341541779: ('0.06628188854320889',), 1341541774: ('0.06628188854320889',), 1341541720: ('0.06628188854320889',), 1341541710: ('0.06628188854320889',), 1341541674: ('0.06628188854320889',), 1341541669: ('0.06628188854320889',), 1341541656: ('0.06628188854320889',), 1341541528: ('0.06628188854320889',), 1341541506: ('0.06628188854320889',), 1341541500: ('0.06628188854320889',), 1341541461: ()} output_args : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ('0.06628188854320889',), 1341541779: ('0.06628188854320889',), 1341541774: ('0.06628188854320889',), 1341541720: ('0.06628188854320889',), 1341541710: ('0.06628188854320889',), 1341541674: ('0.06628188854320889',), 1341541669: ('0.06628188854320889',), 1341541656: ('0.06628188854320889',), 1341541528: ('0.06628188854320889',), 1341541506: ('0.06628188854320889',), 1341541500: ('0.06628188854320889',), 1341541461: ('0.06628188854320889',), 1341541458: ('0.06628188854320889',)} args : 1341541461 depend.output_id : 0 input_args_next_step : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ('0.06628188854320889',), 1341541779: ('0.06628188854320889',), 1341541774: ('0.06628188854320889',), 1341541720: ('0.06628188854320889',), 1341541710: ('0.06628188854320889',), 1341541674: ('0.06628188854320889',), 1341541669: ('0.06628188854320889',), 1341541656: ('0.06628188854320889',), 1341541528: ('0.06628188854320889',), 1341541506: ('0.06628188854320889',), 1341541500: ('0.06628188854320889',), 1341541461: ('0.06628188854320889',), 1341541458: ()} output_args : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ('0.06628188854320889',), 1341541779: ('0.06628188854320889',), 1341541774: ('0.06628188854320889',), 1341541720: ('0.06628188854320889',), 1341541710: ('0.06628188854320889',), 1341541674: ('0.06628188854320889',), 1341541669: ('0.06628188854320889',), 1341541656: ('0.06628188854320889',), 1341541528: ('0.06628188854320889',), 1341541506: ('0.06628188854320889',), 1341541500: ('0.06628188854320889',), 1341541461: ('0.06628188854320889',), 1341541458: ('0.06628188854320889',)} args : 1341541458 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 : {21155517: [{'environnement': 21155598, 'Teint_Dans_La_Masse': 21155599, 'metal': 21155600, 'papier': 21155601, 'autre_refus': 21155602, 'plastique': 21155603, 'Carton_brun': 21155610, 'Carton_gris': 21155617, 'cartonnette': 21155618, 'flou': 21155619, 'mal_croppe': 21155620, 'kraft': 21155621}]} input_args_next_step : {1341541818: ('0.06628188854320889',), 1341541813: ('0.06628188854320889',), 1341541801: ('0.06628188854320889',), 1341541790: ('0.06628188854320889',), 1341541779: ('0.06628188854320889',), 1341541774: ('0.06628188854320889',), 1341541720: ('0.06628188854320889',), 1341541710: ('0.06628188854320889',), 1341541674: ('0.06628188854320889',), 1341541669: ('0.06628188854320889',), 1341541656: ('0.06628188854320889',), 1341541528: ('0.06628188854320889',), 1341541506: ('0.06628188854320889',), 1341541500: ('0.06628188854320889',), 1341541461: ('0.06628188854320889',), 1341541458: ('0.06628188854320889',), 21155517: ()} output_args : {21155517: [{'environnement': 21155598, 'Teint_Dans_La_Masse': 21155599, 'metal': 21155600, 'papier': 21155601, 'autre_refus': 21155602, 'plastique': 21155603, 'Carton_brun': 21155610, 'Carton_gris': 21155617, 'cartonnette': 21155618, 'flou': 21155619, 'mal_croppe': 21155620, 'kraft': 21155621}]} args : 21155517 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 :17, first value : ('0.06628188854320889',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21155517) 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 (1341541818,1341541813,1341541801,1341541790,1341541779,1341541774,1341541720,1341541710,1341541674,1341541669,1341541656,1341541528,1341541506,1341541500,1341541461,1341541458) Found this number of photos: 16 ##### Call download_photos : nb_thread : 5 begin to download photo : 1341541458 begin to download photo : 1341541528 begin to download photo : 1341541710 begin to download photo : 1341541790 download finish for photo 1341541528 begin to download photo : 1341541656 download finish for photo 1341541458 begin to download photo : 1341541461 download finish for photo 1341541790 begin to download photo : 1341541801 download finish for photo 1341541710 begin to download photo : 1341541720 download finish for photo 1341541461 begin to download photo : 1341541500 download finish for photo 1341541801 begin to download photo : 1341541813 download finish for photo 1341541656 begin to download photo : 1341541669 download finish for photo 1341541720 begin to download photo : 1341541774 download finish for photo 1341541813 begin to download photo : 1341541818 download finish for photo 1341541500 begin to download photo : 1341541506 download finish for photo 1341541669 begin to download photo : 1341541674 download finish for photo 1341541774 begin to download photo : 1341541779 download finish for photo 1341541818 download finish for photo 1341541674 download finish for photo 1341541506 download finish for photo 1341541779 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette211556001741372503/ length of list_filenames : 16 ; length of list_pids : 16 ; length of list_args : 16 results_Auto_P21155517_07-03-2025_19_35_03.pdf 21155600 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=21155600 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette211556001741372503 21155602 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=21155602 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1341541979: '1741372413_442986_1341541528_34b33b2ae3257202936baee734312b28_rle_crop_3697758930_0.png', 1341541980: '1741372413_442986_1341541506_f1727a149435088717a65b8786209b53_rle_crop_3697758961_0.png', 1341541981: '1741372413_442986_1341541500_b0bd0f7199b9ca388c8b0c3781193800_rle_crop_3697759023_0.png', 1341541982: '1741372413_442986_1341541500_b0bd0f7199b9ca388c8b0c3781193800_rle_crop_3697759034_0.png', 1341541983: '1741372413_442986_1341541461_bc98e321b02de0f5d950006f51598dab_rle_crop_3697759053_0.png', 1341541984: '1741372413_442986_1341541458_dfbb4384c373e455fbca2346826530fa_rle_crop_3697759063_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/7/86a5db29196d0b508e81fe0f8c260241_66186954.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/7/1e2fa0a98441e4d0b7add4ef86c5cb50_20304725.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/7/d091c8b2261660b213d0d26feba79769_8747397.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/7/fa789c8f8059d1a0d54156aae17f9dc6_26875646.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/7/f212c1e85dda0d455c9383977d92c544_84195066.png change filename to text .imagette211556021741372503/ imagette211556021741372503/1741372413_442986_1341541528_34b33b2ae3257202936baee734312b28_rle_crop_3697758930_0.png.png imagette211556021741372503/1741372413_442986_1341541506_f1727a149435088717a65b8786209b53_rle_crop_3697758961_0.png.png imagette211556021741372503/1741372413_442986_1341541461_bc98e321b02de0f5d950006f51598dab_rle_crop_3697759053_0.png.png imagette211556021741372503/1741372413_442986_1341541500_b0bd0f7199b9ca388c8b0c3781193800_rle_crop_3697759034_0.png.png imagette211556021741372503/1741372413_442986_1341541500_b0bd0f7199b9ca388c8b0c3781193800_rle_crop_3697759023_0.png.png imagette211556021741372503/1741372413_442986_1341541458_dfbb4384c373e455fbca2346826530fa_rle_crop_3697759063_0.png.png imagette211556031741372503/ wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/7/59bd5d4a89f06f76badcdac4dc52d2d1_99034081.png imagette211556021741372503 21155603 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=21155603 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette211556031741372503 21155618 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=21155618 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1341541998: '1741372413_442986_1341541506_f1727a149435088717a65b8786209b53_rle_crop_3697758958_0.png', 1341541999: '1741372413_442986_1341541500_b0bd0f7199b9ca388c8b0c3781193800_rle_crop_3697759028_0.png', 1341542000: '1741372413_442986_1341541458_dfbb4384c373e455fbca2346826530fa_rle_crop_3697759060_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/7/4725b257c56f0dcaad4c79aaa4de6e74_95904850.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/7/01756be9c555e4284f115d756c95b852_53226785.png change filename to text .imagette211556181741372503/ imagette211556181741372503/1741372413_442986_1341541500_b0bd0f7199b9ca388c8b0c3781193800_rle_crop_3697759028_0.png.png imagette211556181741372503/1741372413_442986_1341541458_dfbb4384c373e455fbca2346826530fa_rle_crop_3697759060_0.png.png imagette211556181741372503/1741372413_442986_1341541506_f1727a149435088717a65b8786209b53_rle_crop_3697758958_0.png.png imagette211556191741372504/ imagette211556201741372504/ imagette211556211741372504/ imagette211555991741372504/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/7/8045743d0ea6611bf3ab85fa60b967fe_38230663.png imagette211556181741372503 21155619 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=21155619 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette211556191741372504 21155620 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=21155620 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette211556201741372504 21155621 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=21155621 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette211556211741372504 21155599 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=21155599 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette211555991741372504 21155610 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=21155610 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1341542005: '1741372413_442986_1341541528_34b33b2ae3257202936baee734312b28_rle_crop_3697758933_0.png', 1341542006: '1741372413_442986_1341541461_bc98e321b02de0f5d950006f51598dab_rle_crop_3697759051_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/7/428746b0ee3568a5068fbb1b6dcf61d1_20704916.png change filename to text .imagette211556101741372504/ imagette211556101741372504/1741372413_442986_1341541461_bc98e321b02de0f5d950006f51598dab_rle_crop_3697759051_0.png.png imagette211556101741372504/1741372413_442986_1341541528_34b33b2ae3257202936baee734312b28_rle_crop_3697758933_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/7/588b237d5321871f778a606fcb2d38eb_54259858.png imagette211556101741372504 21155617 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=21155617 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1341541988: '1741372413_442986_1341541506_f1727a149435088717a65b8786209b53_rle_crop_3697758955_0.png', 1341541989: '1741372413_442986_1341541500_b0bd0f7199b9ca388c8b0c3781193800_rle_crop_3697759021_0.png', 1341541990: '1741372413_442986_1341541461_bc98e321b02de0f5d950006f51598dab_rle_crop_3697759043_0.png', 1341541991: '1741372413_442986_1341541461_bc98e321b02de0f5d950006f51598dab_rle_crop_3697759052_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/7/4ae413cae50b05e6e33298d12a135b00_4638264.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/7/682ec5ae904ce9441ea8fe7bede07981_9872285.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/7/9b6ee59d3b8e1607108edd155da85d24_51255259.png change filename to text .imagette211556171741372504/ imagette211556171741372504/1741372413_442986_1341541500_b0bd0f7199b9ca388c8b0c3781193800_rle_crop_3697759021_0.png.png imagette211556171741372504/1741372413_442986_1341541506_f1727a149435088717a65b8786209b53_rle_crop_3697758955_0.png.png imagette211556171741372504/1741372413_442986_1341541461_bc98e321b02de0f5d950006f51598dab_rle_crop_3697759052_0.png.png imagette211556171741372504/1741372413_442986_1341541461_bc98e321b02de0f5d950006f51598dab_rle_crop_3697759043_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/7/ebe182415291640a231efee1233c2302_25980851.png imagette211556171741372504 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=21155517 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/21155622,21155623,21155624,21155625,21155626,21155627,21155628,21155629,21155630,21155631,21155632,21155633?tags=environnement,Teint_Dans_La_Masse,metal,papier,autre_refus,plastique,Carton_brun,Carton_gris,cartonnette,flou,mal_croppe,kraft your option no_mail is active, we will not send the real mail to your client args[1341541818] : ('0.06628188854320889',) no score found for photo 1341541818 We are sending mail with results at report@fotonower.com args[1341541813] : ('0.06628188854320889',) no score found for photo 1341541813 We are sending mail with results at report@fotonower.com args[1341541801] : ('0.06628188854320889',) no score found for photo 1341541801 We are sending mail with results at report@fotonower.com args[1341541790] : ('0.06628188854320889',) no score found for photo 1341541790 We are sending mail with results at report@fotonower.com args[1341541779] : ('0.06628188854320889',) no score found for photo 1341541779 We are sending mail with results at report@fotonower.com args[1341541774] : ('0.06628188854320889',) no score found for photo 1341541774 We are sending mail with results at report@fotonower.com args[1341541720] : ('0.06628188854320889',) no score found for photo 1341541720 We are sending mail with results at report@fotonower.com args[1341541710] : ('0.06628188854320889',) no score found for photo 1341541710 We are sending mail with results at report@fotonower.com args[1341541674] : ('0.06628188854320889',) no score found for photo 1341541674 We are sending mail with results at report@fotonower.com args[1341541669] : ('0.06628188854320889',) no score found for photo 1341541669 We are sending mail with results at report@fotonower.com args[1341541656] : ('0.06628188854320889',) no score found for photo 1341541656 We are sending mail with results at report@fotonower.com args[1341541528] : ('0.06628188854320889',) no score found for photo 1341541528 We are sending mail with results at report@fotonower.com args[1341541506] : ('0.06628188854320889',) no score found for photo 1341541506 We are sending mail with results at report@fotonower.com args[1341541500] : ('0.06628188854320889',) no score found for photo 1341541500 We are sending mail with results at report@fotonower.com args[1341541461] : ('0.06628188854320889',) no score found for photo 1341541461 We are sending mail with results at report@fotonower.com args[1341541458] : ('0.06628188854320889',) no score found for photo 1341541458 We are sending mail with results at report@fotonower.com refus_total : 0.06628188854320889 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=21155517 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_P21155517_07-03-2025_19_35_03.pdf results_Auto_P21155517_07-03-2025_19_35_03.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21155517_07-03-2025_19_35_03.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','21155517','results_Auto_P21155517_07-03-2025_19_35_03.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21155517_07-03-2025_19_35_03.pdf','pdf','','0.19','0.06628188854320889') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21155517]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1341541818, 1341541813, 1341541801, 1341541790, 1341541779, 1341541774, 1341541720, 1341541710, 1341541674, 1341541669, 1341541656, 1341541528, 1341541506, 1341541500, 1341541461, 1341541458] map_info['map_portfolio_photo'] : {21155517: [1341541818, 1341541813, 1341541801, 1341541790, 1341541779, 1341541774, 1341541720, 1341541710, 1341541674, 1341541669, 1341541656, 1341541528, 1341541506, 1341541500, 1341541461, 1341541458]} final : False mtd_id 4302 list_pids : [1341541818, 1341541813, 1341541801, 1341541790, 1341541779, 1341541774, 1341541720, 1341541710, 1341541674, 1341541669, 1341541656, 1341541528, 1341541506, 1341541500, 1341541461, 1341541458] 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, '2649406') ('4302', '21155517', '1341541818', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541813', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541801', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541790', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541779', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541774', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541720', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541710', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541674', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541669', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541656', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541528', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541506', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541500', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541461', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541458', None, None, None, None, None, '2649406') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 16 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', '21155517', '1341541818', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541813', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541801', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541790', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541779', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541774', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541720', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541710', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541674', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541669', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541656', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541528', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541506', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541500', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541461', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541458', None, None, None, None, None, '2649406')] time used for this insertion : 0.014858722686767578 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.520540952682495 time spend to save output : 0.01512908935546875 total time spend for step 4 : 2.535670042037964 step5:split_time_score Fri Mar 7 19:35:05 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 : ['21155517'] 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 : [('21155517',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21155517) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1341541790: {'path': 'temp/1741372503_218073_1341541790_01fc49a918ea26279015b285f6a06516.jpg', 'extension': 'jpg'}, 1341541801: {'path': 'temp/1741372503_218073_1341541801_997fa0ac4ef59f53c02f3c66faf0becd.jpg', 'extension': 'jpg'}, 1341541813: {'path': 'temp/1741372503_218073_1341541813_21b03bea57da2dd4ad02d6f7be728d97.jpg', 'extension': 'jpg'}, 1341541818: {'path': 'temp/1741372503_218073_1341541818_425335a19310bb087f3222e5457aadd8.jpg', 'extension': 'jpg'}, 1341541528: {'path': 'temp/1741372503_218073_1341541528_34b33b2ae3257202936baee734312b28.jpg', 'extension': 'jpg'}, 1341541656: {'path': 'temp/1741372503_218073_1341541656_bbaf0818c430da90dfd6622f4b1a2ec5.jpg', 'extension': 'jpg'}, 1341541669: {'path': 'temp/1741372503_218073_1341541669_3998a8d28a9cc2f2b8a9ddd31062d23a.jpg', 'extension': 'jpg'}, 1341541674: {'path': 'temp/1741372503_218073_1341541674_485c3ac9b2972998e3d24bfbda840c16.jpg', 'extension': 'jpg'}, 1341541458: {'path': 'temp/1741372503_218073_1341541458_dfbb4384c373e455fbca2346826530fa.jpg', 'extension': 'jpg'}, 1341541461: {'path': 'temp/1741372503_218073_1341541461_bc98e321b02de0f5d950006f51598dab.jpg', 'extension': 'jpg'}, 1341541500: {'path': 'temp/1741372503_218073_1341541500_b0bd0f7199b9ca388c8b0c3781193800.jpg', 'extension': 'jpg'}, 1341541506: {'path': 'temp/1741372503_218073_1341541506_f1727a149435088717a65b8786209b53.jpg', 'extension': 'jpg'}, 1341541710: {'path': 'temp/1741372503_218073_1341541710_646ab3448f68e3ad5f7aa516aebf76a4.jpg', 'extension': 'jpg'}, 1341541720: {'path': 'temp/1741372503_218073_1341541720_87ada25c9d7d4a77f3b26742850b02d5.jpg', 'extension': 'jpg'}, 1341541774: {'path': 'temp/1741372503_218073_1341541774_99ff0f9d059f0da3703222be60f4a8d6.jpg', 'extension': 'jpg'}, 1341541779: {'path': 'temp/1741372503_218073_1341541779_a4c75d61a897888dbaedb175f7ad6a6e.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 = 21155517; (('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 = 21155517 group by h (('19', 16),) 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=21155517 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 (21155517) 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 (21155517) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 07032025 21155517 Nombre de photos uploadées : 16 / 23040 (0%) 07032025 21155517 Nombre de photos taguées (types de déchets): 0 / 16 (0%) 07032025 21155517 Nombre de photos taguées (volume) : 0 / 16 (0%) [{'photo_id': 1341541528, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/7/34b33b2ae3257202936baee734312b28.jpg', 'username': None, 'uploaded_at': 1741372289, 'text': 'image_07032025_19_30_04_10154.jpg'}, {'photo_id': 1341541506, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/7/f1727a149435088717a65b8786209b53.jpg', 'username': None, 'uploaded_at': 1741372289, 'text': 'image_07032025_19_30_14_10139.jpg'}, {'photo_id': 1341541500, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/7/b0bd0f7199b9ca388c8b0c3781193800.jpg', 'username': None, 'uploaded_at': 1741372289, 'text': 'image_07032025_19_30_25_10138.jpg'}, {'photo_id': 1341541461, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/7/bc98e321b02de0f5d950006f51598dab.jpg', 'username': None, 'uploaded_at': 1741372289, 'text': 'image_07032025_19_30_35_10148.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.430511474609375e-06 elapsed_time : order_list_meta_photo_and_scores 5.7220458984375e-06 ???????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0020542144775390625 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 21155517, '2025-03-07' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1646019,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 1.4822378158569336 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= 1646019 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1646019, 'dashboard_run_id': 1656215, 'mtr_portfolio_id': 21153197, 'dashboard_result_id': 9292440, '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_P21153197_07-03-2025_19_03_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21153286, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21153287, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21153288, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21153289, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21153290, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21153291, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21153292, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21153293, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21153294, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21153295, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21153296, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21153297, 'pht': 3726}}"}, {'dashboat_entry_day': 1646019, 'dashboard_run_id': 1656215, 'mtr_portfolio_id': 21154237, 'dashboard_result_id': 9292441, '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_P21154237_07-03-2025_19_19_03.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21154252, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21154253, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21154254, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21154255, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21154256, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21154257, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21154258, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21154259, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21154260, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21154261, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21154262, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21154263, 'pht': 3726}}"}, {'dashboat_entry_day': 1646019, 'dashboard_run_id': 1656215, 'mtr_portfolio_id': 21154561, 'dashboard_result_id': 9292442, '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_P21154561_07-03-2025_19_32_30.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21154603, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21154604, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21154605, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21154606, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21154607, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21154608, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21154609, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21154610, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21154611, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21154612, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21154613, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21154614, 'pht': 3726}}"}, {'dashboat_entry_day': 1646019, 'dashboard_run_id': 1656215, 'mtr_portfolio_id': 21155517, 'dashboard_result_id': 9292444, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0}"}] SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 21153197 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': 2649247, 'mtr_portfolio_id': 21153197, 'created_at': datetime.datetime(2025, 3, 7, 19, 3), 'result': '0.07172449108913054', 'result_long': None, 'result_double': None}] Qualite : 0.07172449108913054 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21153197 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21153197_07-03-2025_19_03_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21153197 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_P21153197_07-03-2025_19_03_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21153286, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21153287, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21153288, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21153289, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21153290, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21153291, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21153292, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21153293, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21153294, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21153295, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21153296, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21153297, 'pht': 3726}}" where mtr_portfolio_id = 21153197 and dashboard_run_id = 1656215 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`=21153197 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9292440, 0.07172449108913054, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21153197_07-03-2025_19_03_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21153286, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21153287, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21153288, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21153289, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21153290, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21153291, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21153292, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21153293, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21153294, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21153295, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21153296, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21153297, '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 = 21154237 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': 2649320, 'mtr_portfolio_id': 21154237, 'created_at': datetime.datetime(2025, 3, 7, 19, 19, 2), 'result': '0.0696540480901093', 'result_long': None, 'result_double': None}] Qualite : 0.0696540480901093 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21154237 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21154237_07-03-2025_19_19_03.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21154237 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_P21154237_07-03-2025_19_19_03.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21154252, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21154253, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21154254, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21154255, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21154256, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21154257, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21154258, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21154259, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21154260, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21154261, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21154262, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21154263, 'pht': 3726}}" where mtr_portfolio_id = 21154237 and dashboard_run_id = 1656215 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`=21154237 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9292441, 0.0696540480901093, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21154237_07-03-2025_19_19_03.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21154252, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21154253, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21154254, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21154255, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21154256, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21154257, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21154258, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21154259, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21154260, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21154261, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21154262, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21154263, '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 = 21154561 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': 2649345, 'mtr_portfolio_id': 21154561, 'created_at': datetime.datetime(2025, 3, 7, 19, 32, 30), 'result': '0.08132263102757366', 'result_long': None, 'result_double': None}] Qualite : 0.08132263102757366 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21154561 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21154561_07-03-2025_19_32_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21154561 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_P21154561_07-03-2025_19_32_30.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21154603, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21154604, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21154605, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21154606, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21154607, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21154608, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21154609, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21154610, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21154611, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21154612, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21154613, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21154614, 'pht': 3726}}" where mtr_portfolio_id = 21154561 and dashboard_run_id = 1656215 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`=21154561 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9292442, 0.08132263102757366, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21154561_07-03-2025_19_32_30.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21154603, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21154604, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21154605, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21154606, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21154607, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21154608, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21154609, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21154610, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21154611, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21154612, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21154613, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21154614, '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 = 21155517 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': 2649406, 'mtr_portfolio_id': 21155517, 'created_at': datetime.datetime(2025, 3, 7, 19, 35, 2), 'result': '0.06628188854320889', 'result_long': None, 'result_double': None}] Qualite : 0.06628188854320889 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21155517 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21155517_07-03-2025_19_35_03.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21155517 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_P21155517_07-03-2025_19_35_03.pdf'}" where mtr_portfolio_id = 21155517 and dashboard_run_id = 1656215 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`=21155517 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9292444, 0.06628188854320889, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21155517_07-03-2025_19_35_03.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21155598, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21155599, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21155600, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21155601, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21155602, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21155603, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21155610, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21155617, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21155618, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21155619, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21155620, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21155621, '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 (21153197,21154237,21154561,21155517) result : ((1341528924,), (1341528942,), (1341528961,), (1341528964,), (1341529399,), (1341529485,), (1341529495,), (1341529520,), (1341529962,), (1341529983,), (1341530011,), (1341530057,), (1341530089,), (1341530417,), (1341530426,), (1341530432,), (1341530438,), (1341530530,), (1341530615,), (1341530753,), (1341530760,), (1341530768,), (1341530775,), (1341530802,), (1341530809,), (1341530816,), (1341530821,), (1341530827,), (1341530832,), (1341531040,), (1341531046,), (1341531053,), (1341531070,), (1341531077,), (1341531097,), (1341531103,), (1341531111,), (1341531243,), (1341531249,), (1341531254,), (1341531258,), (1341531263,), (1341531268,), (1341531283,), (1341531289,), (1341531295,), (1341531299,), (1341531305,), (1341531310,), (1341531796,), (1341531832,), (1341531880,), (1341532095,), (1341532104,), (1341532111,), (1341532116,), (1341532120,), (1341532269,), (1341532273,), (1341532278,), (1341532283,), (1341532288,), (1341532292,), (1341532491,), (1341532520,), (1341532534,), (1341532556,), (1341533062,), (1341536040,), (1341536046,), (1341536055,), (1341536059,), (1341536229,), (1341536263,), (1341536268,), (1341536271,), (1341536328,), (1341536334,), (1341536356,), (1341536362,), (1341536367,), (1341536371,), (1341536380,), (1341536452,), (1341536458,), (1341536466,), (1341536472,), (1341536509,), (1341536512,), (1341536517,), (1341536520,), (1341536523,), (1341536529,), (1341536589,), (1341536593,), (1341536596,), (1341536599,), (1341536669,), (1341536684,), (1341536720,), (1341536723,), (1341536764,), (1341536779,), (1341536875,), (1341536882,), (1341536891,), (1341536896,), (1341536899,), (1341536919,), (1341536925,), (1341536930,), (1341536935,), (1341536940,), (1341536944,), (1341537122,), (1341536965,), (1341536977,), (1341537073,), (1341537806,), (1341537877,), (1341537889,), (1341537894,), (1341537901,), (1341537906,), (1341538218,), (1341538300,), (1341538346,), (1341538350,), (1341538367,), (1341538369,), (1341538459,), (1341538469,), (1341538475,), (1341538480,), (1341538485,), (1341538570,), (1341538658,), (1341538827,), (1341538868,), (1341538928,), (1341539238,), (1341539242,), (1341539247,), (1341539259,), (1341539266,), (1341539277,), (1341539633,), (1341539689,), (1341539701,), (1341539705,), (1341539711,), (1341539999,), (1341540028,), (1341540071,), (1341540097,), (1341540101,), (1341540104,), (1341540297,), (1341540305,), (1341540308,), (1341540333,), (1341540431,), (1341540447,), (1341540460,), (1341540465,), (1341540468,), (1341540510,), (1341540522,), (1341540526,), (1341540529,), (1341540530,), (1341540560,), (1341540564,), (1341540631,), (1341540980,), (1341540986,), (1341541025,), (1341541164,), (1341541198,), (1341541204,), (1341541208,), (1341541288,), (1341541295,), (1341541300,), (1341541542,), (1341541458,), (1341541461,), (1341541500,), (1341541506,), (1341541528,), (1341541656,), (1341541669,), (1341541674,), (1341541710,), (1341541720,), (1341541774,), (1341541779,), (1341541790,), (1341541801,), (1341541813,), (1341541818,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'07032025': {'nb_upload': 16, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21155517]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1341541818, 1341541813, 1341541801, 1341541790, 1341541779, 1341541774, 1341541720, 1341541710, 1341541674, 1341541669, 1341541656, 1341541528, 1341541506, 1341541500, 1341541461, 1341541458] map_info['map_portfolio_photo'] : {21155517: [1341541818, 1341541813, 1341541801, 1341541790, 1341541779, 1341541774, 1341541720, 1341541710, 1341541674, 1341541669, 1341541656, 1341541528, 1341541506, 1341541500, 1341541461, 1341541458]} final : True mtd_id 4302 list_pids : [1341541818, 1341541813, 1341541801, 1341541790, 1341541779, 1341541774, 1341541720, 1341541710, 1341541674, 1341541669, 1341541656, 1341541528, 1341541506, 1341541500, 1341541461, 1341541458] Looping around the photos to save general results len do output : 1 /21155517Didn'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, '2649406') ('4302', '21155517', '1341541818', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541813', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541801', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541790', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541779', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541774', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541720', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541710', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541674', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541669', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541656', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541528', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541506', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541500', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541461', None, None, None, None, None, '2649406') ('4302', None, None, None, None, None, None, None, '2649406') ('4302', '21155517', '1341541458', None, None, None, None, None, '2649406') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 17 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, '21155517', 'None', None, None, None, None, '2649406'), ('4302', '21155517', '1341541818', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541813', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541801', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541790', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541779', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541774', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541720', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541710', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541674', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541669', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541656', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541528', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541506', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541500', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541461', None, None, None, None, None, '2649406'), ('4302', '21155517', '1341541458', None, None, None, None, None, '2649406')] time used for this insertion : 0.40230441093444824 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.7967209815979004 time spend to save output : 0.4026036262512207 total time spend for step 5 : 2.199324607849121 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 (2649406) 2.35user 2.35system 0:13.25elapsed 35%CPU (0avgtext+0avgdata 160040maxresident)k 672inputs+12672outputs (13major+73516minor)pagefaults 0swaps