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 : 52034 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 (2725853) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2725853) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22070932 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2725853'] with mtr_portfolio_ids : ['22070932'] and first list_photo_ids : [] new path : /proc/52034/ Name: python3 Umask: 0002 State: R (running) Tgid: 52034 Ngid: 0 Pid: 52034 PPid: 52033 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 52034 NSpid: 52034 NSpgid: 49372 NSsid: 49372 VmPeak: 1106928 kB VmSize: 1106928 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98028 kB VmRSS: 98028 kB RssAnon: 59804 kB RssFile: 38224 kB RssShmem: 0 kB VmData: 865676 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 604 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63054 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 51 nonvoluntary_ctxt_switches: 118 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '52034', 'Ngid': '0', 'Pid': '52034', 'PPid': '52033', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '52034', 'NSpid': '52034', 'NSpgid': '49372', 'NSsid': '49372', 'VmPeak': '1106928 kB', 'VmSize': '1106928 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98028 kB', 'VmRSS': '98028 kB', 'RssAnon': '59804 kB', 'RssFile': '38224 kB', 'RssShmem': '0 kB', 'VmData': '865676 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '604 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63054', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '51', 'nonvoluntary_ctxt_switches': '118'} ('datou_batch_current', '52034', '1106928', '0', '1106928', '865676', '98028', b'', 'marlene', '2725853') 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 (22070932) 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 (2725853 ) ) 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 (22070932) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1350046788, 'portfolio_id': 22070932}, {'photo_id': 1350046780, 'portfolio_id': 22070932}, {'photo_id': 1350046771, 'portfolio_id': 22070932}, {'photo_id': 1350046737, 'portfolio_id': 22070932}, {'photo_id': 1350046507, 'portfolio_id': 22070932}, {'photo_id': 1350046502, 'portfolio_id': 22070932}, {'photo_id': 1350046494, 'portfolio_id': 22070932}, {'photo_id': 1350046488, 'portfolio_id': 22070932}, {'photo_id': 1350046417, 'portfolio_id': 22070932}, {'photo_id': 1350046402, 'portfolio_id': 22070932}, {'photo_id': 1350046369, 'portfolio_id': 22070932}, {'photo_id': 1350046314, 'portfolio_id': 22070932}, {'photo_id': 1350046271, 'portfolio_id': 22070932}, {'photo_id': 1350046249, 'portfolio_id': 22070932}, {'photo_id': 1350046126, 'portfolio_id': 22070932}, {'photo_id': 1350046112, 'portfolio_id': 22070932}, {'photo_id': 1350046104, 'portfolio_id': 22070932}, {'photo_id': 1350045991, 'portfolio_id': 22070932}] map_portfolio_id_photo_id: {22070932: [1350046788, 1350046780, 1350046771, 1350046737, 1350046507, 1350046502, 1350046494, 1350046488, 1350046417, 1350046402, 1350046369, 1350046314, 1350046271, 1350046249, 1350046126, 1350046112, 1350046104, 1350045991]} ##### 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.014656305313110352 #### 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 Apr 4 11:34:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22070932) 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 : 22070932 get user id for portfolio 22070932 get sub ptf for main ptf 22070932, type 3726 and hashtags ['flou', 'plastique', 'mal_croppe', 'autre_refus', 'metal', 'cartonnette', 'Teint_Dans_La_Masse', 'environnement', 'papier', 'Carton_brun', 'kraft', 'Carton_gris'] 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`=22070932 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','plastique','mal_croppe','autre_refus','metal','cartonnette','Teint_Dans_La_Masse','environnement','papier','Carton_brun','kraft','Carton_gris')) 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`=22070932 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','plastique','mal_croppe','autre_refus','metal','cartonnette','Teint_Dans_La_Masse','environnement','papier','Carton_brun','kraft','Carton_gris')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__04042025_11_30_03_10142_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__04042025_11_30_03_10142_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__04042025_11_30_03_10142_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__04042025_11_30_03_10142_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__04042025_11_30_03_10142_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__04042025_11_30_03_10142_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__04042025_11_30_03_10142_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__04042025_11_30_03_10142_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__04042025_11_30_03_10142_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__04042025_11_30_03_10142_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__04042025_11_30_03_10142_3726_kraft_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__04042025_11_30_03_10142_3726_Carton_gris_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)[[22070932, 22070962, 3726, 0.5, 492777938, 979], [22070932, 22070963, 3726, 0.5, 492725882, 979], [22070932, 22070964, 3726, 0.5, 2107755527, 979], [22070932, 22070965, 3726, 0.5, 2107752406, 979], [22070932, 22070966, 3726, 0.5, 492628673, 979], [22070932, 22070967, 3726, 0.5, 702398920, 979], [22070932, 22070968, 3726, 0.5, 2107752385, 979], [22070932, 22070969, 3726, 0.5, 493012381, 979], [22070932, 22070970, 3726, 0.5, 492668766, 979], [22070932, 22070971, 3726, 0.5, 2107753024, 979], [22070932, 22070972, 3726, 0.5, 493202403, 979], [22070932, 22070973, 3726, 0.5, 2107753020, 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`=22070932 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','plastique','mal_croppe','autre_refus','metal','cartonnette','Teint_Dans_La_Masse','environnement','papier','Carton_brun','kraft','Carton_gris')) 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`=22070932 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','plastique','mal_croppe','autre_refus','metal','cartonnette','Teint_Dans_La_Masse','environnement','papier','Carton_brun','kraft','Carton_gris')) AND mptpi.`min_score`=0.5 To do returned map {'flou': {'main_port_id': 22070932, 'sub_port_id': 22070962, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14558471, 'last_updated_at': datetime.datetime(2025, 4, 4, 11, 35), 'last_updated_at_desc': datetime.datetime(2025, 4, 4, 11, 35), 'last_updated_at_asc': datetime.datetime(2025, 4, 4, 11, 35)}, 'plastique': {'main_port_id': 22070932, 'sub_port_id': 22070963, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14558472, 'last_updated_at': datetime.datetime(2025, 4, 4, 11, 35), 'last_updated_at_desc': datetime.datetime(2025, 4, 4, 11, 35), 'last_updated_at_asc': datetime.datetime(2025, 4, 4, 11, 35)}, 'mal_croppe': {'main_port_id': 22070932, 'sub_port_id': 22070964, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14558473, 'last_updated_at': datetime.datetime(2025, 4, 4, 11, 35), 'last_updated_at_desc': datetime.datetime(2025, 4, 4, 11, 35), 'last_updated_at_asc': datetime.datetime(2025, 4, 4, 11, 35)}, 'autre_refus': {'main_port_id': 22070932, 'sub_port_id': 22070965, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14558474, 'last_updated_at': datetime.datetime(2025, 4, 4, 11, 35), 'last_updated_at_desc': datetime.datetime(2025, 4, 4, 11, 35), 'last_updated_at_asc': datetime.datetime(2025, 4, 4, 11, 35)}, 'metal': {'main_port_id': 22070932, 'sub_port_id': 22070966, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14558475, 'last_updated_at': datetime.datetime(2025, 4, 4, 11, 35), 'last_updated_at_desc': datetime.datetime(2025, 4, 4, 11, 35), 'last_updated_at_asc': datetime.datetime(2025, 4, 4, 11, 35)}, 'cartonnette': {'main_port_id': 22070932, 'sub_port_id': 22070967, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14558476, 'last_updated_at': datetime.datetime(2025, 4, 4, 11, 35), 'last_updated_at_desc': datetime.datetime(2025, 4, 4, 11, 35), 'last_updated_at_asc': datetime.datetime(2025, 4, 4, 11, 35)}, 'Teint_Dans_La_Masse': {'main_port_id': 22070932, 'sub_port_id': 22070968, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14558477, 'last_updated_at': datetime.datetime(2025, 4, 4, 11, 35), 'last_updated_at_desc': datetime.datetime(2025, 4, 4, 11, 35), 'last_updated_at_asc': datetime.datetime(2025, 4, 4, 11, 35)}, 'environnement': {'main_port_id': 22070932, 'sub_port_id': 22070969, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14558478, 'last_updated_at': datetime.datetime(2025, 4, 4, 11, 35), 'last_updated_at_desc': datetime.datetime(2025, 4, 4, 11, 35), 'last_updated_at_asc': datetime.datetime(2025, 4, 4, 11, 35)}, 'papier': {'main_port_id': 22070932, 'sub_port_id': 22070970, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14558479, 'last_updated_at': datetime.datetime(2025, 4, 4, 11, 35), 'last_updated_at_desc': datetime.datetime(2025, 4, 4, 11, 35), 'last_updated_at_asc': datetime.datetime(2025, 4, 4, 11, 35)}, 'Carton_brun': {'main_port_id': 22070932, 'sub_port_id': 22070971, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14558480, 'last_updated_at': datetime.datetime(2025, 4, 4, 11, 35), 'last_updated_at_desc': datetime.datetime(2025, 4, 4, 11, 35), 'last_updated_at_asc': datetime.datetime(2025, 4, 4, 11, 35)}, 'kraft': {'main_port_id': 22070932, 'sub_port_id': 22070972, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14558481, 'last_updated_at': datetime.datetime(2025, 4, 4, 11, 35), 'last_updated_at_desc': datetime.datetime(2025, 4, 4, 11, 35), 'last_updated_at_asc': datetime.datetime(2025, 4, 4, 11, 35)}, 'Carton_gris': {'main_port_id': 22070932, 'sub_port_id': 22070973, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14558482, 'last_updated_at': datetime.datetime(2025, 4, 4, 11, 35), 'last_updated_at_desc': datetime.datetime(2025, 4, 4, 11, 35), 'last_updated_at_asc': datetime.datetime(2025, 4, 4, 11, 35)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22070962 , 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=22070932 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 (22070962) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22070932) result : ((1350045991,), (1350046104,), (1350046112,), (1350046126,), (1350046249,), (1350046271,), (1350046314,), (1350046369,), (1350046402,), (1350046417,), (1350046488,), (1350046494,), (1350046502,), (1350046507,), (1350046737,), (1350046771,), (1350046780,), (1350046788,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22070963 , 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=22070932 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 (22070963) result : ((1350046744,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22070932) result : ((1350045991,), (1350046104,), (1350046112,), (1350046126,), (1350046249,), (1350046271,), (1350046314,), (1350046369,), (1350046402,), (1350046417,), (1350046488,), (1350046494,), (1350046502,), (1350046507,), (1350046737,), (1350046771,), (1350046780,), (1350046788,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22070964 , 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=22070932 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 (22070964) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22070932) result : ((1350045991,), (1350046104,), (1350046112,), (1350046126,), (1350046249,), (1350046271,), (1350046314,), (1350046369,), (1350046402,), (1350046417,), (1350046488,), (1350046494,), (1350046502,), (1350046507,), (1350046737,), (1350046771,), (1350046780,), (1350046788,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22070965 , 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=22070932 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 (22070965) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22070932) result : ((1350045991,), (1350046104,), (1350046112,), (1350046126,), (1350046249,), (1350046271,), (1350046314,), (1350046369,), (1350046402,), (1350046417,), (1350046488,), (1350046494,), (1350046502,), (1350046507,), (1350046737,), (1350046771,), (1350046780,), (1350046788,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22070966 , 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=22070932 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 (22070966) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22070932) result : ((1350045991,), (1350046104,), (1350046112,), (1350046126,), (1350046249,), (1350046271,), (1350046314,), (1350046369,), (1350046402,), (1350046417,), (1350046488,), (1350046494,), (1350046502,), (1350046507,), (1350046737,), (1350046771,), (1350046780,), (1350046788,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22070967 , 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=22070932 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 (22070967) result : ((1350046728,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22070932) result : ((1350045991,), (1350046104,), (1350046112,), (1350046126,), (1350046249,), (1350046271,), (1350046314,), (1350046369,), (1350046402,), (1350046417,), (1350046488,), (1350046494,), (1350046502,), (1350046507,), (1350046737,), (1350046771,), (1350046780,), (1350046788,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22070968 , 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=22070932 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 (22070968) result : ((1350046712,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22070932) result : ((1350045991,), (1350046104,), (1350046112,), (1350046126,), (1350046249,), (1350046271,), (1350046314,), (1350046369,), (1350046402,), (1350046417,), (1350046488,), (1350046494,), (1350046502,), (1350046507,), (1350046737,), (1350046771,), (1350046780,), (1350046788,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22070969 , 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=22070932 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 (22070969) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22070932) result : ((1350045991,), (1350046104,), (1350046112,), (1350046126,), (1350046249,), (1350046271,), (1350046314,), (1350046369,), (1350046402,), (1350046417,), (1350046488,), (1350046494,), (1350046502,), (1350046507,), (1350046737,), (1350046771,), (1350046780,), (1350046788,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22070970 , 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=22070932 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 (22070970) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22070932) result : ((1350045991,), (1350046104,), (1350046112,), (1350046126,), (1350046249,), (1350046271,), (1350046314,), (1350046369,), (1350046402,), (1350046417,), (1350046488,), (1350046494,), (1350046502,), (1350046507,), (1350046737,), (1350046771,), (1350046780,), (1350046788,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22070971 , 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=22070932 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 (22070971) result : ((1350046734,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22070932) result : ((1350045991,), (1350046104,), (1350046112,), (1350046126,), (1350046249,), (1350046271,), (1350046314,), (1350046369,), (1350046402,), (1350046417,), (1350046488,), (1350046494,), (1350046502,), (1350046507,), (1350046737,), (1350046771,), (1350046780,), (1350046788,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22070972 , 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=22070932 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 (22070972) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22070932) result : ((1350045991,), (1350046104,), (1350046112,), (1350046126,), (1350046249,), (1350046271,), (1350046314,), (1350046369,), (1350046402,), (1350046417,), (1350046488,), (1350046494,), (1350046502,), (1350046507,), (1350046737,), (1350046771,), (1350046780,), (1350046788,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22070973 , 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=22070932 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 (22070973) result : ((1350046713,), (1350046715,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22070932) result : ((1350045991,), (1350046104,), (1350046112,), (1350046126,), (1350046249,), (1350046271,), (1350046314,), (1350046369,), (1350046402,), (1350046417,), (1350046488,), (1350046494,), (1350046502,), (1350046507,), (1350046737,), (1350046771,), (1350046780,), (1350046788,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=22070932 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','plastique','mal_croppe','autre_refus','metal','cartonnette','Teint_Dans_La_Masse','environnement','papier','Carton_brun','kraft','Carton_gris')) 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`=22070932 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','plastique','mal_croppe','autre_refus','metal','cartonnette','Teint_Dans_La_Masse','environnement','papier','Carton_brun','kraft','Carton_gris')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__04042025_11_30_03_10142_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__04042025_11_30_03_10142_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__04042025_11_30_03_10142_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__04042025_11_30_03_10142_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__04042025_11_30_03_10142_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__04042025_11_30_03_10142_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__04042025_11_30_03_10142_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__04042025_11_30_03_10142_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__04042025_11_30_03_10142_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__04042025_11_30_03_10142_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__04042025_11_30_03_10142_4417_kraft_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__04042025_11_30_03_10142_4417_Carton_gris_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)[[22070932, 22070991, 4417, 0.5, 492777938, 979], [22070932, 22070992, 4417, 0.5, 492725882, 979], [22070932, 22070993, 4417, 0.5, 2107755527, 979], [22070932, 22070994, 4417, 0.5, 2107752406, 979], [22070932, 22070995, 4417, 0.5, 492628673, 979], [22070932, 22070996, 4417, 0.5, 702398920, 979], [22070932, 22070997, 4417, 0.5, 2107752385, 979], [22070932, 22070998, 4417, 0.5, 493012381, 979], [22070932, 22070999, 4417, 0.5, 492668766, 979], [22070932, 22071000, 4417, 0.5, 2107753024, 979], [22070932, 22071001, 4417, 0.5, 493202403, 979], [22070932, 22071002, 4417, 0.5, 2107753020, 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`=22070932 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','plastique','mal_croppe','autre_refus','metal','cartonnette','Teint_Dans_La_Masse','environnement','papier','Carton_brun','kraft','Carton_gris')) 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`=22070932 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','plastique','mal_croppe','autre_refus','metal','cartonnette','Teint_Dans_La_Masse','environnement','papier','Carton_brun','kraft','Carton_gris')) AND mptpi.`min_score`=0.5 To do returned map {'flou': {'main_port_id': 22070932, 'sub_port_id': 22070991, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14558500, 'last_updated_at': datetime.datetime(2025, 4, 4, 11, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 4, 11, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 4, 11, 35, 1)}, 'plastique': {'main_port_id': 22070932, 'sub_port_id': 22070992, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14558501, 'last_updated_at': datetime.datetime(2025, 4, 4, 11, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 4, 11, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 4, 11, 35, 1)}, 'mal_croppe': {'main_port_id': 22070932, 'sub_port_id': 22070993, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14558502, 'last_updated_at': datetime.datetime(2025, 4, 4, 11, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 4, 11, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 4, 11, 35, 1)}, 'autre_refus': {'main_port_id': 22070932, 'sub_port_id': 22070994, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14558503, 'last_updated_at': datetime.datetime(2025, 4, 4, 11, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 4, 11, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 4, 11, 35, 1)}, 'metal': {'main_port_id': 22070932, 'sub_port_id': 22070995, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14558504, 'last_updated_at': datetime.datetime(2025, 4, 4, 11, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 4, 11, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 4, 11, 35, 1)}, 'cartonnette': {'main_port_id': 22070932, 'sub_port_id': 22070996, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14558505, 'last_updated_at': datetime.datetime(2025, 4, 4, 11, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 4, 11, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 4, 11, 35, 1)}, 'Teint_Dans_La_Masse': {'main_port_id': 22070932, 'sub_port_id': 22070997, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14558506, 'last_updated_at': datetime.datetime(2025, 4, 4, 11, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 4, 11, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 4, 11, 35, 1)}, 'environnement': {'main_port_id': 22070932, 'sub_port_id': 22070998, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14558507, 'last_updated_at': datetime.datetime(2025, 4, 4, 11, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 4, 11, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 4, 11, 35, 1)}, 'papier': {'main_port_id': 22070932, 'sub_port_id': 22070999, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14558508, 'last_updated_at': datetime.datetime(2025, 4, 4, 11, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 4, 11, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 4, 11, 35, 1)}, 'Carton_brun': {'main_port_id': 22070932, 'sub_port_id': 22071000, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14558509, 'last_updated_at': datetime.datetime(2025, 4, 4, 11, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 4, 11, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 4, 11, 35, 1)}, 'kraft': {'main_port_id': 22070932, 'sub_port_id': 22071001, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14558510, 'last_updated_at': datetime.datetime(2025, 4, 4, 11, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 4, 11, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 4, 11, 35, 1)}, 'Carton_gris': {'main_port_id': 22070932, 'sub_port_id': 22071002, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14558511, 'last_updated_at': datetime.datetime(2025, 4, 4, 11, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 4, 11, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 4, 11, 35, 1)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22070991,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22070962 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22070992,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22070963 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22070993,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22070964 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22070994,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22070965 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22070995,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22070966 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22070996,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22070967 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22070997,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22070968 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22070998,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22070969 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22070999,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22070970 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22071000,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22070971 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22071001,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22070972 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22071002,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22070973 lien utilise dans velours : https://www.fotonower.com/velours/22070991,22070992,22070993,22070994,22070995,22070996,22070997,22070998,22070999,22071000,22071001,22071002?tags=flou,plastique,mal_croppe,autre_refus,metal,cartonnette,Teint_Dans_La_Masse,environnement,papier,Carton_brun,kraft,Carton_gris After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22070932]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1350046788, 1350046780, 1350046771, 1350046737, 1350046507, 1350046502, 1350046494, 1350046488, 1350046417, 1350046402, 1350046369, 1350046314, 1350046271, 1350046249, 1350046126, 1350046112, 1350046104, 1350045991] map_info['map_portfolio_photo'] : {22070932: [1350046788, 1350046780, 1350046771, 1350046737, 1350046507, 1350046502, 1350046494, 1350046488, 1350046417, 1350046402, 1350046369, 1350046314, 1350046271, 1350046249, 1350046126, 1350046112, 1350046104, 1350045991]} final : False mtd_id 4302 list_pids : [1350046788, 1350046780, 1350046771, 1350046737, 1350046507, 1350046502, 1350046494, 1350046488, 1350046417, 1350046402, 1350046369, 1350046314, 1350046271, 1350046249, 1350046126, 1350046112, 1350046104, 1350045991] Looping around the photos to save general results len do output : 1 /22070932. 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, '2725853') ('4302', '22070932', '1350046788', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046780', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046771', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046737', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046507', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046502', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046494', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046488', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046417', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046402', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046369', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046314', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046271', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046249', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046126', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046112', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046104', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350045991', None, None, None, None, None, '2725853') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 19 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, '22070932', "{'flou': 22070962, 'plastique': 22070963, 'mal_croppe': 22070964, 'autre_refus': 22070965, 'metal': 22070966, 'cartonnette': 22070967, 'Teint_Dans_La_Masse': 22070968, 'environnement': 22070969, 'papier': 22070970, 'Carton_brun': 22070971, 'kraft': 22070972, 'Carton_gris': 22070973}", None, None, None, None, '2725853'), ('4302', '22070932', '1350046788', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046780', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046771', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046737', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046507', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046502', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046494', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046488', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046417', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046402', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046369', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046314', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046271', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046249', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046126', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046112', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046104', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350045991', None, None, None, None, None, '2725853')] time used for this insertion : 0.01482844352722168 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.445053815841675 time spend to save output : 0.015217304229736328 total time spend for step 1 : 2.460271120071411 step2:final Fri Apr 4 11: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 (22070932) 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 22070932 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1350046126,1350046112,1350046104,1350045991,1350046417,1350046402,1350046369,1350046314,1350046271,1350046249,1350046507,1350046502,1350046494,1350046488,1350046788,1350046780,1350046771,1350046737); 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([22070932]) Inside saveOutput : final : False verbose : True original output for save of step final : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ('0.2939751744099828',), 1350046417: ('0.2939751744099828',), 1350046402: ('0.2939751744099828',), 1350046369: ('0.2939751744099828',), 1350046314: ('0.2939751744099828',), 1350046271: ('0.2939751744099828',), 1350046249: ('0.2939751744099828',), 1350046126: ('0.2939751744099828',), 1350046112: ('0.2939751744099828',), 1350046104: ('0.2939751744099828',), 1350045991: ('0.2939751744099828',)} new output for save of step final : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ('0.2939751744099828',), 1350046417: ('0.2939751744099828',), 1350046402: ('0.2939751744099828',), 1350046369: ('0.2939751744099828',), 1350046314: ('0.2939751744099828',), 1350046271: ('0.2939751744099828',), 1350046249: ('0.2939751744099828',), 1350046126: ('0.2939751744099828',), 1350046112: ('0.2939751744099828',), 1350046104: ('0.2939751744099828',), 1350045991: ('0.2939751744099828',)} [1350046788, 1350046780, 1350046771, 1350046737, 1350046507, 1350046502, 1350046494, 1350046488, 1350046417, 1350046402, 1350046369, 1350046314, 1350046271, 1350046249, 1350046126, 1350046112, 1350046104, 1350045991] map_info['map_portfolio_photo'] : {22070932: [1350046788, 1350046780, 1350046771, 1350046737, 1350046507, 1350046502, 1350046494, 1350046488, 1350046417, 1350046402, 1350046369, 1350046314, 1350046271, 1350046249, 1350046126, 1350046112, 1350046104, 1350045991]} final : False mtd_id 4302 list_pids : [1350046788, 1350046780, 1350046771, 1350046737, 1350046507, 1350046502, 1350046494, 1350046488, 1350046417, 1350046402, 1350046369, 1350046314, 1350046271, 1350046249, 1350046126, 1350046112, 1350046104, 1350045991] Looping around the photos to save general results len do output : 18 /1350046788.Didn't retrieve data . /1350046780.Didn't retrieve data . /1350046771.Didn't retrieve data . /1350046737.Didn't retrieve data . /1350046507.Didn't retrieve data . /1350046502.Didn't retrieve data . /1350046494.Didn't retrieve data . /1350046488.Didn't retrieve data . /1350046417.Didn't retrieve data . /1350046402.Didn't retrieve data . /1350046369.Didn't retrieve data . /1350046314.Didn't retrieve data . /1350046271.Didn't retrieve data . /1350046249.Didn't retrieve data . /1350046126.Didn't retrieve data . /1350046112.Didn't retrieve data . /1350046104.Didn't retrieve data . /1350045991.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, '2725853') ('4302', '22070932', '1350046788', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046780', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046771', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046737', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046507', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046502', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046494', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046488', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046417', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046402', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046369', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046314', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046271', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046249', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046126', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046112', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046104', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350045991', None, None, None, None, None, '2725853') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 54 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', '22070932', '1350046788', '0.2939751744099828', None, None, None, None, '2725853'), ('4302', '22070932', '1350046780', '0.2939751744099828', None, None, None, None, '2725853'), ('4302', '22070932', '1350046771', '0.2939751744099828', None, None, None, None, '2725853'), ('4302', '22070932', '1350046737', '0.2939751744099828', None, None, None, None, '2725853'), ('4302', '22070932', '1350046507', '0.2939751744099828', None, None, None, None, '2725853'), ('4302', '22070932', '1350046502', '0.2939751744099828', None, None, None, None, '2725853'), ('4302', '22070932', '1350046494', '0.2939751744099828', None, None, None, None, '2725853'), ('4302', '22070932', '1350046488', '0.2939751744099828', None, None, None, None, '2725853'), ('4302', '22070932', '1350046417', '0.2939751744099828', None, None, None, None, '2725853'), ('4302', '22070932', '1350046402', '0.2939751744099828', None, None, None, None, '2725853'), ('4302', '22070932', '1350046369', '0.2939751744099828', None, None, None, None, '2725853'), ('4302', '22070932', '1350046314', '0.2939751744099828', None, None, None, None, '2725853'), ('4302', '22070932', '1350046271', '0.2939751744099828', None, None, None, None, '2725853'), ('4302', '22070932', '1350046249', '0.2939751744099828', None, None, None, None, '2725853'), ('4302', '22070932', '1350046126', '0.2939751744099828', None, None, None, None, '2725853'), ('4302', '22070932', '1350046112', '0.2939751744099828', None, None, None, None, '2725853'), ('4302', '22070932', '1350046104', '0.2939751744099828', None, None, None, None, '2725853'), ('4302', '22070932', '1350045991', '0.2939751744099828', None, None, None, None, '2725853')] time used for this insertion : 0.013006210327148438 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.025875329971313477 time spend to save output : 0.013644218444824219 total time spend for step 2 : 0.039519548416137695 step3:velours_tree Fri Apr 4 11: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 : {22070932: [{'flou': 22070962, 'plastique': 22070963, 'mal_croppe': 22070964, 'autre_refus': 22070965, 'metal': 22070966, 'cartonnette': 22070967, 'Teint_Dans_La_Masse': 22070968, 'environnement': 22070969, 'papier': 22070970, 'Carton_brun': 22070971, 'kraft': 22070972, 'Carton_gris': 22070973}]} input_args_next_step : {22070932: ()} output_args : {22070932: [{'flou': 22070962, 'plastique': 22070963, 'mal_croppe': 22070964, 'autre_refus': 22070965, 'metal': 22070966, 'cartonnette': 22070967, 'Teint_Dans_La_Masse': 22070968, 'environnement': 22070969, 'papier': 22070970, 'Carton_brun': 22070971, 'kraft': 22070972, 'Carton_gris': 22070973}]} args : 22070932 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'flou': 22070962, 'plastique': 22070963, 'mal_croppe': 22070964, 'autre_refus': 22070965, 'metal': 22070966, 'cartonnette': 22070967, 'Teint_Dans_La_Masse': 22070968, 'environnement': 22070969, 'papier': 22070970, 'Carton_brun': 22070971, 'kraft': 22070972, 'Carton_gris': 22070973},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22070932) 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([22070932]) 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.32460618019104004 time spend to save output : 5.650520324707031e-05 total time spend for step 3 : 0.3246626853942871 step4:send_mail_cod Fri Apr 4 11: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 ! complete output_args for input 2 : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ('0.2939751744099828',), 1350046417: ('0.2939751744099828',), 1350046402: ('0.2939751744099828',), 1350046369: ('0.2939751744099828',), 1350046314: ('0.2939751744099828',), 1350046271: ('0.2939751744099828',), 1350046249: ('0.2939751744099828',), 1350046126: ('0.2939751744099828',), 1350046112: ('0.2939751744099828',), 1350046104: ('0.2939751744099828',), 1350045991: ('0.2939751744099828',)} input_args_next_step : {1350046788: ()} output_args : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ('0.2939751744099828',), 1350046417: ('0.2939751744099828',), 1350046402: ('0.2939751744099828',), 1350046369: ('0.2939751744099828',), 1350046314: ('0.2939751744099828',), 1350046271: ('0.2939751744099828',), 1350046249: ('0.2939751744099828',), 1350046126: ('0.2939751744099828',), 1350046112: ('0.2939751744099828',), 1350046104: ('0.2939751744099828',), 1350045991: ('0.2939751744099828',)} args : 1350046788 depend.output_id : 0 input_args_next_step : {1350046788: ('0.2939751744099828',), 1350046780: ()} output_args : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ('0.2939751744099828',), 1350046417: ('0.2939751744099828',), 1350046402: ('0.2939751744099828',), 1350046369: ('0.2939751744099828',), 1350046314: ('0.2939751744099828',), 1350046271: ('0.2939751744099828',), 1350046249: ('0.2939751744099828',), 1350046126: ('0.2939751744099828',), 1350046112: ('0.2939751744099828',), 1350046104: ('0.2939751744099828',), 1350045991: ('0.2939751744099828',)} args : 1350046780 depend.output_id : 0 input_args_next_step : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ()} output_args : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ('0.2939751744099828',), 1350046417: ('0.2939751744099828',), 1350046402: ('0.2939751744099828',), 1350046369: ('0.2939751744099828',), 1350046314: ('0.2939751744099828',), 1350046271: ('0.2939751744099828',), 1350046249: ('0.2939751744099828',), 1350046126: ('0.2939751744099828',), 1350046112: ('0.2939751744099828',), 1350046104: ('0.2939751744099828',), 1350045991: ('0.2939751744099828',)} args : 1350046771 depend.output_id : 0 input_args_next_step : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ()} output_args : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ('0.2939751744099828',), 1350046417: ('0.2939751744099828',), 1350046402: ('0.2939751744099828',), 1350046369: ('0.2939751744099828',), 1350046314: ('0.2939751744099828',), 1350046271: ('0.2939751744099828',), 1350046249: ('0.2939751744099828',), 1350046126: ('0.2939751744099828',), 1350046112: ('0.2939751744099828',), 1350046104: ('0.2939751744099828',), 1350045991: ('0.2939751744099828',)} args : 1350046737 depend.output_id : 0 input_args_next_step : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ()} output_args : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ('0.2939751744099828',), 1350046417: ('0.2939751744099828',), 1350046402: ('0.2939751744099828',), 1350046369: ('0.2939751744099828',), 1350046314: ('0.2939751744099828',), 1350046271: ('0.2939751744099828',), 1350046249: ('0.2939751744099828',), 1350046126: ('0.2939751744099828',), 1350046112: ('0.2939751744099828',), 1350046104: ('0.2939751744099828',), 1350045991: ('0.2939751744099828',)} args : 1350046507 depend.output_id : 0 input_args_next_step : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ()} output_args : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ('0.2939751744099828',), 1350046417: ('0.2939751744099828',), 1350046402: ('0.2939751744099828',), 1350046369: ('0.2939751744099828',), 1350046314: ('0.2939751744099828',), 1350046271: ('0.2939751744099828',), 1350046249: ('0.2939751744099828',), 1350046126: ('0.2939751744099828',), 1350046112: ('0.2939751744099828',), 1350046104: ('0.2939751744099828',), 1350045991: ('0.2939751744099828',)} args : 1350046502 depend.output_id : 0 input_args_next_step : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ()} output_args : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ('0.2939751744099828',), 1350046417: ('0.2939751744099828',), 1350046402: ('0.2939751744099828',), 1350046369: ('0.2939751744099828',), 1350046314: ('0.2939751744099828',), 1350046271: ('0.2939751744099828',), 1350046249: ('0.2939751744099828',), 1350046126: ('0.2939751744099828',), 1350046112: ('0.2939751744099828',), 1350046104: ('0.2939751744099828',), 1350045991: ('0.2939751744099828',)} args : 1350046494 depend.output_id : 0 input_args_next_step : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ()} output_args : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ('0.2939751744099828',), 1350046417: ('0.2939751744099828',), 1350046402: ('0.2939751744099828',), 1350046369: ('0.2939751744099828',), 1350046314: ('0.2939751744099828',), 1350046271: ('0.2939751744099828',), 1350046249: ('0.2939751744099828',), 1350046126: ('0.2939751744099828',), 1350046112: ('0.2939751744099828',), 1350046104: ('0.2939751744099828',), 1350045991: ('0.2939751744099828',)} args : 1350046488 depend.output_id : 0 input_args_next_step : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ('0.2939751744099828',), 1350046417: ()} output_args : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ('0.2939751744099828',), 1350046417: ('0.2939751744099828',), 1350046402: ('0.2939751744099828',), 1350046369: ('0.2939751744099828',), 1350046314: ('0.2939751744099828',), 1350046271: ('0.2939751744099828',), 1350046249: ('0.2939751744099828',), 1350046126: ('0.2939751744099828',), 1350046112: ('0.2939751744099828',), 1350046104: ('0.2939751744099828',), 1350045991: ('0.2939751744099828',)} args : 1350046417 depend.output_id : 0 input_args_next_step : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ('0.2939751744099828',), 1350046417: ('0.2939751744099828',), 1350046402: ()} output_args : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ('0.2939751744099828',), 1350046417: ('0.2939751744099828',), 1350046402: ('0.2939751744099828',), 1350046369: ('0.2939751744099828',), 1350046314: ('0.2939751744099828',), 1350046271: ('0.2939751744099828',), 1350046249: ('0.2939751744099828',), 1350046126: ('0.2939751744099828',), 1350046112: ('0.2939751744099828',), 1350046104: ('0.2939751744099828',), 1350045991: ('0.2939751744099828',)} args : 1350046402 depend.output_id : 0 input_args_next_step : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ('0.2939751744099828',), 1350046417: ('0.2939751744099828',), 1350046402: ('0.2939751744099828',), 1350046369: ()} output_args : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ('0.2939751744099828',), 1350046417: ('0.2939751744099828',), 1350046402: ('0.2939751744099828',), 1350046369: ('0.2939751744099828',), 1350046314: ('0.2939751744099828',), 1350046271: ('0.2939751744099828',), 1350046249: ('0.2939751744099828',), 1350046126: ('0.2939751744099828',), 1350046112: ('0.2939751744099828',), 1350046104: ('0.2939751744099828',), 1350045991: ('0.2939751744099828',)} args : 1350046369 depend.output_id : 0 input_args_next_step : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ('0.2939751744099828',), 1350046417: ('0.2939751744099828',), 1350046402: ('0.2939751744099828',), 1350046369: ('0.2939751744099828',), 1350046314: ()} output_args : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ('0.2939751744099828',), 1350046417: ('0.2939751744099828',), 1350046402: ('0.2939751744099828',), 1350046369: ('0.2939751744099828',), 1350046314: ('0.2939751744099828',), 1350046271: ('0.2939751744099828',), 1350046249: ('0.2939751744099828',), 1350046126: ('0.2939751744099828',), 1350046112: ('0.2939751744099828',), 1350046104: ('0.2939751744099828',), 1350045991: ('0.2939751744099828',)} args : 1350046314 depend.output_id : 0 input_args_next_step : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ('0.2939751744099828',), 1350046417: ('0.2939751744099828',), 1350046402: ('0.2939751744099828',), 1350046369: ('0.2939751744099828',), 1350046314: ('0.2939751744099828',), 1350046271: ()} output_args : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ('0.2939751744099828',), 1350046417: ('0.2939751744099828',), 1350046402: ('0.2939751744099828',), 1350046369: ('0.2939751744099828',), 1350046314: ('0.2939751744099828',), 1350046271: ('0.2939751744099828',), 1350046249: ('0.2939751744099828',), 1350046126: ('0.2939751744099828',), 1350046112: ('0.2939751744099828',), 1350046104: ('0.2939751744099828',), 1350045991: ('0.2939751744099828',)} args : 1350046271 depend.output_id : 0 input_args_next_step : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ('0.2939751744099828',), 1350046417: ('0.2939751744099828',), 1350046402: ('0.2939751744099828',), 1350046369: ('0.2939751744099828',), 1350046314: ('0.2939751744099828',), 1350046271: ('0.2939751744099828',), 1350046249: ()} output_args : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ('0.2939751744099828',), 1350046417: ('0.2939751744099828',), 1350046402: ('0.2939751744099828',), 1350046369: ('0.2939751744099828',), 1350046314: ('0.2939751744099828',), 1350046271: ('0.2939751744099828',), 1350046249: ('0.2939751744099828',), 1350046126: ('0.2939751744099828',), 1350046112: ('0.2939751744099828',), 1350046104: ('0.2939751744099828',), 1350045991: ('0.2939751744099828',)} args : 1350046249 depend.output_id : 0 input_args_next_step : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ('0.2939751744099828',), 1350046417: ('0.2939751744099828',), 1350046402: ('0.2939751744099828',), 1350046369: ('0.2939751744099828',), 1350046314: ('0.2939751744099828',), 1350046271: ('0.2939751744099828',), 1350046249: ('0.2939751744099828',), 1350046126: ()} output_args : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ('0.2939751744099828',), 1350046417: ('0.2939751744099828',), 1350046402: ('0.2939751744099828',), 1350046369: ('0.2939751744099828',), 1350046314: ('0.2939751744099828',), 1350046271: ('0.2939751744099828',), 1350046249: ('0.2939751744099828',), 1350046126: ('0.2939751744099828',), 1350046112: ('0.2939751744099828',), 1350046104: ('0.2939751744099828',), 1350045991: ('0.2939751744099828',)} args : 1350046126 depend.output_id : 0 input_args_next_step : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ('0.2939751744099828',), 1350046417: ('0.2939751744099828',), 1350046402: ('0.2939751744099828',), 1350046369: ('0.2939751744099828',), 1350046314: ('0.2939751744099828',), 1350046271: ('0.2939751744099828',), 1350046249: ('0.2939751744099828',), 1350046126: ('0.2939751744099828',), 1350046112: ()} output_args : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ('0.2939751744099828',), 1350046417: ('0.2939751744099828',), 1350046402: ('0.2939751744099828',), 1350046369: ('0.2939751744099828',), 1350046314: ('0.2939751744099828',), 1350046271: ('0.2939751744099828',), 1350046249: ('0.2939751744099828',), 1350046126: ('0.2939751744099828',), 1350046112: ('0.2939751744099828',), 1350046104: ('0.2939751744099828',), 1350045991: ('0.2939751744099828',)} args : 1350046112 depend.output_id : 0 input_args_next_step : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ('0.2939751744099828',), 1350046417: ('0.2939751744099828',), 1350046402: ('0.2939751744099828',), 1350046369: ('0.2939751744099828',), 1350046314: ('0.2939751744099828',), 1350046271: ('0.2939751744099828',), 1350046249: ('0.2939751744099828',), 1350046126: ('0.2939751744099828',), 1350046112: ('0.2939751744099828',), 1350046104: ()} output_args : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ('0.2939751744099828',), 1350046417: ('0.2939751744099828',), 1350046402: ('0.2939751744099828',), 1350046369: ('0.2939751744099828',), 1350046314: ('0.2939751744099828',), 1350046271: ('0.2939751744099828',), 1350046249: ('0.2939751744099828',), 1350046126: ('0.2939751744099828',), 1350046112: ('0.2939751744099828',), 1350046104: ('0.2939751744099828',), 1350045991: ('0.2939751744099828',)} args : 1350046104 depend.output_id : 0 input_args_next_step : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ('0.2939751744099828',), 1350046417: ('0.2939751744099828',), 1350046402: ('0.2939751744099828',), 1350046369: ('0.2939751744099828',), 1350046314: ('0.2939751744099828',), 1350046271: ('0.2939751744099828',), 1350046249: ('0.2939751744099828',), 1350046126: ('0.2939751744099828',), 1350046112: ('0.2939751744099828',), 1350046104: ('0.2939751744099828',), 1350045991: ()} output_args : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ('0.2939751744099828',), 1350046417: ('0.2939751744099828',), 1350046402: ('0.2939751744099828',), 1350046369: ('0.2939751744099828',), 1350046314: ('0.2939751744099828',), 1350046271: ('0.2939751744099828',), 1350046249: ('0.2939751744099828',), 1350046126: ('0.2939751744099828',), 1350046112: ('0.2939751744099828',), 1350046104: ('0.2939751744099828',), 1350045991: ('0.2939751744099828',)} args : 1350045991 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 : {22070932: [{'flou': 22070962, 'plastique': 22070963, 'mal_croppe': 22070964, 'autre_refus': 22070965, 'metal': 22070966, 'cartonnette': 22070967, 'Teint_Dans_La_Masse': 22070968, 'environnement': 22070969, 'papier': 22070970, 'Carton_brun': 22070971, 'kraft': 22070972, 'Carton_gris': 22070973}]} input_args_next_step : {1350046788: ('0.2939751744099828',), 1350046780: ('0.2939751744099828',), 1350046771: ('0.2939751744099828',), 1350046737: ('0.2939751744099828',), 1350046507: ('0.2939751744099828',), 1350046502: ('0.2939751744099828',), 1350046494: ('0.2939751744099828',), 1350046488: ('0.2939751744099828',), 1350046417: ('0.2939751744099828',), 1350046402: ('0.2939751744099828',), 1350046369: ('0.2939751744099828',), 1350046314: ('0.2939751744099828',), 1350046271: ('0.2939751744099828',), 1350046249: ('0.2939751744099828',), 1350046126: ('0.2939751744099828',), 1350046112: ('0.2939751744099828',), 1350046104: ('0.2939751744099828',), 1350045991: ('0.2939751744099828',), 22070932: ()} output_args : {22070932: [{'flou': 22070962, 'plastique': 22070963, 'mal_croppe': 22070964, 'autre_refus': 22070965, 'metal': 22070966, 'cartonnette': 22070967, 'Teint_Dans_La_Masse': 22070968, 'environnement': 22070969, 'papier': 22070970, 'Carton_brun': 22070971, 'kraft': 22070972, 'Carton_gris': 22070973}]} args : 22070932 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 :19, first value : ('0.2939751744099828',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22070932) 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 (1350046788,1350046780,1350046771,1350046737,1350046507,1350046502,1350046494,1350046488,1350046417,1350046402,1350046369,1350046314,1350046271,1350046249,1350046126,1350046112,1350046104,1350045991) Found this number of photos: 18 ##### Call download_photos : nb_thread : 5 begin to download photo : 1350045991 begin to download photo : 1350046249 begin to download photo : 1350046402 begin to download photo : 1350046502 begin to download photo : 1350046780 download finish for photo 1350045991 begin to download photo : 1350046104 download finish for photo 1350046502 begin to download photo : 1350046507 download finish for photo 1350046780 begin to download photo : 1350046788 download finish for photo 1350046249 begin to download photo : 1350046271 download finish for photo 1350046402 begin to download photo : 1350046417 download finish for photo 1350046104 begin to download photo : 1350046112 download finish for photo 1350046507 begin to download photo : 1350046737 download finish for photo 1350046788 download finish for photo 1350046271 begin to download photo : 1350046314 download finish for photo 1350046417 begin to download photo : 1350046488 download finish for photo 1350046112 begin to download photo : 1350046126 download finish for photo 1350046737 begin to download photo : 1350046771 download finish for photo 1350046314 begin to download photo : 1350046369 download finish for photo 1350046488 begin to download photo : 1350046494 download finish for photo 1350046126 download finish for photo 1350046369 download finish for photo 1350046771 download finish for photo 1350046494 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette220709621743759302/ length of list_filenames : 18 ; length of list_pids : 18 ; length of list_args : 18 results_Auto_P22070932_04-04-2025_11_35_02.pdf 22070962 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=22070962 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220709621743759302 22070963 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=22070963 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350046744: '1743759208_2033534_1350046112_7d289b4cc154b78325fbf96736a896dd_rle_crop_3747788939_0.png'} change filename to text .imagette220709631743759302/ imagette220709631743759302/1743759208_2033534_1350046112_7d289b4cc154b78325fbf96736a896dd_rle_crop_3747788939_0.png.png imagette220709641743759303/ imagette220709651743759303/ imagette220709661743759303/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/4/1974f8bead6e3ff0a61a6c72d8bbbbd2_5634325.png imagette220709631743759302 22070964 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=22070964 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220709641743759303 22070965 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=22070965 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220709651743759303 22070966 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=22070966 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220709661743759303 22070967 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=22070967 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350046728: '1743759208_2033534_1350046104_39e96b87570a8c689f94ffcacff8de27_rle_crop_3747789151_0.png'} change filename to text .imagette220709671743759303/ imagette220709671743759303/1743759208_2033534_1350046104_39e96b87570a8c689f94ffcacff8de27_rle_crop_3747789151_0.png.png imagette220709721743759303/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/4/5145f2eec1f43dc0c7eb694e843491aa_90934466.png imagette220709671743759303 22070972 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=22070972 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220709721743759303 22070968 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=22070968 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350046712: '1743759208_2033534_1350046126_b3ac0e6b2fb69c2e320ac583f54fd751_rle_crop_3747788920_0.png'} change filename to text .imagette220709681743759303/ imagette220709681743759303/1743759208_2033534_1350046126_b3ac0e6b2fb69c2e320ac583f54fd751_rle_crop_3747788920_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/4/1c491a66158ce04daa615f55c8422eba_83031223.png imagette220709681743759303 22070971 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=22070971 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350046734: '1743759208_2033534_1350046112_7d289b4cc154b78325fbf96736a896dd_rle_crop_3747788930_0.png'} change filename to text .imagette220709711743759303/ imagette220709711743759303/1743759208_2033534_1350046112_7d289b4cc154b78325fbf96736a896dd_rle_crop_3747788930_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/4/f04e8bdb74050bf624596693f6587d2c_45310510.png imagette220709711743759303 22070973 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=22070973 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350046713: '1743759208_2033534_1350046126_b3ac0e6b2fb69c2e320ac583f54fd751_rle_crop_3747788917_0.png', 1350046715: '1743759208_2033534_1350046126_b3ac0e6b2fb69c2e320ac583f54fd751_rle_crop_3747788911_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/4/8027dbdffede5446a5225de006a9fb07_11498081.png change filename to text .imagette220709731743759303/ imagette220709731743759303/1743759208_2033534_1350046126_b3ac0e6b2fb69c2e320ac583f54fd751_rle_crop_3747788911_0.png.png imagette220709731743759303/1743759208_2033534_1350046126_b3ac0e6b2fb69c2e320ac583f54fd751_rle_crop_3747788917_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/4/2d8057a12507536147147d5a6f111a1a_2125391.png imagette220709731743759303 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22070932 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22070991,22070992,22070993,22070994,22070995,22070996,22070997,22070998,22070999,22071000,22071001,22071002?tags=flou,plastique,mal_croppe,autre_refus,metal,cartonnette,Teint_Dans_La_Masse,environnement,papier,Carton_brun,kraft,Carton_gris your option no_mail is active, we will not send the real mail to your client args[1350046788] : ('0.2939751744099828',) no score found for photo 1350046788 We are sending mail with results at report@fotonower.com args[1350046780] : ('0.2939751744099828',) no score found for photo 1350046780 We are sending mail with results at report@fotonower.com args[1350046771] : ('0.2939751744099828',) no score found for photo 1350046771 We are sending mail with results at report@fotonower.com args[1350046737] : ('0.2939751744099828',) no score found for photo 1350046737 We are sending mail with results at report@fotonower.com args[1350046507] : ('0.2939751744099828',) no score found for photo 1350046507 We are sending mail with results at report@fotonower.com args[1350046502] : ('0.2939751744099828',) no score found for photo 1350046502 We are sending mail with results at report@fotonower.com args[1350046494] : ('0.2939751744099828',) no score found for photo 1350046494 We are sending mail with results at report@fotonower.com args[1350046488] : ('0.2939751744099828',) no score found for photo 1350046488 We are sending mail with results at report@fotonower.com args[1350046417] : ('0.2939751744099828',) no score found for photo 1350046417 We are sending mail with results at report@fotonower.com args[1350046402] : ('0.2939751744099828',) no score found for photo 1350046402 We are sending mail with results at report@fotonower.com args[1350046369] : ('0.2939751744099828',) no score found for photo 1350046369 We are sending mail with results at report@fotonower.com args[1350046314] : ('0.2939751744099828',) no score found for photo 1350046314 We are sending mail with results at report@fotonower.com args[1350046271] : ('0.2939751744099828',) no score found for photo 1350046271 We are sending mail with results at report@fotonower.com args[1350046249] : ('0.2939751744099828',) no score found for photo 1350046249 We are sending mail with results at report@fotonower.com args[1350046126] : ('0.2939751744099828',) no score found for photo 1350046126 We are sending mail with results at report@fotonower.com args[1350046112] : ('0.2939751744099828',) no score found for photo 1350046112 We are sending mail with results at report@fotonower.com args[1350046104] : ('0.2939751744099828',) no score found for photo 1350046104 We are sending mail with results at report@fotonower.com args[1350045991] : ('0.2939751744099828',) no score found for photo 1350045991 We are sending mail with results at report@fotonower.com refus_total : 0.2939751744099828 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=22070932 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_P22070932_04-04-2025_11_35_02.pdf results_Auto_P22070932_04-04-2025_11_35_02.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22070932_04-04-2025_11_35_02.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','22070932','results_Auto_P22070932_04-04-2025_11_35_02.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22070932_04-04-2025_11_35_02.pdf','pdf','','0.22','0.2939751744099828') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22070932]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1350046788, 1350046780, 1350046771, 1350046737, 1350046507, 1350046502, 1350046494, 1350046488, 1350046417, 1350046402, 1350046369, 1350046314, 1350046271, 1350046249, 1350046126, 1350046112, 1350046104, 1350045991] map_info['map_portfolio_photo'] : {22070932: [1350046788, 1350046780, 1350046771, 1350046737, 1350046507, 1350046502, 1350046494, 1350046488, 1350046417, 1350046402, 1350046369, 1350046314, 1350046271, 1350046249, 1350046126, 1350046112, 1350046104, 1350045991]} final : False mtd_id 4302 list_pids : [1350046788, 1350046780, 1350046771, 1350046737, 1350046507, 1350046502, 1350046494, 1350046488, 1350046417, 1350046402, 1350046369, 1350046314, 1350046271, 1350046249, 1350046126, 1350046112, 1350046104, 1350045991] 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, '2725853') ('4302', '22070932', '1350046788', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046780', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046771', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046737', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046507', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046502', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046494', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046488', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046417', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046402', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046369', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046314', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046271', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046249', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046126', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046112', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046104', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350045991', None, None, None, None, None, '2725853') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 18 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '22070932', '1350046788', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046780', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046771', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046737', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046507', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046502', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046494', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046488', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046417', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046402', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046369', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046314', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046271', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046249', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046126', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046112', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046104', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350045991', None, None, None, None, None, '2725853')] time used for this insertion : 0.015180110931396484 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.294149875640869 time spend to save output : 0.01557469367980957 total time spend for step 4 : 2.3097245693206787 step5:split_time_score Fri Apr 4 11:35:04 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 : ['22070932'] 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 : [('22070932',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22070932) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1350046780: {'path': 'temp/1743759302_52034_1350046780_3cf9584ecc46e4b7ffa7e6e064c0286e.jpg', 'extension': 'jpg'}, 1350046788: {'path': 'temp/1743759302_52034_1350046788_d83ec1561c2f318507b0ccc58d0457f0.jpg', 'extension': 'jpg'}, 1350045991: {'path': 'temp/1743759302_52034_1350045991_436f7729d8fee63515aeaf9fc848fe80.jpg', 'extension': 'jpg'}, 1350046104: {'path': 'temp/1743759302_52034_1350046104_39e96b87570a8c689f94ffcacff8de27.jpg', 'extension': 'jpg'}, 1350046112: {'path': 'temp/1743759302_52034_1350046112_7d289b4cc154b78325fbf96736a896dd.jpg', 'extension': 'jpg'}, 1350046126: {'path': 'temp/1743759302_52034_1350046126_b3ac0e6b2fb69c2e320ac583f54fd751.jpg', 'extension': 'jpg'}, 1350046249: {'path': 'temp/1743759302_52034_1350046249_0f0c999b42412854fbe5caaf14ccaf2c.jpg', 'extension': 'jpg'}, 1350046271: {'path': 'temp/1743759302_52034_1350046271_5fd37fe6c82b8633c11003017b8be9e2.jpg', 'extension': 'jpg'}, 1350046314: {'path': 'temp/1743759302_52034_1350046314_25df283985019fbf30c3bb2eb3ca06e2.jpg', 'extension': 'jpg'}, 1350046369: {'path': 'temp/1743759302_52034_1350046369_bf46ce23491119baf93cbc051e579122.jpg', 'extension': 'jpg'}, 1350046502: {'path': 'temp/1743759302_52034_1350046502_8ed01ebacaa8cf608f6933b1f7582b8e.jpg', 'extension': 'jpg'}, 1350046507: {'path': 'temp/1743759302_52034_1350046507_6652678d77d264a5830402e6e13bcc51.jpg', 'extension': 'jpg'}, 1350046737: {'path': 'temp/1743759302_52034_1350046737_8c545ed79a86371e2e33809d81e16b37.jpg', 'extension': 'jpg'}, 1350046771: {'path': 'temp/1743759302_52034_1350046771_a9c7a9f8268a854a194142da5b62af64.jpg', 'extension': 'jpg'}, 1350046402: {'path': 'temp/1743759302_52034_1350046402_4cfe59d68fd04aa43d48c95ab55c3e28.jpg', 'extension': 'jpg'}, 1350046417: {'path': 'temp/1743759302_52034_1350046417_6bd49ac603e20b88b642b7e578270d50.jpg', 'extension': 'jpg'}, 1350046488: {'path': 'temp/1743759302_52034_1350046488_0c652e3a1b47cbacf1846212dfe1b529.jpg', 'extension': 'jpg'}, 1350046494: {'path': 'temp/1743759302_52034_1350046494_b84e4c8cf5b3011fe144376e973b4150.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 = 22070932; (('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 = 22070932 group by h (('11', 18),) 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=22070932 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 (22070932) 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 (22070932) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 04042025 22070932 Nombre de photos uploadées : 18 / 23040 (0%) 04042025 22070932 Nombre de photos taguées (types de déchets): 0 / 18 (0%) 04042025 22070932 Nombre de photos taguées (volume) : 0 / 18 (0%) [{'photo_id': 1350046126, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/4/b3ac0e6b2fb69c2e320ac583f54fd751.jpg', 'username': None, 'uploaded_at': 1743759078, 'text': 'image_04042025_11_30_03_10141.jpg'}, {'photo_id': 1350046112, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/4/7d289b4cc154b78325fbf96736a896dd.jpg', 'username': None, 'uploaded_at': 1743759078, 'text': 'image_04042025_11_30_13_10137.jpg'}, {'photo_id': 1350046104, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/4/39e96b87570a8c689f94ffcacff8de27.jpg', 'username': None, 'uploaded_at': 1743759078, 'text': 'image_04042025_11_30_24_10133.jpg'}, {'photo_id': 1350045991, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/4/436f7729d8fee63515aeaf9fc848fe80.jpg', 'username': None, 'uploaded_at': 1743759063, 'text': 'image_04042025_11_30_44_10133.jpg'}] 0 [] elapsed_time : load_data_split_time_score 3.337860107421875e-06 elapsed_time : order_list_meta_photo_and_scores 1.621246337890625e-05 ?????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0009014606475830078 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 22070932, '2025-04-04' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1715710,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.022091388702392578 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= 1715710 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1715710, 'dashboard_run_id': 1724985, 'mtr_portfolio_id': 22066308, 'dashboard_result_id': 9886209, '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_P22066308_04-04-2025_11_11_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22066312, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22066313, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22066314, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22066315, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22066316, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22066317, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22066318, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22066319, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22066320, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22066321, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22066322, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22066323, 'pht': 3726}}"}, {'dashboat_entry_day': 1715710, 'dashboard_run_id': 1724985, 'mtr_portfolio_id': 22067773, 'dashboard_result_id': 9886210, '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_P22067773_04-04-2025_11_19_03.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22067934, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22067935, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22067936, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22067937, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22067938, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22067939, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22067940, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22067941, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22067942, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22067943, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22067944, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22067945, 'pht': 3726}}"}, {'dashboat_entry_day': 1715710, 'dashboard_run_id': 1724985, 'mtr_portfolio_id': 22069574, 'dashboard_result_id': 9886211, '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_P22069574_04-04-2025_11_33_06.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22069721, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22069722, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22069723, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22069724, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22069725, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22069726, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22069727, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22069728, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22069729, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22069730, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22069731, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22069732, 'pht': 3726}}"}, {'dashboat_entry_day': 1715710, 'dashboard_run_id': 1724985, 'mtr_portfolio_id': 22070932, 'dashboard_result_id': 9886212, '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 = 22066308 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': 2724395, 'mtr_portfolio_id': 22066308, 'created_at': datetime.datetime(2025, 4, 4, 11, 11), 'result': '0.03291777905993163', 'result_long': None, 'result_double': None}] Qualite : 0.03291777905993163 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22066308 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22066308_04-04-2025_11_11_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22066308 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_P22066308_04-04-2025_11_11_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22066312, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22066313, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22066314, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22066315, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22066316, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22066317, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22066318, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22066319, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22066320, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22066321, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22066322, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22066323, 'pht': 3726}}" where mtr_portfolio_id = 22066308 and dashboard_run_id = 1724985 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`=22066308 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9886209, 0.03291777905993163, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22066308_04-04-2025_11_11_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22066312, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22066313, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22066314, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22066315, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22066316, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22066317, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22066318, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22066319, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22066320, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22066321, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22066322, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22066323, '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 = 22067773 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': 2724949, 'mtr_portfolio_id': 22067773, 'created_at': datetime.datetime(2025, 4, 4, 11, 19, 2), 'result': '0.05060867835657265', 'result_long': None, 'result_double': None}] Qualite : 0.05060867835657265 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22067773 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22067773_04-04-2025_11_19_03.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22067773 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_P22067773_04-04-2025_11_19_03.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22067934, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22067935, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22067936, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22067937, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22067938, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22067939, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22067940, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22067941, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22067942, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22067943, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22067944, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22067945, 'pht': 3726}}" where mtr_portfolio_id = 22067773 and dashboard_run_id = 1724985 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`=22067773 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9886210, 0.05060867835657265, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22067773_04-04-2025_11_19_03.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22067934, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22067935, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22067936, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22067937, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22067938, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22067939, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22067940, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22067941, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22067942, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22067943, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22067944, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22067945, '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 = 22069574 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': 2725741, 'mtr_portfolio_id': 22069574, 'created_at': datetime.datetime(2025, 4, 4, 11, 33, 6), 'result': '0.05253678349027027', 'result_long': None, 'result_double': None}] Qualite : 0.05253678349027027 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22069574 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22069574_04-04-2025_11_33_06.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22069574 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_P22069574_04-04-2025_11_33_06.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22069721, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22069722, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22069723, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22069724, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22069725, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22069726, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22069727, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22069728, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22069729, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22069730, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22069731, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22069732, 'pht': 3726}}" where mtr_portfolio_id = 22069574 and dashboard_run_id = 1724985 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`=22069574 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9886211, 0.05253678349027027, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22069574_04-04-2025_11_33_06.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22069721, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22069722, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22069723, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22069724, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22069725, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22069726, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22069727, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22069728, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22069729, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22069730, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22069731, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22069732, '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 = 22070932 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': 2725853, 'mtr_portfolio_id': 22070932, 'created_at': datetime.datetime(2025, 4, 4, 11, 35, 2), 'result': '0.2939751744099828', 'result_long': None, 'result_double': None}] Qualite : 0.2939751744099828 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22070932 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22070932_04-04-2025_11_35_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22070932 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_P22070932_04-04-2025_11_35_02.pdf'}" where mtr_portfolio_id = 22070932 and dashboard_run_id = 1724985 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`=22070932 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9886212, 0.2939751744099828, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22070932_04-04-2025_11_35_02.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22070962, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22070963, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22070964, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22070965, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22070966, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22070967, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22070968, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22070969, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22070970, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22070971, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22070972, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22070973, '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 (22066308,22067773,22069574,22070932) result : ((1350029019,), (1350029026,), (1350029033,), (1350029076,), (1350029078,), (1350029082,), (1350029094,), (1350029110,), (1350029120,), (1350029231,), (1350029232,), (1350029246,), (1350029248,), (1350029259,), (1350029312,), (1350029335,), (1350029347,), (1350029355,), (1350029364,), (1350029406,), (1350029496,), (1350029502,), (1350029506,), (1350029510,), (1350029538,), (1350029540,), (1350029545,), (1350029550,), (1350029557,), (1350029561,), (1350029639,), (1350029640,), (1350029644,), (1350029675,), (1350029693,), (1350029711,), (1350029785,), (1350029794,), (1350029826,), (1350029856,), (1350029886,), (1350029891,), (1350029940,), (1350029998,), (1350030016,), (1350030039,), (1350030094,), (1350030145,), (1350030202,), (1350030232,), (1350030243,), (1350030273,), (1350030289,), (1350030309,), (1350030343,), (1350030349,), (1350030380,), (1350030483,), (1350030523,), (1350030547,), (1350030599,), (1350030632,), (1350030657,), (1350030689,), (1350030697,), (1350030740,), (1350030762,), (1350030774,), (1350030776,), (1350030823,), (1350030828,), (1350030830,), (1350030834,), (1350031349,), (1350031405,), (1350031456,), (1350031499,), (1350031521,), (1350031533,), (1350031641,), (1350031660,), (1350031736,), (1350032096,), (1350033627,), (1350031823,), (1350031829,), (1350031843,), (1350031904,), (1350032027,), (1350032136,), (1350032187,), (1350032269,), (1350032282,), (1350032350,), (1350032424,), (1350032624,), (1350032673,), (1350032721,), (1350032765,), (1350032815,), (1350032857,), (1350033059,), (1350033111,), (1350033167,), (1350033193,), (1350033251,), (1350033336,), (1350033590,), (1350033768,), (1350033830,), (1350034057,), (1350034207,), (1350034311,), (1350034426,), (1350034554,), (1350034613,), (1350034653,), (1350034667,), (1350034824,), (1350034919,), (1350035002,), (1350035065,), (1350035122,), (1350035342,), (1350035376,), (1350035399,), (1350035485,), (1350035526,), (1350035556,), (1350035751,), (1350035824,), (1350035895,), (1350036011,), (1350036537,), (1350036650,), (1350036742,), (1350036782,), (1350036945,), (1350037033,), (1350037367,), (1350037448,), (1350037481,), (1350037534,), (1350037553,), (1350037723,), (1350037776,), (1350037817,), (1350037893,), (1350037942,), (1350038014,), (1350038180,), (1350038192,), (1350038336,), (1350038356,), (1350038440,), (1350038579,), (1350038841,), (1350038961,), (1350039048,), (1350039116,), (1350039226,), (1350039293,), (1350039541,), (1350039641,), (1350039793,), (1350039814,), (1350039924,), (1350040244,), (1350040293,), (1350040302,), (1350040354,), (1350040640,), (1350040440,), (1350040467,), (1350040505,), (1350040591,), (1350040760,), (1350040811,), (1350040871,), (1350040880,), (1350040931,), (1350041144,), (1350041219,), (1350041267,), (1350041423,), (1350041432,), (1350041450,), (1350041561,), (1350042031,), (1350042083,), (1350042149,), (1350042204,), (1350042266,), (1350042348,), (1350042498,), (1350042534,), (1350042627,), (1350042730,), (1350042731,), (1350042733,), (1350042736,), (1350042749,), (1350042835,), (1350042849,), (1350042874,), (1350043072,), (1350043109,), (1350043141,), (1350043180,), (1350043204,), (1350043326,), (1350043367,), (1350043373,), (1350043392,), (1350043420,), (1350043542,), (1350043554,), (1350043589,), (1350043615,), (1350043998,), (1350044067,), (1350044156,), (1350044182,), (1350044595,), (1350044710,), (1350044792,), (1350044849,), (1350044909,), (1350044954,), (1350045220,), (1350045304,), (1350045353,), (1350045380,), (1350045668,), (1350045703,), (1350045747,), (1350045814,), (1350045884,), (1350045911,), (1350046136,), (1350045991,), (1350046104,), (1350046112,), (1350046126,), (1350046249,), (1350046271,), (1350046314,), (1350046369,), (1350046402,), (1350046417,), (1350046488,), (1350046494,), (1350046502,), (1350046507,), (1350046737,), (1350046771,), (1350046780,), (1350046788,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'04042025': {'nb_upload': 18, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22070932]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1350046788, 1350046780, 1350046771, 1350046737, 1350046507, 1350046502, 1350046494, 1350046488, 1350046417, 1350046402, 1350046369, 1350046314, 1350046271, 1350046249, 1350046126, 1350046112, 1350046104, 1350045991] map_info['map_portfolio_photo'] : {22070932: [1350046788, 1350046780, 1350046771, 1350046737, 1350046507, 1350046502, 1350046494, 1350046488, 1350046417, 1350046402, 1350046369, 1350046314, 1350046271, 1350046249, 1350046126, 1350046112, 1350046104, 1350045991]} final : True mtd_id 4302 list_pids : [1350046788, 1350046780, 1350046771, 1350046737, 1350046507, 1350046502, 1350046494, 1350046488, 1350046417, 1350046402, 1350046369, 1350046314, 1350046271, 1350046249, 1350046126, 1350046112, 1350046104, 1350045991] Looping around the photos to save general results len do output : 1 /22070932Didn'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, '2725853') ('4302', '22070932', '1350046788', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046780', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046771', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046737', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046507', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046502', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046494', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046488', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046417', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046402', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046369', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046314', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046271', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046249', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046126', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046112', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350046104', None, None, None, None, None, '2725853') ('4302', None, None, None, None, None, None, None, '2725853') ('4302', '22070932', '1350045991', None, None, None, None, None, '2725853') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 19 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, '22070932', 'None', None, None, None, None, '2725853'), ('4302', '22070932', '1350046788', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046780', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046771', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046737', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046507', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046502', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046494', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046488', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046417', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046402', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046369', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046314', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046271', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046249', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046126', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046112', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350046104', None, None, None, None, None, '2725853'), ('4302', '22070932', '1350045991', None, None, None, None, None, '2725853')] time used for this insertion : 0.014299869537353516 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.3254120349884033 time spend to save output : 0.014626026153564453 total time spend for step 5 : 0.3400380611419678 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 (2725853) 2.41user 2.47system 0:09.13elapsed 53%CPU (0avgtext+0avgdata 165096maxresident)k 312inputs+12056outputs (3major+76271minor)pagefaults 0swaps