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 : 144829 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 (2694004) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2694004) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21744306 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2694004'] with mtr_portfolio_ids : ['21744306'] and first list_photo_ids : [] new path : /proc/144829/ Name: python3 Umask: 0002 State: R (running) Tgid: 144829 Ngid: 0 Pid: 144829 PPid: 144828 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 144829 NSpid: 144829 NSpgid: 140978 NSsid: 140978 VmPeak: 1106848 kB VmSize: 1106848 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 97488 kB VmRSS: 97488 kB RssAnon: 59756 kB RssFile: 37732 kB RssShmem: 0 kB VmData: 865596 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 612 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 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: 52 nonvoluntary_ctxt_switches: 107 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '144829', 'Ngid': '0', 'Pid': '144829', 'PPid': '144828', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '144829', 'NSpid': '144829', 'NSpgid': '140978', 'NSsid': '140978', 'VmPeak': '1106848 kB', 'VmSize': '1106848 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '97488 kB', 'VmRSS': '97488 kB', 'RssAnon': '59756 kB', 'RssFile': '37732 kB', 'RssShmem': '0 kB', 'VmData': '865596 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '612 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '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': '52', 'nonvoluntary_ctxt_switches': '107'} ('datou_batch_current', '144829', '1106848', '0', '1106848', '865596', '97488', b'', 'marlene', '2694004') 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 (21744306) 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 (2694004 ) ) 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 (21744306) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1347588064, 'portfolio_id': 21744306}, {'photo_id': 1347588046, 'portfolio_id': 21744306}, {'photo_id': 1347588034, 'portfolio_id': 21744306}, {'photo_id': 1347588026, 'portfolio_id': 21744306}, {'photo_id': 1347588003, 'portfolio_id': 21744306}, {'photo_id': 1347587597, 'portfolio_id': 21744306}, {'photo_id': 1347587474, 'portfolio_id': 21744306}, {'photo_id': 1347587437, 'portfolio_id': 21744306}, {'photo_id': 1347587345, 'portfolio_id': 21744306}, {'photo_id': 1347587195, 'portfolio_id': 21744306}, {'photo_id': 1347586941, 'portfolio_id': 21744306}, {'photo_id': 1347586938, 'portfolio_id': 21744306}, {'photo_id': 1347586935, 'portfolio_id': 21744306}, {'photo_id': 1347586932, 'portfolio_id': 21744306}, {'photo_id': 1347586926, 'portfolio_id': 21744306}] map_portfolio_id_photo_id: {21744306: [1347588064, 1347588046, 1347588034, 1347588026, 1347588003, 1347587597, 1347587474, 1347587437, 1347587345, 1347587195, 1347586941, 1347586938, 1347586935, 1347586932, 1347586926]} ##### 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.015136003494262695 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Wed Mar 26 19:50:55 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 (21744306) 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 : 21744306 get user id for portfolio 21744306 get sub ptf for main ptf 21744306, type 3726 and hashtags ['environnement', 'flou', 'cartonnette', 'autre_refus', 'metal', 'Carton_gris', 'plastique', 'mal_croppe', 'Teint_Dans_La_Masse', 'kraft', 'papier', 'Carton_brun'] 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`=21744306 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','flou','cartonnette','autre_refus','metal','Carton_gris','plastique','mal_croppe','Teint_Dans_La_Masse','kraft','papier','Carton_brun')) 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`=21744306 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','flou','cartonnette','autre_refus','metal','Carton_gris','plastique','mal_croppe','Teint_Dans_La_Masse','kraft','papier','Carton_brun')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__26032025_19_45_04_010139_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__26032025_19_45_04_010139_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__26032025_19_45_04_010139_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__26032025_19_45_04_010139_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__26032025_19_45_04_010139_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__26032025_19_45_04_010139_3726_Carton_gris_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__26032025_19_45_04_010139_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__26032025_19_45_04_010139_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__26032025_19_45_04_010139_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__26032025_19_45_04_010139_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__26032025_19_45_04_010139_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__26032025_19_45_04_010139_3726_Carton_brun_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)[[21744306, 21744311, 3726, 0.5, 493012381, 979], [21744306, 21744312, 3726, 0.5, 492777938, 979], [21744306, 21744313, 3726, 0.5, 702398920, 979], [21744306, 21744314, 3726, 0.5, 2107752406, 979], [21744306, 21744315, 3726, 0.5, 492628673, 979], [21744306, 21744316, 3726, 0.5, 2107753020, 979], [21744306, 21744317, 3726, 0.5, 492725882, 979], [21744306, 21744318, 3726, 0.5, 2107755527, 979], [21744306, 21744319, 3726, 0.5, 2107752385, 979], [21744306, 21744320, 3726, 0.5, 493202403, 979], [21744306, 21744321, 3726, 0.5, 492668766, 979], [21744306, 21744322, 3726, 0.5, 2107753024, 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`=21744306 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','flou','cartonnette','autre_refus','metal','Carton_gris','plastique','mal_croppe','Teint_Dans_La_Masse','kraft','papier','Carton_brun')) 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`=21744306 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','flou','cartonnette','autre_refus','metal','Carton_gris','plastique','mal_croppe','Teint_Dans_La_Masse','kraft','papier','Carton_brun')) AND mptpi.`min_score`=0.5 To do returned map {'environnement': {'main_port_id': 21744306, 'sub_port_id': 21744311, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14269070, 'last_updated_at': datetime.datetime(2025, 3, 26, 19, 50, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 19, 50, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 19, 50, 56)}, 'flou': {'main_port_id': 21744306, 'sub_port_id': 21744312, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14269071, 'last_updated_at': datetime.datetime(2025, 3, 26, 19, 50, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 19, 50, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 19, 50, 56)}, 'cartonnette': {'main_port_id': 21744306, 'sub_port_id': 21744313, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14269072, 'last_updated_at': datetime.datetime(2025, 3, 26, 19, 50, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 19, 50, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 19, 50, 56)}, 'autre_refus': {'main_port_id': 21744306, 'sub_port_id': 21744314, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14269073, 'last_updated_at': datetime.datetime(2025, 3, 26, 19, 50, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 19, 50, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 19, 50, 56)}, 'metal': {'main_port_id': 21744306, 'sub_port_id': 21744315, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14269074, 'last_updated_at': datetime.datetime(2025, 3, 26, 19, 50, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 19, 50, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 19, 50, 56)}, 'Carton_gris': {'main_port_id': 21744306, 'sub_port_id': 21744316, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14269075, 'last_updated_at': datetime.datetime(2025, 3, 26, 19, 50, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 19, 50, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 19, 50, 56)}, 'plastique': {'main_port_id': 21744306, 'sub_port_id': 21744317, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14269076, 'last_updated_at': datetime.datetime(2025, 3, 26, 19, 50, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 19, 50, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 19, 50, 56)}, 'mal_croppe': {'main_port_id': 21744306, 'sub_port_id': 21744318, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14269077, 'last_updated_at': datetime.datetime(2025, 3, 26, 19, 50, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 19, 50, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 19, 50, 56)}, 'Teint_Dans_La_Masse': {'main_port_id': 21744306, 'sub_port_id': 21744319, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14269078, 'last_updated_at': datetime.datetime(2025, 3, 26, 19, 50, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 19, 50, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 19, 50, 56)}, 'kraft': {'main_port_id': 21744306, 'sub_port_id': 21744320, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14269079, 'last_updated_at': datetime.datetime(2025, 3, 26, 19, 50, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 19, 50, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 19, 50, 56)}, 'papier': {'main_port_id': 21744306, 'sub_port_id': 21744321, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14269080, 'last_updated_at': datetime.datetime(2025, 3, 26, 19, 50, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 19, 50, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 19, 50, 56)}, 'Carton_brun': {'main_port_id': 21744306, 'sub_port_id': 21744322, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14269081, 'last_updated_at': datetime.datetime(2025, 3, 26, 19, 50, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 19, 50, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 19, 50, 56)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21744311 , 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=21744306 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 (21744311) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21744306) result : ((1347586926,), (1347586932,), (1347586935,), (1347586938,), (1347586941,), (1347587195,), (1347587345,), (1347587437,), (1347587474,), (1347587597,), (1347588003,), (1347588026,), (1347588034,), (1347588046,), (1347588064,)) 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 21744312 , 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=21744306 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 (21744312) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21744306) result : ((1347586926,), (1347586932,), (1347586935,), (1347586938,), (1347586941,), (1347587195,), (1347587345,), (1347587437,), (1347587474,), (1347587597,), (1347588003,), (1347588026,), (1347588034,), (1347588046,), (1347588064,)) 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 21744313 , 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=21744306 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 (21744313) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21744306) result : ((1347586926,), (1347586932,), (1347586935,), (1347586938,), (1347586941,), (1347587195,), (1347587345,), (1347587437,), (1347587474,), (1347587597,), (1347588003,), (1347588026,), (1347588034,), (1347588046,), (1347588064,)) 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 21744314 , 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=21744306 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 (21744314) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21744306) result : ((1347586926,), (1347586932,), (1347586935,), (1347586938,), (1347586941,), (1347587195,), (1347587345,), (1347587437,), (1347587474,), (1347587597,), (1347588003,), (1347588026,), (1347588034,), (1347588046,), (1347588064,)) 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 21744315 , 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=21744306 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 (21744315) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21744306) result : ((1347586926,), (1347586932,), (1347586935,), (1347586938,), (1347586941,), (1347587195,), (1347587345,), (1347587437,), (1347587474,), (1347587597,), (1347588003,), (1347588026,), (1347588034,), (1347588046,), (1347588064,)) 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 21744316 , 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=21744306 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 (21744316) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21744306) result : ((1347586926,), (1347586932,), (1347586935,), (1347586938,), (1347586941,), (1347587195,), (1347587345,), (1347587437,), (1347587474,), (1347587597,), (1347588003,), (1347588026,), (1347588034,), (1347588046,), (1347588064,)) 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 21744317 , 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=21744306 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 (21744317) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21744306) result : ((1347586926,), (1347586932,), (1347586935,), (1347586938,), (1347586941,), (1347587195,), (1347587345,), (1347587437,), (1347587474,), (1347587597,), (1347588003,), (1347588026,), (1347588034,), (1347588046,), (1347588064,)) 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 21744318 , 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=21744306 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 (21744318) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21744306) result : ((1347586926,), (1347586932,), (1347586935,), (1347586938,), (1347586941,), (1347587195,), (1347587345,), (1347587437,), (1347587474,), (1347587597,), (1347588003,), (1347588026,), (1347588034,), (1347588046,), (1347588064,)) 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 21744319 , 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=21744306 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 (21744319) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21744306) result : ((1347586926,), (1347586932,), (1347586935,), (1347586938,), (1347586941,), (1347587195,), (1347587345,), (1347587437,), (1347587474,), (1347587597,), (1347588003,), (1347588026,), (1347588034,), (1347588046,), (1347588064,)) 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 21744320 , 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=21744306 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 (21744320) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21744306) result : ((1347586926,), (1347586932,), (1347586935,), (1347586938,), (1347586941,), (1347587195,), (1347587345,), (1347587437,), (1347587474,), (1347587597,), (1347588003,), (1347588026,), (1347588034,), (1347588046,), (1347588064,)) 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 21744321 , 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=21744306 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 (21744321) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21744306) result : ((1347586926,), (1347586932,), (1347586935,), (1347586938,), (1347586941,), (1347587195,), (1347587345,), (1347587437,), (1347587474,), (1347587597,), (1347588003,), (1347588026,), (1347588034,), (1347588046,), (1347588064,)) 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 21744322 , 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=21744306 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 (21744322) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21744306) result : ((1347586926,), (1347586932,), (1347586935,), (1347586938,), (1347586941,), (1347587195,), (1347587345,), (1347587437,), (1347587474,), (1347587597,), (1347588003,), (1347588026,), (1347588034,), (1347588046,), (1347588064,)) 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`=21744306 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','flou','cartonnette','autre_refus','metal','Carton_gris','plastique','mal_croppe','Teint_Dans_La_Masse','kraft','papier','Carton_brun')) 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`=21744306 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','flou','cartonnette','autre_refus','metal','Carton_gris','plastique','mal_croppe','Teint_Dans_La_Masse','kraft','papier','Carton_brun')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__26032025_19_45_04_010139_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__26032025_19_45_04_010139_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__26032025_19_45_04_010139_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__26032025_19_45_04_010139_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__26032025_19_45_04_010139_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__26032025_19_45_04_010139_4417_Carton_gris_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__26032025_19_45_04_010139_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__26032025_19_45_04_010139_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__26032025_19_45_04_010139_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__26032025_19_45_04_010139_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__26032025_19_45_04_010139_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__26032025_19_45_04_010139_4417_Carton_brun_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)[[21744306, 21744323, 4417, 0.5, 493012381, 979], [21744306, 21744324, 4417, 0.5, 492777938, 979], [21744306, 21744325, 4417, 0.5, 702398920, 979], [21744306, 21744326, 4417, 0.5, 2107752406, 979], [21744306, 21744327, 4417, 0.5, 492628673, 979], [21744306, 21744328, 4417, 0.5, 2107753020, 979], [21744306, 21744329, 4417, 0.5, 492725882, 979], [21744306, 21744330, 4417, 0.5, 2107755527, 979], [21744306, 21744331, 4417, 0.5, 2107752385, 979], [21744306, 21744332, 4417, 0.5, 493202403, 979], [21744306, 21744333, 4417, 0.5, 492668766, 979], [21744306, 21744334, 4417, 0.5, 2107753024, 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`=21744306 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','flou','cartonnette','autre_refus','metal','Carton_gris','plastique','mal_croppe','Teint_Dans_La_Masse','kraft','papier','Carton_brun')) 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`=21744306 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','flou','cartonnette','autre_refus','metal','Carton_gris','plastique','mal_croppe','Teint_Dans_La_Masse','kraft','papier','Carton_brun')) AND mptpi.`min_score`=0.5 To do returned map {'environnement': {'main_port_id': 21744306, 'sub_port_id': 21744323, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14269082, 'last_updated_at': datetime.datetime(2025, 3, 26, 19, 50, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 19, 50, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 19, 50, 57)}, 'flou': {'main_port_id': 21744306, 'sub_port_id': 21744324, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14269083, 'last_updated_at': datetime.datetime(2025, 3, 26, 19, 50, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 19, 50, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 19, 50, 57)}, 'cartonnette': {'main_port_id': 21744306, 'sub_port_id': 21744325, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14269084, 'last_updated_at': datetime.datetime(2025, 3, 26, 19, 50, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 19, 50, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 19, 50, 57)}, 'autre_refus': {'main_port_id': 21744306, 'sub_port_id': 21744326, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14269085, 'last_updated_at': datetime.datetime(2025, 3, 26, 19, 50, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 19, 50, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 19, 50, 57)}, 'metal': {'main_port_id': 21744306, 'sub_port_id': 21744327, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14269086, 'last_updated_at': datetime.datetime(2025, 3, 26, 19, 50, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 19, 50, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 19, 50, 57)}, 'Carton_gris': {'main_port_id': 21744306, 'sub_port_id': 21744328, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14269087, 'last_updated_at': datetime.datetime(2025, 3, 26, 19, 50, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 19, 50, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 19, 50, 57)}, 'plastique': {'main_port_id': 21744306, 'sub_port_id': 21744329, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14269088, 'last_updated_at': datetime.datetime(2025, 3, 26, 19, 50, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 19, 50, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 19, 50, 57)}, 'mal_croppe': {'main_port_id': 21744306, 'sub_port_id': 21744330, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14269089, 'last_updated_at': datetime.datetime(2025, 3, 26, 19, 50, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 19, 50, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 19, 50, 57)}, 'Teint_Dans_La_Masse': {'main_port_id': 21744306, 'sub_port_id': 21744331, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14269090, 'last_updated_at': datetime.datetime(2025, 3, 26, 19, 50, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 19, 50, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 19, 50, 57)}, 'kraft': {'main_port_id': 21744306, 'sub_port_id': 21744332, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14269091, 'last_updated_at': datetime.datetime(2025, 3, 26, 19, 50, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 19, 50, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 19, 50, 57)}, 'papier': {'main_port_id': 21744306, 'sub_port_id': 21744333, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14269092, 'last_updated_at': datetime.datetime(2025, 3, 26, 19, 50, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 19, 50, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 19, 50, 57)}, 'Carton_brun': {'main_port_id': 21744306, 'sub_port_id': 21744334, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14269093, 'last_updated_at': datetime.datetime(2025, 3, 26, 19, 50, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 26, 19, 50, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 26, 19, 50, 57)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21744323,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21744311 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21744324,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21744312 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21744325,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21744313 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21744326,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21744314 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21744327,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21744315 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21744328,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21744316 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21744329,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21744317 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21744330,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21744318 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21744331,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21744319 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21744332,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21744320 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21744333,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21744321 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21744334,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21744322 lien utilise dans velours : https://www.fotonower.com/velours/21744323,21744324,21744325,21744326,21744327,21744328,21744329,21744330,21744331,21744332,21744333,21744334?tags=environnement,flou,cartonnette,autre_refus,metal,Carton_gris,plastique,mal_croppe,Teint_Dans_La_Masse,kraft,papier,Carton_brun After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21744306]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1347588064, 1347588046, 1347588034, 1347588026, 1347588003, 1347587597, 1347587474, 1347587437, 1347587345, 1347587195, 1347586941, 1347586938, 1347586935, 1347586932, 1347586926] map_info['map_portfolio_photo'] : {21744306: [1347588064, 1347588046, 1347588034, 1347588026, 1347588003, 1347587597, 1347587474, 1347587437, 1347587345, 1347587195, 1347586941, 1347586938, 1347586935, 1347586932, 1347586926]} final : False mtd_id 4302 list_pids : [1347588064, 1347588046, 1347588034, 1347588026, 1347588003, 1347587597, 1347587474, 1347587437, 1347587345, 1347587195, 1347586941, 1347586938, 1347586935, 1347586932, 1347586926] Looping around the photos to save general results len do output : 1 /21744306. 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, '2694004') ('4302', '21744306', '1347588064', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347588046', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347588034', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347588026', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347588003', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347587597', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347587474', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347587437', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347587345', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347587195', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347586941', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347586938', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347586935', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347586932', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347586926', None, None, None, None, None, '2694004') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 16 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '21744306', "{'environnement': 21744311, 'flou': 21744312, 'cartonnette': 21744313, 'autre_refus': 21744314, 'metal': 21744315, 'Carton_gris': 21744316, 'plastique': 21744317, 'mal_croppe': 21744318, 'Teint_Dans_La_Masse': 21744319, 'kraft': 21744320, 'papier': 21744321, 'Carton_brun': 21744322}", None, None, None, None, '2694004'), ('4302', '21744306', '1347588064', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347588046', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347588034', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347588026', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347588003', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347587597', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347587474', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347587437', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347587345', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347587195', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347586941', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347586938', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347586935', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347586932', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347586926', None, None, None, None, None, '2694004')] time used for this insertion : 0.015073776245117188 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.005312442779541 time spend to save output : 0.015562057495117188 total time spend for step 1 : 2.020874500274658 step2:final Wed Mar 26 19:50:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 (21744306) 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 21744306 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1347586941,1347586938,1347586935,1347586932,1347586926,1347587597,1347587474,1347587437,1347587345,1347587195,1347588064,1347588046,1347588034,1347588026,1347588003); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21744306]) Inside saveOutput : final : False verbose : True original output for save of step final : {1347588064: ('0.0',), 1347588046: ('0.0',), 1347588034: ('0.0',), 1347588026: ('0.0',), 1347588003: ('0.0',), 1347587597: ('0.0',), 1347587474: ('0.0',), 1347587437: ('0.0',), 1347587345: ('0.0',), 1347587195: ('0.0',), 1347586941: ('0.0',), 1347586938: ('0.0',), 1347586935: ('0.0',), 1347586932: ('0.0',), 1347586926: ('0.0',)} new output for save of step final : {1347588064: ('0.0',), 1347588046: ('0.0',), 1347588034: ('0.0',), 1347588026: ('0.0',), 1347588003: ('0.0',), 1347587597: ('0.0',), 1347587474: ('0.0',), 1347587437: ('0.0',), 1347587345: ('0.0',), 1347587195: ('0.0',), 1347586941: ('0.0',), 1347586938: ('0.0',), 1347586935: ('0.0',), 1347586932: ('0.0',), 1347586926: ('0.0',)} [1347588064, 1347588046, 1347588034, 1347588026, 1347588003, 1347587597, 1347587474, 1347587437, 1347587345, 1347587195, 1347586941, 1347586938, 1347586935, 1347586932, 1347586926] map_info['map_portfolio_photo'] : {21744306: [1347588064, 1347588046, 1347588034, 1347588026, 1347588003, 1347587597, 1347587474, 1347587437, 1347587345, 1347587195, 1347586941, 1347586938, 1347586935, 1347586932, 1347586926]} final : False mtd_id 4302 list_pids : [1347588064, 1347588046, 1347588034, 1347588026, 1347588003, 1347587597, 1347587474, 1347587437, 1347587345, 1347587195, 1347586941, 1347586938, 1347586935, 1347586932, 1347586926] Looping around the photos to save general results len do output : 15 /1347588064.Didn't retrieve data . /1347588046.Didn't retrieve data . /1347588034.Didn't retrieve data . /1347588026.Didn't retrieve data . /1347588003.Didn't retrieve data . /1347587597.Didn't retrieve data . /1347587474.Didn't retrieve data . /1347587437.Didn't retrieve data . /1347587345.Didn't retrieve data . /1347587195.Didn't retrieve data . /1347586941.Didn't retrieve data . /1347586938.Didn't retrieve data . /1347586935.Didn't retrieve data . /1347586932.Didn't retrieve data . /1347586926.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, '2694004') ('4302', '21744306', '1347588064', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347588046', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347588034', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347588026', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347588003', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347587597', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347587474', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347587437', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347587345', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347587195', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347586941', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347586938', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347586935', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347586932', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347586926', None, None, None, None, None, '2694004') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 45 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', '21744306', '1347588064', '0.0', None, None, None, None, '2694004'), ('4302', '21744306', '1347588046', '0.0', None, None, None, None, '2694004'), ('4302', '21744306', '1347588034', '0.0', None, None, None, None, '2694004'), ('4302', '21744306', '1347588026', '0.0', None, None, None, None, '2694004'), ('4302', '21744306', '1347588003', '0.0', None, None, None, None, '2694004'), ('4302', '21744306', '1347587597', '0.0', None, None, None, None, '2694004'), ('4302', '21744306', '1347587474', '0.0', None, None, None, None, '2694004'), ('4302', '21744306', '1347587437', '0.0', None, None, None, None, '2694004'), ('4302', '21744306', '1347587345', '0.0', None, None, None, None, '2694004'), ('4302', '21744306', '1347587195', '0.0', None, None, None, None, '2694004'), ('4302', '21744306', '1347586941', '0.0', None, None, None, None, '2694004'), ('4302', '21744306', '1347586938', '0.0', None, None, None, None, '2694004'), ('4302', '21744306', '1347586935', '0.0', None, None, None, None, '2694004'), ('4302', '21744306', '1347586932', '0.0', None, None, None, None, '2694004'), ('4302', '21744306', '1347586926', '0.0', None, None, None, None, '2694004')] time used for this insertion : 0.01364278793334961 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.014844894409179688 time spend to save output : 0.014514684677124023 total time spend for step 2 : 0.02935957908630371 step3:velours_tree Wed Mar 26 19:50:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 : {21744306: [{'environnement': 21744311, 'flou': 21744312, 'cartonnette': 21744313, 'autre_refus': 21744314, 'metal': 21744315, 'Carton_gris': 21744316, 'plastique': 21744317, 'mal_croppe': 21744318, 'Teint_Dans_La_Masse': 21744319, 'kraft': 21744320, 'papier': 21744321, 'Carton_brun': 21744322}]} input_args_next_step : {21744306: ()} output_args : {21744306: [{'environnement': 21744311, 'flou': 21744312, 'cartonnette': 21744313, 'autre_refus': 21744314, 'metal': 21744315, 'Carton_gris': 21744316, 'plastique': 21744317, 'mal_croppe': 21744318, 'Teint_Dans_La_Masse': 21744319, 'kraft': 21744320, 'papier': 21744321, 'Carton_brun': 21744322}]} args : 21744306 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'environnement': 21744311, 'flou': 21744312, 'cartonnette': 21744313, 'autre_refus': 21744314, 'metal': 21744315, 'Carton_gris': 21744316, 'plastique': 21744317, 'mal_croppe': 21744318, 'Teint_Dans_La_Masse': 21744319, 'kraft': 21744320, 'papier': 21744321, 'Carton_brun': 21744322},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21744306) 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([21744306]) 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.36855125427246094 time spend to save output : 0.00010251998901367188 total time spend for step 3 : 0.3686537742614746 step4:send_mail_cod Wed Mar 26 19:50:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 : {1347588064: ('0.0',), 1347588046: ('0.0',), 1347588034: ('0.0',), 1347588026: ('0.0',), 1347588003: ('0.0',), 1347587597: ('0.0',), 1347587474: ('0.0',), 1347587437: ('0.0',), 1347587345: ('0.0',), 1347587195: ('0.0',), 1347586941: ('0.0',), 1347586938: ('0.0',), 1347586935: ('0.0',), 1347586932: ('0.0',), 1347586926: ('0.0',)} input_args_next_step : {1347588064: ()} output_args : {1347588064: ('0.0',), 1347588046: ('0.0',), 1347588034: ('0.0',), 1347588026: ('0.0',), 1347588003: ('0.0',), 1347587597: ('0.0',), 1347587474: ('0.0',), 1347587437: ('0.0',), 1347587345: ('0.0',), 1347587195: ('0.0',), 1347586941: ('0.0',), 1347586938: ('0.0',), 1347586935: ('0.0',), 1347586932: ('0.0',), 1347586926: ('0.0',)} args : 1347588064 depend.output_id : 0 input_args_next_step : {1347588064: ('0.0',), 1347588046: ()} output_args : {1347588064: ('0.0',), 1347588046: ('0.0',), 1347588034: ('0.0',), 1347588026: ('0.0',), 1347588003: ('0.0',), 1347587597: ('0.0',), 1347587474: ('0.0',), 1347587437: ('0.0',), 1347587345: ('0.0',), 1347587195: ('0.0',), 1347586941: ('0.0',), 1347586938: ('0.0',), 1347586935: ('0.0',), 1347586932: ('0.0',), 1347586926: ('0.0',)} args : 1347588046 depend.output_id : 0 input_args_next_step : {1347588064: ('0.0',), 1347588046: ('0.0',), 1347588034: ()} output_args : {1347588064: ('0.0',), 1347588046: ('0.0',), 1347588034: ('0.0',), 1347588026: ('0.0',), 1347588003: ('0.0',), 1347587597: ('0.0',), 1347587474: ('0.0',), 1347587437: ('0.0',), 1347587345: ('0.0',), 1347587195: ('0.0',), 1347586941: ('0.0',), 1347586938: ('0.0',), 1347586935: ('0.0',), 1347586932: ('0.0',), 1347586926: ('0.0',)} args : 1347588034 depend.output_id : 0 input_args_next_step : {1347588064: ('0.0',), 1347588046: ('0.0',), 1347588034: ('0.0',), 1347588026: ()} output_args : {1347588064: ('0.0',), 1347588046: ('0.0',), 1347588034: ('0.0',), 1347588026: ('0.0',), 1347588003: ('0.0',), 1347587597: ('0.0',), 1347587474: ('0.0',), 1347587437: ('0.0',), 1347587345: ('0.0',), 1347587195: ('0.0',), 1347586941: ('0.0',), 1347586938: ('0.0',), 1347586935: ('0.0',), 1347586932: ('0.0',), 1347586926: ('0.0',)} args : 1347588026 depend.output_id : 0 input_args_next_step : {1347588064: ('0.0',), 1347588046: ('0.0',), 1347588034: ('0.0',), 1347588026: ('0.0',), 1347588003: ()} output_args : {1347588064: ('0.0',), 1347588046: ('0.0',), 1347588034: ('0.0',), 1347588026: ('0.0',), 1347588003: ('0.0',), 1347587597: ('0.0',), 1347587474: ('0.0',), 1347587437: ('0.0',), 1347587345: ('0.0',), 1347587195: ('0.0',), 1347586941: ('0.0',), 1347586938: ('0.0',), 1347586935: ('0.0',), 1347586932: ('0.0',), 1347586926: ('0.0',)} args : 1347588003 depend.output_id : 0 input_args_next_step : {1347588064: ('0.0',), 1347588046: ('0.0',), 1347588034: ('0.0',), 1347588026: ('0.0',), 1347588003: ('0.0',), 1347587597: ()} output_args : {1347588064: ('0.0',), 1347588046: ('0.0',), 1347588034: ('0.0',), 1347588026: ('0.0',), 1347588003: ('0.0',), 1347587597: ('0.0',), 1347587474: ('0.0',), 1347587437: ('0.0',), 1347587345: ('0.0',), 1347587195: ('0.0',), 1347586941: ('0.0',), 1347586938: ('0.0',), 1347586935: ('0.0',), 1347586932: ('0.0',), 1347586926: ('0.0',)} args : 1347587597 depend.output_id : 0 input_args_next_step : {1347588064: ('0.0',), 1347588046: ('0.0',), 1347588034: ('0.0',), 1347588026: ('0.0',), 1347588003: ('0.0',), 1347587597: ('0.0',), 1347587474: ()} output_args : {1347588064: ('0.0',), 1347588046: ('0.0',), 1347588034: ('0.0',), 1347588026: ('0.0',), 1347588003: ('0.0',), 1347587597: ('0.0',), 1347587474: ('0.0',), 1347587437: ('0.0',), 1347587345: ('0.0',), 1347587195: ('0.0',), 1347586941: ('0.0',), 1347586938: ('0.0',), 1347586935: ('0.0',), 1347586932: ('0.0',), 1347586926: ('0.0',)} args : 1347587474 depend.output_id : 0 input_args_next_step : {1347588064: ('0.0',), 1347588046: ('0.0',), 1347588034: ('0.0',), 1347588026: ('0.0',), 1347588003: ('0.0',), 1347587597: ('0.0',), 1347587474: ('0.0',), 1347587437: ()} output_args : {1347588064: ('0.0',), 1347588046: ('0.0',), 1347588034: ('0.0',), 1347588026: ('0.0',), 1347588003: ('0.0',), 1347587597: ('0.0',), 1347587474: ('0.0',), 1347587437: ('0.0',), 1347587345: ('0.0',), 1347587195: ('0.0',), 1347586941: ('0.0',), 1347586938: ('0.0',), 1347586935: ('0.0',), 1347586932: ('0.0',), 1347586926: ('0.0',)} args : 1347587437 depend.output_id : 0 input_args_next_step : {1347588064: ('0.0',), 1347588046: ('0.0',), 1347588034: ('0.0',), 1347588026: ('0.0',), 1347588003: ('0.0',), 1347587597: ('0.0',), 1347587474: ('0.0',), 1347587437: ('0.0',), 1347587345: ()} output_args : {1347588064: ('0.0',), 1347588046: ('0.0',), 1347588034: ('0.0',), 1347588026: ('0.0',), 1347588003: ('0.0',), 1347587597: ('0.0',), 1347587474: ('0.0',), 1347587437: ('0.0',), 1347587345: ('0.0',), 1347587195: ('0.0',), 1347586941: ('0.0',), 1347586938: ('0.0',), 1347586935: ('0.0',), 1347586932: ('0.0',), 1347586926: ('0.0',)} args : 1347587345 depend.output_id : 0 input_args_next_step : {1347588064: ('0.0',), 1347588046: ('0.0',), 1347588034: ('0.0',), 1347588026: ('0.0',), 1347588003: ('0.0',), 1347587597: ('0.0',), 1347587474: ('0.0',), 1347587437: ('0.0',), 1347587345: ('0.0',), 1347587195: ()} output_args : {1347588064: ('0.0',), 1347588046: ('0.0',), 1347588034: ('0.0',), 1347588026: ('0.0',), 1347588003: ('0.0',), 1347587597: ('0.0',), 1347587474: ('0.0',), 1347587437: ('0.0',), 1347587345: ('0.0',), 1347587195: ('0.0',), 1347586941: ('0.0',), 1347586938: ('0.0',), 1347586935: ('0.0',), 1347586932: ('0.0',), 1347586926: ('0.0',)} args : 1347587195 depend.output_id : 0 input_args_next_step : {1347588064: ('0.0',), 1347588046: ('0.0',), 1347588034: ('0.0',), 1347588026: ('0.0',), 1347588003: ('0.0',), 1347587597: ('0.0',), 1347587474: ('0.0',), 1347587437: ('0.0',), 1347587345: ('0.0',), 1347587195: ('0.0',), 1347586941: ()} output_args : {1347588064: ('0.0',), 1347588046: ('0.0',), 1347588034: ('0.0',), 1347588026: ('0.0',), 1347588003: ('0.0',), 1347587597: ('0.0',), 1347587474: ('0.0',), 1347587437: ('0.0',), 1347587345: ('0.0',), 1347587195: ('0.0',), 1347586941: ('0.0',), 1347586938: ('0.0',), 1347586935: ('0.0',), 1347586932: ('0.0',), 1347586926: ('0.0',)} args : 1347586941 depend.output_id : 0 input_args_next_step : {1347588064: ('0.0',), 1347588046: ('0.0',), 1347588034: ('0.0',), 1347588026: ('0.0',), 1347588003: ('0.0',), 1347587597: ('0.0',), 1347587474: ('0.0',), 1347587437: ('0.0',), 1347587345: ('0.0',), 1347587195: ('0.0',), 1347586941: ('0.0',), 1347586938: ()} output_args : {1347588064: ('0.0',), 1347588046: ('0.0',), 1347588034: ('0.0',), 1347588026: ('0.0',), 1347588003: ('0.0',), 1347587597: ('0.0',), 1347587474: ('0.0',), 1347587437: ('0.0',), 1347587345: ('0.0',), 1347587195: ('0.0',), 1347586941: ('0.0',), 1347586938: ('0.0',), 1347586935: ('0.0',), 1347586932: ('0.0',), 1347586926: ('0.0',)} args : 1347586938 depend.output_id : 0 input_args_next_step : {1347588064: ('0.0',), 1347588046: ('0.0',), 1347588034: ('0.0',), 1347588026: ('0.0',), 1347588003: ('0.0',), 1347587597: ('0.0',), 1347587474: ('0.0',), 1347587437: ('0.0',), 1347587345: ('0.0',), 1347587195: ('0.0',), 1347586941: ('0.0',), 1347586938: ('0.0',), 1347586935: ()} output_args : {1347588064: ('0.0',), 1347588046: ('0.0',), 1347588034: ('0.0',), 1347588026: ('0.0',), 1347588003: ('0.0',), 1347587597: ('0.0',), 1347587474: ('0.0',), 1347587437: ('0.0',), 1347587345: ('0.0',), 1347587195: ('0.0',), 1347586941: ('0.0',), 1347586938: ('0.0',), 1347586935: ('0.0',), 1347586932: ('0.0',), 1347586926: ('0.0',)} args : 1347586935 depend.output_id : 0 input_args_next_step : {1347588064: ('0.0',), 1347588046: ('0.0',), 1347588034: ('0.0',), 1347588026: ('0.0',), 1347588003: ('0.0',), 1347587597: ('0.0',), 1347587474: ('0.0',), 1347587437: ('0.0',), 1347587345: ('0.0',), 1347587195: ('0.0',), 1347586941: ('0.0',), 1347586938: ('0.0',), 1347586935: ('0.0',), 1347586932: ()} output_args : {1347588064: ('0.0',), 1347588046: ('0.0',), 1347588034: ('0.0',), 1347588026: ('0.0',), 1347588003: ('0.0',), 1347587597: ('0.0',), 1347587474: ('0.0',), 1347587437: ('0.0',), 1347587345: ('0.0',), 1347587195: ('0.0',), 1347586941: ('0.0',), 1347586938: ('0.0',), 1347586935: ('0.0',), 1347586932: ('0.0',), 1347586926: ('0.0',)} args : 1347586932 depend.output_id : 0 input_args_next_step : {1347588064: ('0.0',), 1347588046: ('0.0',), 1347588034: ('0.0',), 1347588026: ('0.0',), 1347588003: ('0.0',), 1347587597: ('0.0',), 1347587474: ('0.0',), 1347587437: ('0.0',), 1347587345: ('0.0',), 1347587195: ('0.0',), 1347586941: ('0.0',), 1347586938: ('0.0',), 1347586935: ('0.0',), 1347586932: ('0.0',), 1347586926: ()} output_args : {1347588064: ('0.0',), 1347588046: ('0.0',), 1347588034: ('0.0',), 1347588026: ('0.0',), 1347588003: ('0.0',), 1347587597: ('0.0',), 1347587474: ('0.0',), 1347587437: ('0.0',), 1347587345: ('0.0',), 1347587195: ('0.0',), 1347586941: ('0.0',), 1347586938: ('0.0',), 1347586935: ('0.0',), 1347586932: ('0.0',), 1347586926: ('0.0',)} args : 1347586926 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 : {21744306: [{'environnement': 21744311, 'flou': 21744312, 'cartonnette': 21744313, 'autre_refus': 21744314, 'metal': 21744315, 'Carton_gris': 21744316, 'plastique': 21744317, 'mal_croppe': 21744318, 'Teint_Dans_La_Masse': 21744319, 'kraft': 21744320, 'papier': 21744321, 'Carton_brun': 21744322}]} input_args_next_step : {1347588064: ('0.0',), 1347588046: ('0.0',), 1347588034: ('0.0',), 1347588026: ('0.0',), 1347588003: ('0.0',), 1347587597: ('0.0',), 1347587474: ('0.0',), 1347587437: ('0.0',), 1347587345: ('0.0',), 1347587195: ('0.0',), 1347586941: ('0.0',), 1347586938: ('0.0',), 1347586935: ('0.0',), 1347586932: ('0.0',), 1347586926: ('0.0',), 21744306: ()} output_args : {21744306: [{'environnement': 21744311, 'flou': 21744312, 'cartonnette': 21744313, 'autre_refus': 21744314, 'metal': 21744315, 'Carton_gris': 21744316, 'plastique': 21744317, 'mal_croppe': 21744318, 'Teint_Dans_La_Masse': 21744319, 'kraft': 21744320, 'papier': 21744321, 'Carton_brun': 21744322}]} args : 21744306 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 :16, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21744306) 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 (1347588064,1347588046,1347588034,1347588026,1347588003,1347587597,1347587474,1347587437,1347587345,1347587195,1347586941,1347586938,1347586935,1347586932,1347586926) Found this number of photos: 15 ##### Call download_photos : nb_thread : 5 begin to download photo : 1347586926 begin to download photo : 1347586941 begin to download photo : 1347587474 begin to download photo : 1347588034 download finish for photo 1347588034 begin to download photo : 1347588046 download finish for photo 1347586941 begin to download photo : 1347587195 download finish for photo 1347587474 begin to download photo : 1347587597 download finish for photo 1347586926 begin to download photo : 1347586932 download finish for photo 1347587195 begin to download photo : 1347587345 download finish for photo 1347588046 begin to download photo : 1347588064 download finish for photo 1347586932 begin to download photo : 1347586935 download finish for photo 1347587597 begin to download photo : 1347588003 download finish for photo 1347586935 begin to download photo : 1347586938 download finish for photo 1347588064 download finish for photo 1347587345 begin to download photo : 1347587437 download finish for photo 1347588003 begin to download photo : 1347588026 download finish for photo 1347586938 download finish for photo 1347587437 download finish for photo 1347588026 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette217443121743015058/ imagette217443131743015058/ imagette217443141743015058/ imagette217443151743015059/ imagette217443171743015059/ imagette217443181743015059/ imagette217443201743015059/ imagette217443161743015059/ imagette217443191743015059/ imagette217443221743015059/ length of list_filenames : 15 ; length of list_pids : 15 ; length of list_args : 15 results_Auto_P21744306_26-03-2025_19_50_58.pdf 21744312 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=21744312 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217443121743015058 21744313 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=21744313 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217443131743015058 21744314 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=21744314 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217443141743015058 21744315 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=21744315 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217443151743015059 21744317 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=21744317 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217443171743015059 21744318 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=21744318 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217443181743015059 21744320 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=21744320 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217443201743015059 21744316 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=21744316 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217443161743015059 21744319 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=21744319 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217443191743015059 21744322 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=21744322 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217443221743015059 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=21744306 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/21744323,21744324,21744325,21744326,21744327,21744328,21744329,21744330,21744331,21744332,21744333,21744334?tags=environnement,flou,cartonnette,autre_refus,metal,Carton_gris,plastique,mal_croppe,Teint_Dans_La_Masse,kraft,papier,Carton_brun your option no_mail is active, we will not send the real mail to your client args[1347588064] : ('0.0',) no score found for photo 1347588064 We are sending mail with results at report@fotonower.com args[1347588046] : ('0.0',) no score found for photo 1347588046 We are sending mail with results at report@fotonower.com args[1347588034] : ('0.0',) no score found for photo 1347588034 We are sending mail with results at report@fotonower.com args[1347588026] : ('0.0',) no score found for photo 1347588026 We are sending mail with results at report@fotonower.com args[1347588003] : ('0.0',) no score found for photo 1347588003 We are sending mail with results at report@fotonower.com args[1347587597] : ('0.0',) no score found for photo 1347587597 We are sending mail with results at report@fotonower.com args[1347587474] : ('0.0',) no score found for photo 1347587474 We are sending mail with results at report@fotonower.com args[1347587437] : ('0.0',) no score found for photo 1347587437 We are sending mail with results at report@fotonower.com args[1347587345] : ('0.0',) no score found for photo 1347587345 We are sending mail with results at report@fotonower.com args[1347587195] : ('0.0',) no score found for photo 1347587195 We are sending mail with results at report@fotonower.com args[1347586941] : ('0.0',) no score found for photo 1347586941 We are sending mail with results at report@fotonower.com args[1347586938] : ('0.0',) no score found for photo 1347586938 We are sending mail with results at report@fotonower.com args[1347586935] : ('0.0',) no score found for photo 1347586935 We are sending mail with results at report@fotonower.com args[1347586932] : ('0.0',) no score found for photo 1347586932 We are sending mail with results at report@fotonower.com args[1347586926] : ('0.0',) no score found for photo 1347586926 We are sending mail with results at report@fotonower.com refus_total : 0.0 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=21744306 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_P21744306_26-03-2025_19_50_58.pdf results_Auto_P21744306_26-03-2025_19_50_58.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21744306_26-03-2025_19_50_58.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','21744306','results_Auto_P21744306_26-03-2025_19_50_58.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21744306_26-03-2025_19_50_58.pdf','pdf','','0.13','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21744306]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1347588064, 1347588046, 1347588034, 1347588026, 1347588003, 1347587597, 1347587474, 1347587437, 1347587345, 1347587195, 1347586941, 1347586938, 1347586935, 1347586932, 1347586926] map_info['map_portfolio_photo'] : {21744306: [1347588064, 1347588046, 1347588034, 1347588026, 1347588003, 1347587597, 1347587474, 1347587437, 1347587345, 1347587195, 1347586941, 1347586938, 1347586935, 1347586932, 1347586926]} final : False mtd_id 4302 list_pids : [1347588064, 1347588046, 1347588034, 1347588026, 1347588003, 1347587597, 1347587474, 1347587437, 1347587345, 1347587195, 1347586941, 1347586938, 1347586935, 1347586932, 1347586926] 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, '2694004') ('4302', '21744306', '1347588064', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347588046', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347588034', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347588026', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347588003', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347587597', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347587474', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347587437', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347587345', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347587195', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347586941', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347586938', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347586935', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347586932', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347586926', None, None, None, None, None, '2694004') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '21744306', '1347588064', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347588046', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347588034', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347588026', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347588003', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347587597', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347587474', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347587437', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347587345', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347587195', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347586941', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347586938', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347586935', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347586932', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347586926', None, None, None, None, None, '2694004')] time used for this insertion : 0.014605045318603516 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.8925457000732422 time spend to save output : 0.015017271041870117 total time spend for step 4 : 1.9075629711151123 step5:split_time_score Wed Mar 26 19:51:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['21744306'] 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 : [('21744306',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21744306) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1347588034: {'path': 'temp/1743015058_144829_1347588034_4ca9bf008ca08920b865c7e638101eea.jpg', 'extension': 'jpg'}, 1347588046: {'path': 'temp/1743015058_144829_1347588046_179c2a3bcfb25269d66b3a5b9c2d7dc2.jpg', 'extension': 'jpg'}, 1347588064: {'path': 'temp/1743015058_144829_1347588064_6e61f764b7b4f2b345a299123b012015.jpg', 'extension': 'jpg'}, 1347586926: {'path': 'temp/1743015058_144829_1347586926_f39521bd010acdf684632ce63e451917.jpg', 'extension': 'jpg'}, 1347586932: {'path': 'temp/1743015058_144829_1347586932_603eb1f856011226d33d9564112a26dd.jpg', 'extension': 'jpg'}, 1347586935: {'path': 'temp/1743015058_144829_1347586935_5acbf301f6f905fcc690a5b48a56de54.jpg', 'extension': 'jpg'}, 1347586938: {'path': 'temp/1743015058_144829_1347586938_4784a19bc2f6f136c90f3925c93e97f7.jpg', 'extension': 'jpg'}, 1347586941: {'path': 'temp/1743015058_144829_1347586941_f18048151f0ca836dab39d7eff2b4d24.jpg', 'extension': 'jpg'}, 1347587195: {'path': 'temp/1743015058_144829_1347587195_d6de4e399a8577114c537ca637a4865a.jpg', 'extension': 'jpg'}, 1347587345: {'path': 'temp/1743015058_144829_1347587345_ce94248e207795fc7dbf9bd8bf4ffaf8.jpg', 'extension': 'jpg'}, 1347587437: {'path': 'temp/1743015058_144829_1347587437_16fe9ef90e4ffb676cf9fe2f97dfb05c.jpg', 'extension': 'jpg'}, 1347587474: {'path': 'temp/1743015058_144829_1347587474_58457e98d7d22a5810bf8a0699dc7b34.jpg', 'extension': 'jpg'}, 1347587597: {'path': 'temp/1743015058_144829_1347587597_355c1f5ae739ef2e59e3303a3a42620d.jpg', 'extension': 'jpg'}, 1347588003: {'path': 'temp/1743015058_144829_1347588003_f9448a05a5ec729aca82d54b11f1543f.jpg', 'extension': 'jpg'}, 1347588026: {'path': 'temp/1743015058_144829_1347588026_4207ca4b8183aacb51e0cd5e9b809156.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 = 21744306; (('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 = 21744306 group by h (('19', 15),) 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=21744306 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 (21744306) 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 (21744306) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 26032025 21744306 Nombre de photos uploadées : 15 / 23040 (0%) 26032025 21744306 Nombre de photos taguées (types de déchets): 0 / 15 (0%) 26032025 21744306 Nombre de photos taguées (volume) : 0 / 15 (0%) [{'photo_id': 1347586941, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/f18048151f0ca836dab39d7eff2b4d24.jpg', 'username': None, 'uploaded_at': 1743014835, 'text': 'image_26032025_19_45_04_10139.jpg'}, {'photo_id': 1347586938, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/4784a19bc2f6f136c90f3925c93e97f7.jpg', 'username': None, 'uploaded_at': 1743014835, 'text': 'image_26032025_19_45_13_9126.jpg'}, {'photo_id': 1347586935, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/5acbf301f6f905fcc690a5b48a56de54.jpg', 'username': None, 'uploaded_at': 1743014835, 'text': 'image_26032025_19_45_23_10142.jpg'}, {'photo_id': 1347586932, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/26/603eb1f856011226d33d9564112a26dd.jpg', 'username': None, 'uploaded_at': 1743014835, 'text': 'image_26032025_19_45_33_10137.jpg'}] 0 [] elapsed_time : load_data_split_time_score 3.5762786865234375e-06 elapsed_time : order_list_meta_photo_and_scores 9.059906005859375e-06 ??????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0008852481842041016 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 21744306, '2025-03-26' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1689284,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.02273273468017578 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= 1689284 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1689284, 'dashboard_run_id': 1698759, 'mtr_portfolio_id': 21741201, 'dashboard_result_id': 9645568, '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_P21741201_26-03-2025_19_18_45.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21741243, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21741244, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21741245, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21741246, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21741247, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21741248, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21741249, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21741250, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21741251, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21741252, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21741253, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21741254, 'pht': 3726}}"}, {'dashboat_entry_day': 1689284, 'dashboard_run_id': 1698759, 'mtr_portfolio_id': 21742216, 'dashboard_result_id': 9645569, '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_P21742216_26-03-2025_19_34_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21742277, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21742278, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21742279, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21742280, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21742281, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21742282, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21742283, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21742284, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21742285, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21742286, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21742287, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21742288, 'pht': 3726}}"}, {'dashboat_entry_day': 1689284, 'dashboard_run_id': 1698759, 'mtr_portfolio_id': 21743303, 'dashboard_result_id': 9645570, '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_P21743303_26-03-2025_19_48_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21743353, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21743354, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21743355, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21743356, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21743357, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21743358, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21743359, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21743360, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21743361, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21743362, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21743363, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21743364, 'pht': 3726}}"}, {'dashboat_entry_day': 1689284, 'dashboard_run_id': 1698759, 'mtr_portfolio_id': 21744306, 'dashboard_result_id': 9645571, '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 = 21741201 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': 2693822, 'mtr_portfolio_id': 21741201, 'created_at': datetime.datetime(2025, 3, 26, 19, 18, 44), 'result': '0.05696838522286202', 'result_long': None, 'result_double': None}] Qualite : 0.05696838522286202 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21741201 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21741201_26-03-2025_19_18_45.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21741201 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_P21741201_26-03-2025_19_18_45.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21741243, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21741244, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21741245, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21741246, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21741247, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21741248, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21741249, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21741250, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21741251, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21741252, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21741253, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21741254, 'pht': 3726}}" where mtr_portfolio_id = 21741201 and dashboard_run_id = 1698759 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`=21741201 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9645568, 0.05696838522286202, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21741201_26-03-2025_19_18_45.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21741243, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21741244, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21741245, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21741246, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21741247, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21741248, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21741249, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21741250, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21741251, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21741252, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21741253, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21741254, '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 = 21742216 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': 2693871, 'mtr_portfolio_id': 21742216, 'created_at': datetime.datetime(2025, 3, 26, 19, 34, 58), 'result': '0.033219398591330655', 'result_long': None, 'result_double': None}] Qualite : 0.033219398591330655 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21742216 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21742216_26-03-2025_19_34_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21742216 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_P21742216_26-03-2025_19_34_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21742277, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21742278, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21742279, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21742280, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21742281, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21742282, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21742283, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21742284, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21742285, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21742286, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21742287, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21742288, 'pht': 3726}}" where mtr_portfolio_id = 21742216 and dashboard_run_id = 1698759 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`=21742216 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9645569, 0.033219398591330655, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21742216_26-03-2025_19_34_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21742277, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21742278, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21742279, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21742280, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21742281, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21742282, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21742283, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21742284, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21742285, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21742286, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21742287, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21742288, '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 = 21743303 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': 2693953, 'mtr_portfolio_id': 21743303, 'created_at': datetime.datetime(2025, 3, 26, 19, 48, 59), 'result': '0.03897351687022581', 'result_long': None, 'result_double': None}] Qualite : 0.03897351687022581 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21743303 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21743303_26-03-2025_19_48_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21743303 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_P21743303_26-03-2025_19_48_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21743353, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21743354, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21743355, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21743356, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21743357, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21743358, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21743359, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21743360, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21743361, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21743362, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21743363, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21743364, 'pht': 3726}}" where mtr_portfolio_id = 21743303 and dashboard_run_id = 1698759 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`=21743303 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9645570, 0.03897351687022581, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21743303_26-03-2025_19_48_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21743353, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21743354, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21743355, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21743356, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21743357, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21743358, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21743359, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21743360, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21743361, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21743362, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21743363, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21743364, '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 = 21744306 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 21744306 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 21744306 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 21744306 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 21744306 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21744306 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21744306_26-03-2025_19_50_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21744306 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_P21744306_26-03-2025_19_50_58.pdf'}" where mtr_portfolio_id = 21744306 and dashboard_run_id = 1698759 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21741201,21742216,21743303,21744306) result : ((1347567293,), (1347567339,), (1347567379,), (1347567407,), (1347567783,), (1347567808,), (1347567842,), (1347567871,), (1347567905,), (1347568295,), (1347568360,), (1347568435,), (1347568510,), (1347568590,), (1347569299,), (1347569384,), (1347569461,), (1347569507,), (1347569565,), (1347570185,), (1347570264,), (1347570340,), (1347570358,), (1347570469,), (1347571133,), (1347571178,), (1347571225,), (1347571266,), (1347571343,), (1347571782,), (1347571832,), (1347571861,), (1347571928,), (1347572617,), (1347572637,), (1347572757,), (1347572805,), (1347572865,), (1347573254,), (1347573281,), (1347573306,), (1347573316,), (1347573331,), (1347573649,), (1347573684,), (1347573761,), (1347573800,), (1347573832,), (1347574056,), (1347574084,), (1347574126,), (1347574150,), (1347574168,), (1347574172,), (1347574420,), (1347574442,), (1347574455,), (1347574850,), (1347574898,), (1347575415,), (1347575441,), (1347575492,), (1347575519,), (1347575548,), (1347575572,), (1347575664,), (1347575685,), (1347575715,), (1347575739,), (1347575771,), (1347575818,), (1347576108,), (1347576018,), (1347576032,), (1347576066,), (1347576079,), (1347576525,), (1347576576,), (1347576664,), (1347576700,), (1347576829,), (1347577425,), (1347577450,), (1347577522,), (1347577531,), (1347577541,), (1347577812,), (1347577814,), (1347577816,), (1347577821,), (1347577844,), (1347578034,), (1347578081,), (1347578178,), (1347578252,), (1347578282,), (1347578317,), (1347578458,), (1347578479,), (1347578487,), (1347578503,), (1347578828,), (1347578863,), (1347578877,), (1347578909,), (1347578927,), (1347579480,), (1347579552,), (1347579659,), (1347579700,), (1347579714,), (1347579729,), (1347579834,), (1347579836,), (1347579867,), (1347580213,), (1347580285,), (1347580336,), (1347580405,), (1347580464,), (1347580525,), (1347580996,), (1347581040,), (1347581060,), (1347581089,), (1347581428,), (1347581461,), (1347581468,), (1347581487,), (1347581566,), (1347581574,), (1347581914,), (1347581917,), (1347581925,), (1347581999,), (1347582002,), (1347582007,), (1347582018,), (1347582044,), (1347582070,), (1347582294,), (1347582309,), (1347582325,), (1347582678,), (1347582502,), (1347582508,), (1347582511,), (1347582525,), (1347582551,), (1347582777,), (1347582784,), (1347582817,), (1347583130,), (1347583141,), (1347583146,), (1347583148,), (1347583171,), (1347583267,), (1347583373,), (1347583377,), (1347583381,), (1347583435,), (1347583448,), (1347583857,), (1347583864,), (1347583869,), (1347583879,), (1347583898,), (1347584097,), (1347584100,), (1347584106,), (1347584423,), (1347584465,), (1347584478,), (1347584523,), (1347584525,), (1347584547,), (1347584561,), (1347584565,), (1347584650,), (1347584672,), (1347584682,), (1347584685,), (1347585023,), (1347585067,), (1347585130,), (1347585174,), (1347585222,), (1347585292,), (1347585605,), (1347585646,), (1347585700,), (1347586085,), (1347586120,), (1347586132,), (1347586158,), (1347586188,), (1347586244,), (1347586564,), (1347586570,), (1347586574,), (1347586577,), (1347586582,), (1347586702,), (1347586730,), (1347586754,), (1347586776,), (1347586943,), (1347586926,), (1347586932,), (1347586935,), (1347586938,), (1347586941,), (1347587195,), (1347587345,), (1347587437,), (1347587474,), (1347587597,), (1347588003,), (1347588026,), (1347588034,), (1347588046,), (1347588064,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'26032025': {'nb_upload': 15, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21744306]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1347588064, 1347588046, 1347588034, 1347588026, 1347588003, 1347587597, 1347587474, 1347587437, 1347587345, 1347587195, 1347586941, 1347586938, 1347586935, 1347586932, 1347586926] map_info['map_portfolio_photo'] : {21744306: [1347588064, 1347588046, 1347588034, 1347588026, 1347588003, 1347587597, 1347587474, 1347587437, 1347587345, 1347587195, 1347586941, 1347586938, 1347586935, 1347586932, 1347586926]} final : True mtd_id 4302 list_pids : [1347588064, 1347588046, 1347588034, 1347588026, 1347588003, 1347587597, 1347587474, 1347587437, 1347587345, 1347587195, 1347586941, 1347586938, 1347586935, 1347586932, 1347586926] Looping around the photos to save general results len do output : 1 /21744306Didn'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, '2694004') ('4302', '21744306', '1347588064', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347588046', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347588034', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347588026', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347588003', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347587597', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347587474', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347587437', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347587345', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347587195', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347586941', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347586938', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347586935', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347586932', None, None, None, None, None, '2694004') ('4302', None, None, None, None, None, None, None, '2694004') ('4302', '21744306', '1347586926', None, None, None, None, None, '2694004') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 16 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '21744306', 'None', None, None, None, None, '2694004'), ('4302', '21744306', '1347588064', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347588046', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347588034', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347588026', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347588003', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347587597', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347587474', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347587437', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347587345', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347587195', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347586941', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347586938', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347586935', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347586932', None, None, None, None, None, '2694004'), ('4302', '21744306', '1347586926', None, None, None, None, None, '2694004')] time used for this insertion : 0.014651775360107422 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.3682420253753662 time spend to save output : 0.01500701904296875 total time spend for step 5 : 0.38324904441833496 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 (2694004) 2.36user 2.30system 0:06.47elapsed 72%CPU (0avgtext+0avgdata 159104maxresident)k 168inputs+7912outputs (4major+78620minor)pagefaults 0swaps