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 : 976020 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 (2772312) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2772312) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22529264 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2772312'] with mtr_portfolio_ids : ['22529264'] and first list_photo_ids : [] new path : /proc/976020/ Name: python3 Umask: 0002 State: R (running) Tgid: 976020 Ngid: 0 Pid: 976020 PPid: 976019 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 976020 NSpid: 976020 NSpgid: 975278 NSsid: 975278 VmPeak: 1107228 kB VmSize: 1107228 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99608 kB VmRSS: 99608 kB RssAnon: 60196 kB RssFile: 39412 kB RssShmem: 0 kB VmData: 865976 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 564 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: 49 nonvoluntary_ctxt_switches: 127 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '976020', 'Ngid': '0', 'Pid': '976020', 'PPid': '976019', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '976020', 'NSpid': '976020', 'NSpgid': '975278', 'NSsid': '975278', 'VmPeak': '1107228 kB', 'VmSize': '1107228 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99608 kB', 'VmRSS': '99608 kB', 'RssAnon': '60196 kB', 'RssFile': '39412 kB', 'RssShmem': '0 kB', 'VmData': '865976 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '564 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': '49', 'nonvoluntary_ctxt_switches': '127'} ('datou_batch_current', '976020', '1107228', '0', '1107228', '865976', '99608', b'', 'marlene', '2772312') 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 (22529264) 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 (2772312 ) ) 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 (22529264) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1354581445, 'portfolio_id': 22529264}, {'photo_id': 1354581397, 'portfolio_id': 22529264}, {'photo_id': 1354581364, 'portfolio_id': 22529264}, {'photo_id': 1354581340, 'portfolio_id': 22529264}, {'photo_id': 1354581145, 'portfolio_id': 22529264}, {'photo_id': 1354581117, 'portfolio_id': 22529264}, {'photo_id': 1354581093, 'portfolio_id': 22529264}, {'photo_id': 1354580887, 'portfolio_id': 22529264}, {'photo_id': 1354580884, 'portfolio_id': 22529264}, {'photo_id': 1354580881, 'portfolio_id': 22529264}, {'photo_id': 1354580878, 'portfolio_id': 22529264}, {'photo_id': 1354580833, 'portfolio_id': 22529264}, {'photo_id': 1354580808, 'portfolio_id': 22529264}, {'photo_id': 1354580782, 'portfolio_id': 22529264}, {'photo_id': 1354580755, 'portfolio_id': 22529264}, {'photo_id': 1354580471, 'portfolio_id': 22529264}, {'photo_id': 1354580435, 'portfolio_id': 22529264}, {'photo_id': 1354580406, 'portfolio_id': 22529264}, {'photo_id': 1354580378, 'portfolio_id': 22529264}, {'photo_id': 1354580352, 'portfolio_id': 22529264}, {'photo_id': 1354580001, 'portfolio_id': 22529264}, {'photo_id': 1354579972, 'portfolio_id': 22529264}, {'photo_id': 1354579949, 'portfolio_id': 22529264}, {'photo_id': 1354579700, 'portfolio_id': 22529264}, {'photo_id': 1354579698, 'portfolio_id': 22529264}, {'photo_id': 1354579696, 'portfolio_id': 22529264}, {'photo_id': 1354579669, 'portfolio_id': 22529264}, {'photo_id': 1354579665, 'portfolio_id': 22529264}, {'photo_id': 1354579662, 'portfolio_id': 22529264}, {'photo_id': 1354579622, 'portfolio_id': 22529264}, {'photo_id': 1354579619, 'portfolio_id': 22529264}, {'photo_id': 1354579614, 'portfolio_id': 22529264}, {'photo_id': 1354579611, 'portfolio_id': 22529264}, {'photo_id': 1354579583, 'portfolio_id': 22529264}, {'photo_id': 1354579557, 'portfolio_id': 22529264}, {'photo_id': 1354579554, 'portfolio_id': 22529264}, {'photo_id': 1354579551, 'portfolio_id': 22529264}, {'photo_id': 1354579547, 'portfolio_id': 22529264}, {'photo_id': 1354579523, 'portfolio_id': 22529264}, {'photo_id': 1354579520, 'portfolio_id': 22529264}, {'photo_id': 1354579518, 'portfolio_id': 22529264}, {'photo_id': 1354579516, 'portfolio_id': 22529264}] map_portfolio_id_photo_id: {22529264: [1354581445, 1354581397, 1354581364, 1354581340, 1354581145, 1354581117, 1354581093, 1354580887, 1354580884, 1354580881, 1354580878, 1354580833, 1354580808, 1354580782, 1354580755, 1354580471, 1354580435, 1354580406, 1354580378, 1354580352, 1354580001, 1354579972, 1354579949, 1354579700, 1354579698, 1354579696, 1354579669, 1354579665, 1354579662, 1354579622, 1354579619, 1354579614, 1354579611, 1354579583, 1354579557, 1354579554, 1354579551, 1354579547, 1354579523, 1354579520, 1354579518, 1354579516]} ##### 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.016391754150390625 #### 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 Apr 30 05:58:29 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 (22529264) 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 : 22529264 get user id for portfolio 22529264 get sub ptf for main ptf 22529264, type 3726 and hashtags ['metal', 'Carton_brun', 'Teint_Dans_La_Masse', 'papier', 'autre_refus', 'cartonnette', 'plastique', 'mal_croppe', 'kraft', 'Carton_gris', 'environnement', 'flou'] 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`=22529264 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','Carton_brun','Teint_Dans_La_Masse','papier','autre_refus','cartonnette','plastique','mal_croppe','kraft','Carton_gris','environnement','flou')) 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`=22529264 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','Carton_brun','Teint_Dans_La_Masse','papier','autre_refus','cartonnette','plastique','mal_croppe','kraft','Carton_gris','environnement','flou')) AND mptpi.`min_score`=0.5 To do returned map {'plastique': {'main_port_id': 22529264, 'sub_port_id': 22529292, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14965435, 'last_updated_at': datetime.datetime(2025, 4, 30, 5, 56, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 30, 5, 56, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 30, 5, 49, 27)}, 'cartonnette': {'main_port_id': 22529264, 'sub_port_id': 22529293, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14965436, 'last_updated_at': datetime.datetime(2025, 4, 30, 5, 56, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 30, 5, 56, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 30, 5, 49, 27)}, 'metal': {'main_port_id': 22529264, 'sub_port_id': 22529294, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14965437, 'last_updated_at': datetime.datetime(2025, 4, 30, 5, 56, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 30, 5, 56, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 30, 5, 49, 27)}, 'kraft': {'main_port_id': 22529264, 'sub_port_id': 22529295, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14965438, 'last_updated_at': datetime.datetime(2025, 4, 30, 5, 56, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 30, 5, 56, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 30, 5, 49, 27)}, 'environnement': {'main_port_id': 22529264, 'sub_port_id': 22529296, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14965439, 'last_updated_at': datetime.datetime(2025, 4, 30, 5, 56, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 30, 5, 56, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 30, 5, 49, 27)}, 'Carton_gris': {'main_port_id': 22529264, 'sub_port_id': 22529297, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14965440, 'last_updated_at': datetime.datetime(2025, 4, 30, 5, 56, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 30, 5, 56, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 30, 5, 49, 27)}, 'mal_croppe': {'main_port_id': 22529264, 'sub_port_id': 22529298, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14965441, 'last_updated_at': datetime.datetime(2025, 4, 30, 5, 56, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 30, 5, 56, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 30, 5, 49, 27)}, 'Teint_Dans_La_Masse': {'main_port_id': 22529264, 'sub_port_id': 22529299, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14965442, 'last_updated_at': datetime.datetime(2025, 4, 30, 5, 56, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 30, 5, 56, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 30, 5, 49, 27)}, 'Carton_brun': {'main_port_id': 22529264, 'sub_port_id': 22529300, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14965443, 'last_updated_at': datetime.datetime(2025, 4, 30, 5, 56, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 30, 5, 56, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 30, 5, 49, 27)}, 'autre_refus': {'main_port_id': 22529264, 'sub_port_id': 22529301, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14965444, 'last_updated_at': datetime.datetime(2025, 4, 30, 5, 56, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 30, 5, 56, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 30, 5, 49, 27)}, 'papier': {'main_port_id': 22529264, 'sub_port_id': 22529302, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14965445, 'last_updated_at': datetime.datetime(2025, 4, 30, 5, 56, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 30, 5, 56, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 30, 5, 49, 27)}, 'flou': {'main_port_id': 22529264, 'sub_port_id': 22529303, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14965446, 'last_updated_at': datetime.datetime(2025, 4, 30, 5, 56, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 30, 5, 56, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 30, 5, 49, 27)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22529292 , 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=22529264 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 (22529292) result : ((1354579646,), (1354579647,), (1354579648,), (1354580941,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22529264) result : ((1354579516,), (1354579518,), (1354579520,), (1354579523,), (1354579547,), (1354579551,), (1354579554,), (1354579557,), (1354579583,), (1354579611,), (1354579614,), (1354579619,), (1354579622,), (1354579662,), (1354579665,), (1354579669,), (1354579696,), (1354579698,), (1354579700,), (1354579949,), (1354579972,), (1354580001,), (1354580352,), (1354580378,), (1354580406,), (1354580435,), (1354580471,), (1354580755,), (1354580782,), (1354580808,), (1354580833,), (1354580878,), (1354580881,), (1354580884,), (1354580887,), (1354581093,), (1354581117,), (1354581145,), (1354581340,), (1354581364,), (1354581397,), (1354581445,)) 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 (1354579700) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22529293 , 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=22529264 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 (22529293) result : ((1354579639,), (1354580928,), (1354581303,), (1354581304,), (1354581305,), (1354581774,), (1354581775,), (1354581776,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22529264) result : ((1354579516,), (1354579518,), (1354579520,), (1354579523,), (1354579547,), (1354579551,), (1354579554,), (1354579557,), (1354579583,), (1354579611,), (1354579614,), (1354579619,), (1354579622,), (1354579662,), (1354579665,), (1354579669,), (1354579696,), (1354579698,), (1354579700,), (1354579949,), (1354579972,), (1354580001,), (1354580352,), (1354580378,), (1354580406,), (1354580435,), (1354580471,), (1354580755,), (1354580782,), (1354580808,), (1354580833,), (1354580878,), (1354580881,), (1354580884,), (1354580887,), (1354581093,), (1354581117,), (1354581145,), (1354581340,), (1354581364,), (1354581397,), (1354581445,)) 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 (1354579700) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22529294 , 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=22529264 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 (22529294) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22529264) result : ((1354579516,), (1354579518,), (1354579520,), (1354579523,), (1354579547,), (1354579551,), (1354579554,), (1354579557,), (1354579583,), (1354579611,), (1354579614,), (1354579619,), (1354579622,), (1354579662,), (1354579665,), (1354579669,), (1354579696,), (1354579698,), (1354579700,), (1354579949,), (1354579972,), (1354580001,), (1354580352,), (1354580378,), (1354580406,), (1354580435,), (1354580471,), (1354580755,), (1354580782,), (1354580808,), (1354580833,), (1354580878,), (1354580881,), (1354580884,), (1354580887,), (1354581093,), (1354581117,), (1354581145,), (1354581340,), (1354581364,), (1354581397,), (1354581445,)) 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 (1354579700) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22529295 , 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=22529264 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 (22529295) result : ((1354579649,), (1354579650,), (1354580947,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22529264) result : ((1354579516,), (1354579518,), (1354579520,), (1354579523,), (1354579547,), (1354579551,), (1354579554,), (1354579557,), (1354579583,), (1354579611,), (1354579614,), (1354579619,), (1354579622,), (1354579662,), (1354579665,), (1354579669,), (1354579696,), (1354579698,), (1354579700,), (1354579949,), (1354579972,), (1354580001,), (1354580352,), (1354580378,), (1354580406,), (1354580435,), (1354580471,), (1354580755,), (1354580782,), (1354580808,), (1354580833,), (1354580878,), (1354580881,), (1354580884,), (1354580887,), (1354581093,), (1354581117,), (1354581145,), (1354581340,), (1354581364,), (1354581397,), (1354581445,)) 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 (1354579700) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22529296 , 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=22529264 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 (22529296) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22529264) result : ((1354579516,), (1354579518,), (1354579520,), (1354579523,), (1354579547,), (1354579551,), (1354579554,), (1354579557,), (1354579583,), (1354579611,), (1354579614,), (1354579619,), (1354579622,), (1354579662,), (1354579665,), (1354579669,), (1354579696,), (1354579698,), (1354579700,), (1354579949,), (1354579972,), (1354580001,), (1354580352,), (1354580378,), (1354580406,), (1354580435,), (1354580471,), (1354580755,), (1354580782,), (1354580808,), (1354580833,), (1354580878,), (1354580881,), (1354580884,), (1354580887,), (1354581093,), (1354581117,), (1354581145,), (1354581340,), (1354581364,), (1354581397,), (1354581445,)) 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 (1354579700) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22529297 , 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=22529264 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 (22529297) result : ((1354579637,), (1354579638,), (1354579671,), (1354579672,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22529264) result : ((1354579516,), (1354579518,), (1354579520,), (1354579523,), (1354579547,), (1354579551,), (1354579554,), (1354579557,), (1354579583,), (1354579611,), (1354579614,), (1354579619,), (1354579622,), (1354579662,), (1354579665,), (1354579669,), (1354579696,), (1354579698,), (1354579700,), (1354579949,), (1354579972,), (1354580001,), (1354580352,), (1354580378,), (1354580406,), (1354580435,), (1354580471,), (1354580755,), (1354580782,), (1354580808,), (1354580833,), (1354580878,), (1354580881,), (1354580884,), (1354580887,), (1354581093,), (1354581117,), (1354581145,), (1354581340,), (1354581364,), (1354581397,), (1354581445,)) 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 (1354579700) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22529298 , 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=22529264 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 (22529298) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22529264) result : ((1354579516,), (1354579518,), (1354579520,), (1354579523,), (1354579547,), (1354579551,), (1354579554,), (1354579557,), (1354579583,), (1354579611,), (1354579614,), (1354579619,), (1354579622,), (1354579662,), (1354579665,), (1354579669,), (1354579696,), (1354579698,), (1354579700,), (1354579949,), (1354579972,), (1354580001,), (1354580352,), (1354580378,), (1354580406,), (1354580435,), (1354580471,), (1354580755,), (1354580782,), (1354580808,), (1354580833,), (1354580878,), (1354580881,), (1354580884,), (1354580887,), (1354581093,), (1354581117,), (1354581145,), (1354581340,), (1354581364,), (1354581397,), (1354581445,)) 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 (1354579700) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22529299 , 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=22529264 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 (22529299) result : ((1354579631,), (1354579632,), (1354579633,), (1354579634,), (1354579666,), (1354579667,), (1354579668,), (1354581295,), (1354581767,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22529264) result : ((1354579516,), (1354579518,), (1354579520,), (1354579523,), (1354579547,), (1354579551,), (1354579554,), (1354579557,), (1354579583,), (1354579611,), (1354579614,), (1354579619,), (1354579622,), (1354579662,), (1354579665,), (1354579669,), (1354579696,), (1354579698,), (1354579700,), (1354579949,), (1354579972,), (1354580001,), (1354580352,), (1354580378,), (1354580406,), (1354580435,), (1354580471,), (1354580755,), (1354580782,), (1354580808,), (1354580833,), (1354580878,), (1354580881,), (1354580884,), (1354580887,), (1354581093,), (1354581117,), (1354581145,), (1354581340,), (1354581364,), (1354581397,), (1354581445,)) 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 (1354579700) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22529300 , 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=22529264 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 (22529300) result : ((1354579641,), (1354579642,), (1354579643,), (1354579644,), (1354579673,), (1354581315,), (1354581316,), (1354581317,), (1354581778,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22529264) result : ((1354579516,), (1354579518,), (1354579520,), (1354579523,), (1354579547,), (1354579551,), (1354579554,), (1354579557,), (1354579583,), (1354579611,), (1354579614,), (1354579619,), (1354579622,), (1354579662,), (1354579665,), (1354579669,), (1354579696,), (1354579698,), (1354579700,), (1354579949,), (1354579972,), (1354580001,), (1354580352,), (1354580378,), (1354580406,), (1354580435,), (1354580471,), (1354580755,), (1354580782,), (1354580808,), (1354580833,), (1354580878,), (1354580881,), (1354580884,), (1354580887,), (1354581093,), (1354581117,), (1354581145,), (1354581340,), (1354581364,), (1354581397,), (1354581445,)) 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 (1354579700) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22529301 , 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=22529264 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 (22529301) result : ((1354579636,), (1354579670,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22529264) result : ((1354579516,), (1354579518,), (1354579520,), (1354579523,), (1354579547,), (1354579551,), (1354579554,), (1354579557,), (1354579583,), (1354579611,), (1354579614,), (1354579619,), (1354579622,), (1354579662,), (1354579665,), (1354579669,), (1354579696,), (1354579698,), (1354579700,), (1354579949,), (1354579972,), (1354580001,), (1354580352,), (1354580378,), (1354580406,), (1354580435,), (1354580471,), (1354580755,), (1354580782,), (1354580808,), (1354580833,), (1354580878,), (1354580881,), (1354580884,), (1354580887,), (1354581093,), (1354581117,), (1354581145,), (1354581340,), (1354581364,), (1354581397,), (1354581445,)) 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 (1354579700) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22529302 , 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=22529264 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 (22529302) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22529264) result : ((1354579516,), (1354579518,), (1354579520,), (1354579523,), (1354579547,), (1354579551,), (1354579554,), (1354579557,), (1354579583,), (1354579611,), (1354579614,), (1354579619,), (1354579622,), (1354579662,), (1354579665,), (1354579669,), (1354579696,), (1354579698,), (1354579700,), (1354579949,), (1354579972,), (1354580001,), (1354580352,), (1354580378,), (1354580406,), (1354580435,), (1354580471,), (1354580755,), (1354580782,), (1354580808,), (1354580833,), (1354580878,), (1354580881,), (1354580884,), (1354580887,), (1354581093,), (1354581117,), (1354581145,), (1354581340,), (1354581364,), (1354581397,), (1354581445,)) 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 (1354579700) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22529303 , 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=22529264 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 (22529303) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22529264) result : ((1354579516,), (1354579518,), (1354579520,), (1354579523,), (1354579547,), (1354579551,), (1354579554,), (1354579557,), (1354579583,), (1354579611,), (1354579614,), (1354579619,), (1354579622,), (1354579662,), (1354579665,), (1354579669,), (1354579696,), (1354579698,), (1354579700,), (1354579949,), (1354579972,), (1354580001,), (1354580352,), (1354580378,), (1354580406,), (1354580435,), (1354580471,), (1354580755,), (1354580782,), (1354580808,), (1354580833,), (1354580878,), (1354580881,), (1354580884,), (1354580887,), (1354581093,), (1354581117,), (1354581145,), (1354581340,), (1354581364,), (1354581397,), (1354581445,)) 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 (1354579700) and cspi.crop_hashtag_id = chi.id; To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=22529264 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','Carton_brun','Teint_Dans_La_Masse','papier','autre_refus','cartonnette','plastique','mal_croppe','kraft','Carton_gris','environnement','flou')) 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`=22529264 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','Carton_brun','Teint_Dans_La_Masse','papier','autre_refus','cartonnette','plastique','mal_croppe','kraft','Carton_gris','environnement','flou')) AND mptpi.`min_score`=0.5 To do returned map {'plastique': {'main_port_id': 22529264, 'sub_port_id': 22529304, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14965447, 'last_updated_at': datetime.datetime(2025, 4, 30, 5, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 30, 5, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 30, 5, 49, 29)}, 'cartonnette': {'main_port_id': 22529264, 'sub_port_id': 22529305, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14965448, 'last_updated_at': datetime.datetime(2025, 4, 30, 5, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 30, 5, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 30, 5, 49, 29)}, 'metal': {'main_port_id': 22529264, 'sub_port_id': 22529306, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14965449, 'last_updated_at': datetime.datetime(2025, 4, 30, 5, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 30, 5, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 30, 5, 49, 29)}, 'kraft': {'main_port_id': 22529264, 'sub_port_id': 22529307, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14965450, 'last_updated_at': datetime.datetime(2025, 4, 30, 5, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 30, 5, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 30, 5, 49, 29)}, 'environnement': {'main_port_id': 22529264, 'sub_port_id': 22529308, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14965451, 'last_updated_at': datetime.datetime(2025, 4, 30, 5, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 30, 5, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 30, 5, 49, 29)}, 'Carton_gris': {'main_port_id': 22529264, 'sub_port_id': 22529309, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14965452, 'last_updated_at': datetime.datetime(2025, 4, 30, 5, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 30, 5, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 30, 5, 49, 29)}, 'mal_croppe': {'main_port_id': 22529264, 'sub_port_id': 22529310, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14965453, 'last_updated_at': datetime.datetime(2025, 4, 30, 5, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 30, 5, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 30, 5, 49, 29)}, 'Teint_Dans_La_Masse': {'main_port_id': 22529264, 'sub_port_id': 22529311, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14965454, 'last_updated_at': datetime.datetime(2025, 4, 30, 5, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 30, 5, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 30, 5, 49, 29)}, 'Carton_brun': {'main_port_id': 22529264, 'sub_port_id': 22529312, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14965455, 'last_updated_at': datetime.datetime(2025, 4, 30, 5, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 30, 5, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 30, 5, 49, 29)}, 'autre_refus': {'main_port_id': 22529264, 'sub_port_id': 22529313, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14965456, 'last_updated_at': datetime.datetime(2025, 4, 30, 5, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 30, 5, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 30, 5, 49, 29)}, 'papier': {'main_port_id': 22529264, 'sub_port_id': 22529314, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14965457, 'last_updated_at': datetime.datetime(2025, 4, 30, 5, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 30, 5, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 30, 5, 49, 29)}, 'flou': {'main_port_id': 22529264, 'sub_port_id': 22529315, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14965458, 'last_updated_at': datetime.datetime(2025, 4, 30, 5, 56, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 30, 5, 56, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 30, 5, 49, 29)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22529304,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22529292 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22529305,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22529293 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22529306,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22529294 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22529307,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22529295 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22529308,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22529296 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22529309,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22529297 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22529310,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22529298 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22529311,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22529299 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22529312,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22529300 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22529313,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22529301 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22529314,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22529302 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22529315,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22529303 lien utilise dans velours : https://www.fotonower.com/velours/22529304,22529305,22529306,22529307,22529308,22529309,22529310,22529311,22529312,22529313,22529314,22529315?tags=plastique,cartonnette,metal,kraft,environnement,Carton_gris,mal_croppe,Teint_Dans_La_Masse,Carton_brun,autre_refus,papier,flou After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22529264]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1354581445, 1354581397, 1354581364, 1354581340] map_info['map_portfolio_photo'] : {22529264: [1354581445, 1354581397, 1354581364, 1354581340, 1354581145, 1354581117, 1354581093, 1354580887, 1354580884, 1354580881, 1354580878, 1354580833, 1354580808, 1354580782, 1354580755, 1354580471, 1354580435, 1354580406, 1354580378, 1354580352, 1354580001, 1354579972, 1354579949, 1354579700, 1354579698, 1354579696, 1354579669, 1354579665, 1354579662, 1354579622, 1354579619, 1354579614, 1354579611, 1354579583, 1354579557, 1354579554, 1354579551, 1354579547, 1354579523, 1354579520, 1354579518, 1354579516]} final : False mtd_id 4302 list_pids : [1354581445, 1354581397, 1354581364, 1354581340] Looping around the photos to save general results len do output : 1 /22529264. 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, '2772312') ('4302', '22529264', '1354581445', None, None, None, None, None, '2772312') ('4302', None, None, None, None, None, None, None, '2772312') ('4302', '22529264', '1354581397', None, None, None, None, None, '2772312') ('4302', None, None, None, None, None, None, None, '2772312') ('4302', '22529264', '1354581364', None, None, None, None, None, '2772312') ('4302', None, None, None, None, None, None, None, '2772312') ('4302', '22529264', '1354581340', None, None, None, None, None, '2772312') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 5 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, '22529264', "{'plastique': 22529292, 'cartonnette': 22529293, 'metal': 22529294, 'kraft': 22529295, 'environnement': 22529296, 'Carton_gris': 22529297, 'mal_croppe': 22529298, 'Teint_Dans_La_Masse': 22529299, 'Carton_brun': 22529300, 'autre_refus': 22529301, 'papier': 22529302, 'flou': 22529303}", None, None, None, None, '2772312'), ('4302', '22529264', '1354581445', None, None, None, None, None, '2772312'), ('4302', '22529264', '1354581397', None, None, None, None, None, '2772312'), ('4302', '22529264', '1354581364', None, None, None, None, None, '2772312'), ('4302', '22529264', '1354581340', None, None, None, None, None, '2772312')] time used for this insertion : 0.011851072311401367 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.44515156745910645 time spend to save output : 0.01209712028503418 total time spend for step 1 : 0.4572486877441406 step2:final Wed Apr 30 05:58:29 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 (22529264) 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 22529264 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1354579523,1354579520,1354579518,1354579516,1354579557,1354579554,1354579551,1354579547,1354579583,1354579622,1354579619,1354579614,1354579611,1354579669,1354579665,1354579662,1354579700,1354579698,1354579696,1354580001,1354579972,1354579949,1354580471,1354580435,1354580406,1354580378,1354580352,1354580833,1354580808,1354580782,1354580755,1354580887,1354580884,1354580881,1354580878,1354581145,1354581117,1354581093,1354581445,1354581397,1354581364,1354581340); insert ignore into MTRUser.portfolio_carac_ratio (portfolio_id, hashtag_type, hashtag_id, value) values (%s,%s,%s,%s) on DUPLICATE KEY UPDATE value=VALUES(value) After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22529264]) Inside saveOutput : final : False verbose : True original output for save of step final : {1354581445: ('0.06960849167071538',), 1354581397: ('0.06960849167071538',), 1354581364: ('0.06960849167071538',), 1354581340: ('0.06960849167071538',)} new output for save of step final : {1354581445: ('0.06960849167071538',), 1354581397: ('0.06960849167071538',), 1354581364: ('0.06960849167071538',), 1354581340: ('0.06960849167071538',)} [1354581445, 1354581397, 1354581364, 1354581340] map_info['map_portfolio_photo'] : {22529264: [1354581445, 1354581397, 1354581364, 1354581340, 1354581145, 1354581117, 1354581093, 1354580887, 1354580884, 1354580881, 1354580878, 1354580833, 1354580808, 1354580782, 1354580755, 1354580471, 1354580435, 1354580406, 1354580378, 1354580352, 1354580001, 1354579972, 1354579949, 1354579700, 1354579698, 1354579696, 1354579669, 1354579665, 1354579662, 1354579622, 1354579619, 1354579614, 1354579611, 1354579583, 1354579557, 1354579554, 1354579551, 1354579547, 1354579523, 1354579520, 1354579518, 1354579516]} final : False mtd_id 4302 list_pids : [1354581445, 1354581397, 1354581364, 1354581340] Looping around the photos to save general results len do output : 4 /1354581445.Didn't retrieve data . /1354581397.Didn't retrieve data . /1354581364.Didn't retrieve data . /1354581340.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, '2772312') ('4302', '22529264', '1354581445', None, None, None, None, None, '2772312') ('4302', None, None, None, None, None, None, None, '2772312') ('4302', '22529264', '1354581397', None, None, None, None, None, '2772312') ('4302', None, None, None, None, None, None, None, '2772312') ('4302', '22529264', '1354581364', None, None, None, None, None, '2772312') ('4302', None, None, None, None, None, None, None, '2772312') ('4302', '22529264', '1354581340', None, None, None, None, None, '2772312') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 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', '22529264', '1354581445', '0.06960849167071538', None, None, None, None, '2772312'), ('4302', '22529264', '1354581397', '0.06960849167071538', None, None, None, None, '2772312'), ('4302', '22529264', '1354581364', '0.06960849167071538', None, None, None, None, '2772312'), ('4302', '22529264', '1354581340', '0.06960849167071538', None, None, None, None, '2772312')] time used for this insertion : 0.012830734252929688 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06587457656860352 time spend to save output : 0.013092279434204102 total time spend for step 2 : 0.07896685600280762 step3:velours_tree Wed Apr 30 05:58:29 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 : {22529264: [{'plastique': 22529292, 'cartonnette': 22529293, 'metal': 22529294, 'kraft': 22529295, 'environnement': 22529296, 'Carton_gris': 22529297, 'mal_croppe': 22529298, 'Teint_Dans_La_Masse': 22529299, 'Carton_brun': 22529300, 'autre_refus': 22529301, 'papier': 22529302, 'flou': 22529303}]} input_args_next_step : {22529264: ()} output_args : {22529264: [{'plastique': 22529292, 'cartonnette': 22529293, 'metal': 22529294, 'kraft': 22529295, 'environnement': 22529296, 'Carton_gris': 22529297, 'mal_croppe': 22529298, 'Teint_Dans_La_Masse': 22529299, 'Carton_brun': 22529300, 'autre_refus': 22529301, 'papier': 22529302, 'flou': 22529303}]} args : 22529264 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'plastique': 22529292, 'cartonnette': 22529293, 'metal': 22529294, 'kraft': 22529295, 'environnement': 22529296, 'Carton_gris': 22529297, 'mal_croppe': 22529298, 'Teint_Dans_La_Masse': 22529299, 'Carton_brun': 22529300, 'autre_refus': 22529301, 'papier': 22529302, 'flou': 22529303},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22529264) 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([22529264]) 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.274578332901001 time spend to save output : 5.364418029785156e-05 total time spend for step 3 : 0.27463197708129883 step4:send_mail_cod Wed Apr 30 05:58:30 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 : {1354581445: ('0.06960849167071538',), 1354581397: ('0.06960849167071538',), 1354581364: ('0.06960849167071538',), 1354581340: ('0.06960849167071538',)} input_args_next_step : {1354581445: ()} output_args : {1354581445: ('0.06960849167071538',), 1354581397: ('0.06960849167071538',), 1354581364: ('0.06960849167071538',), 1354581340: ('0.06960849167071538',)} args : 1354581445 depend.output_id : 0 input_args_next_step : {1354581445: ('0.06960849167071538',), 1354581397: ()} output_args : {1354581445: ('0.06960849167071538',), 1354581397: ('0.06960849167071538',), 1354581364: ('0.06960849167071538',), 1354581340: ('0.06960849167071538',)} args : 1354581397 depend.output_id : 0 input_args_next_step : {1354581445: ('0.06960849167071538',), 1354581397: ('0.06960849167071538',), 1354581364: ()} output_args : {1354581445: ('0.06960849167071538',), 1354581397: ('0.06960849167071538',), 1354581364: ('0.06960849167071538',), 1354581340: ('0.06960849167071538',)} args : 1354581364 depend.output_id : 0 input_args_next_step : {1354581445: ('0.06960849167071538',), 1354581397: ('0.06960849167071538',), 1354581364: ('0.06960849167071538',), 1354581340: ()} output_args : {1354581445: ('0.06960849167071538',), 1354581397: ('0.06960849167071538',), 1354581364: ('0.06960849167071538',), 1354581340: ('0.06960849167071538',)} args : 1354581340 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 : {22529264: [{'plastique': 22529292, 'cartonnette': 22529293, 'metal': 22529294, 'kraft': 22529295, 'environnement': 22529296, 'Carton_gris': 22529297, 'mal_croppe': 22529298, 'Teint_Dans_La_Masse': 22529299, 'Carton_brun': 22529300, 'autre_refus': 22529301, 'papier': 22529302, 'flou': 22529303}]} input_args_next_step : {1354581445: ('0.06960849167071538',), 1354581397: ('0.06960849167071538',), 1354581364: ('0.06960849167071538',), 1354581340: ('0.06960849167071538',), 22529264: ()} output_args : {22529264: [{'plastique': 22529292, 'cartonnette': 22529293, 'metal': 22529294, 'kraft': 22529295, 'environnement': 22529296, 'Carton_gris': 22529297, 'mal_croppe': 22529298, 'Teint_Dans_La_Masse': 22529299, 'Carton_brun': 22529300, 'autre_refus': 22529301, 'papier': 22529302, 'flou': 22529303}]} args : 22529264 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 :5, first value : ('0.06960849167071538',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22529264) 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 (1354581445,1354581397,1354581364,1354581340) Found this number of photos: 4 ##### Call download_photos : nb_thread : 5 begin to download photo : 1354581340 begin to download photo : 1354581364 begin to download photo : 1354581397 begin to download photo : 1354581445 download finish for photo 1354581364 download finish for photo 1354581445 download finish for photo 1354581397 download finish for photo 1354581340 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos length of list_filenames : 4 ; length of list_pids : 4 ; length of list_args : 4 results_Auto_P22529264_30-04-2025_05_58_30.pdf 22529292 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=22529292 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1354579646: '1745984942_708850_1354579583_0fe12f7826e14a27a50f82ec6ebeb495_rle_crop_3775024648_0.png', 1354579647: '1745984942_708850_1354579551_fbcdb23bae812ac0f0113d730ff27918_rle_crop_3775024681_0.png', 1354579648: '1745984942_708850_1354579547_2f81fe75d41a5b448ab2d62ab4bb24e7_rle_crop_3775024694_0.png', 1354580941: '1745985312_711759_1354580471_112f3f3fcb9e597480ab033441a67e95_rle_crop_3775025181_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/c8f2009eb5ee2c0ee539582271b6d8f3_13767871.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/03bc0fa6cfb6d2882d1aefaf30c90dbe_51146976.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/c2dc26770e1bcdf8540c98a92287b48e_8248390.png change filename to text .imagette225292921745985510/ imagette225292921745985510/1745984942_708850_1354579551_fbcdb23bae812ac0f0113d730ff27918_rle_crop_3775024681_0.png.png imagette225292921745985510/1745984942_708850_1354579547_2f81fe75d41a5b448ab2d62ab4bb24e7_rle_crop_3775024694_0.png.png imagette225292921745985510/1745984942_708850_1354579583_0fe12f7826e14a27a50f82ec6ebeb495_rle_crop_3775024648_0.png.png imagette225292921745985510/1745985312_711759_1354580471_112f3f3fcb9e597480ab033441a67e95_rle_crop_3775025181_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/ba5ef034adc0ff23d82892aefc7c81cb_16800020.png imagette225292921745985510 22529293 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=22529293 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1354579639: '1745984942_708850_1354579547_2f81fe75d41a5b448ab2d62ab4bb24e7_rle_crop_3775024688_0.png', 1354580928: '1745985312_711759_1354579949_525c41b83d7aa1d24726861648880b5d_rle_crop_3775025205_0.png', 1354581303: '1745985373_712271_1354580833_e47998ae6dd9302827294efcc1e371e6_rle_crop_3775030126_0.png', 1354581304: '1745985373_712271_1354580406_cba256f5c3dac11afea03c5d140aa4f9_rle_crop_3775032148_0.png', 1354581305: '1745985373_712271_1354580378_f4e0fcd334279e4a9372e9588b6d668c_rle_crop_3775032158_0.png', 1354581774: '1745985461_1344270_1354581145_7910b8ae73a352d09677248caf0a73e6_rle_crop_3775045202_0.png', 1354581775: '1745985461_1344270_1354580884_834233d32a6418e5158e1e543b7225e6_rle_crop_3775045213_0.png', 1354581776: '1745985461_1344270_1354580884_834233d32a6418e5158e1e543b7225e6_rle_crop_3775045212_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/bdc7ecc558429ecc68e7472796067f7f_40974741.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/fa8651a6cbb472ff67394653064a7245_12310064.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/db38b9257a430a83f1e6882a02e74a94_27367714.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/b02e092e1bf3374bd2286d4a6863906e_63027211.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/88221afc5cb78a9aec32cecbb826b806_96643876.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/38b8041f0953a2e57e11efb2aeb6f7be_37937515.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/cb30fbd8e5e1b4e2429308279faf7d2c_80854301.png change filename to text .imagette225292931745985510/ imagette225292931745985510/1745985312_711759_1354579949_525c41b83d7aa1d24726861648880b5d_rle_crop_3775025205_0.png.png imagette225292931745985510/1745985373_712271_1354580833_e47998ae6dd9302827294efcc1e371e6_rle_crop_3775030126_0.png.png imagette225292931745985510/1745984942_708850_1354579547_2f81fe75d41a5b448ab2d62ab4bb24e7_rle_crop_3775024688_0.png.png imagette225292931745985510/1745985461_1344270_1354580884_834233d32a6418e5158e1e543b7225e6_rle_crop_3775045212_0.png.png imagette225292931745985510/1745985373_712271_1354580406_cba256f5c3dac11afea03c5d140aa4f9_rle_crop_3775032148_0.png.png imagette225292931745985510/1745985461_1344270_1354581145_7910b8ae73a352d09677248caf0a73e6_rle_crop_3775045202_0.png.png imagette225292931745985510/1745985373_712271_1354580378_f4e0fcd334279e4a9372e9588b6d668c_rle_crop_3775032158_0.png.png imagette225292931745985510/1745985461_1344270_1354580884_834233d32a6418e5158e1e543b7225e6_rle_crop_3775045213_0.png.png imagette225292941745985510/ wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/049f91a3eb3c4fbab3e2d543c7f738e1_67180999.png imagette225292931745985510 22529294 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=22529294 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette225292941745985510 22529295 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=22529295 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1354579649: '1745984942_708850_1354579551_fbcdb23bae812ac0f0113d730ff27918_rle_crop_3775024676_0.png', 1354579650: '1745984942_708850_1354579547_2f81fe75d41a5b448ab2d62ab4bb24e7_rle_crop_3775024693_0.png', 1354580947: '1745985312_711759_1354579972_98d4fbda9d7190d64580db5f362420ab_rle_crop_3775025192_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/0496ffbb884ec00c1a713b9d42f525f3_36223321.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/ddf17e1d033664167c636f43bd00d81d_84870715.png change filename to text .imagette225292951745985510/ imagette225292951745985510/1745984942_708850_1354579551_fbcdb23bae812ac0f0113d730ff27918_rle_crop_3775024676_0.png.png imagette225292951745985510/1745985312_711759_1354579972_98d4fbda9d7190d64580db5f362420ab_rle_crop_3775025192_0.png.png imagette225292951745985510/1745984942_708850_1354579547_2f81fe75d41a5b448ab2d62ab4bb24e7_rle_crop_3775024693_0.png.png imagette225292981745985511/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/56ee7ead375ce90db87cb9b1672bb91f_39180252.png imagette225292951745985510 22529298 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=22529298 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette225292981745985511 22529301 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=22529301 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1354579636: '1745984942_708850_1354579551_fbcdb23bae812ac0f0113d730ff27918_rle_crop_3775024671_0.png', 1354579670: '1745984982_1336807_1354579516_9e466f0e00669f3a10f413946f58ed1f_rle_crop_3775024874_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/e63189b948b9697a65ba89d21bf7d581_35481993.png change filename to text .imagette225293011745985511/ imagette225293011745985511/1745984942_708850_1354579551_fbcdb23bae812ac0f0113d730ff27918_rle_crop_3775024671_0.png.png imagette225293011745985511/1745984982_1336807_1354579516_9e466f0e00669f3a10f413946f58ed1f_rle_crop_3775024874_0.png.png imagette225293031745985511/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/4bd2b64349ee9c5ceb795e32de9b159a_84416682.png imagette225293011745985511 22529303 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=22529303 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette225293031745985511 22529297 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=22529297 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1354579637: '1745984942_708850_1354579554_d99edf4a14c3640293e156860859d56a_rle_crop_3775024652_0.png', 1354579638: '1745984942_708850_1354579551_fbcdb23bae812ac0f0113d730ff27918_rle_crop_3775024669_0.png', 1354579671: '1745984982_1336807_1354579557_e8cc180f9f836657bb3d4ffad8eb7856_rle_crop_3775024829_0.png', 1354579672: '1745984982_1336807_1354579516_9e466f0e00669f3a10f413946f58ed1f_rle_crop_3775024875_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/579b8def7cb06c059176c6357667957a_25065053.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/696babcc8e19a9c609fa52ccb20ef5b6_26480262.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/dcb672e8034ab4a303219dbf6634e5fd_55046183.png change filename to text .imagette225292971745985511/ imagette225292971745985511/1745984982_1336807_1354579557_e8cc180f9f836657bb3d4ffad8eb7856_rle_crop_3775024829_0.png.png imagette225292971745985511/1745984942_708850_1354579551_fbcdb23bae812ac0f0113d730ff27918_rle_crop_3775024669_0.png.png imagette225292971745985511/1745984942_708850_1354579554_d99edf4a14c3640293e156860859d56a_rle_crop_3775024652_0.png.png imagette225292971745985511/1745984982_1336807_1354579516_9e466f0e00669f3a10f413946f58ed1f_rle_crop_3775024875_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/0025b037d61ee047f3d26e079b157165_62412358.png imagette225292971745985511 22529299 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=22529299 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1354579631: '1745984942_708850_1354579583_0fe12f7826e14a27a50f82ec6ebeb495_rle_crop_3775024644_0.png', 1354579632: '1745984942_708850_1354579583_0fe12f7826e14a27a50f82ec6ebeb495_rle_crop_3775024645_0.png', 1354579633: '1745984942_708850_1354579554_d99edf4a14c3640293e156860859d56a_rle_crop_3775024659_0.png', 1354579634: '1745984942_708850_1354579551_fbcdb23bae812ac0f0113d730ff27918_rle_crop_3775024680_0.png', 1354579666: '1745984982_1336807_1354579557_e8cc180f9f836657bb3d4ffad8eb7856_rle_crop_3775024830_0.png', 1354579667: '1745984982_1336807_1354579557_e8cc180f9f836657bb3d4ffad8eb7856_rle_crop_3775024831_0.png', 1354579668: '1745984982_1336807_1354579523_022ea6edd552275a9b7bdbc91a32c0c1_rle_crop_3775024842_0.png', 1354581295: '1745985373_712271_1354580435_f35f694b259e13acde11fe30c9116680_rle_crop_3775030139_0.png', 1354581767: '1745985461_1344270_1354580884_834233d32a6418e5158e1e543b7225e6_rle_crop_3775045217_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/d2368fce82df56fb628bbddb66e32b01_448460.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/0bb48cc50c985ab07373fa4c606aa76e_23449706.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/43cc5fcbea2e3f0f2c93e0b436dd2f85_64008822.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/32e8e48118cbb2c484932f310d53501a_6845830.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/f3f03d2bfa0a005a018f5ecfd33b20de_16977775.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/35bb4eaec351e1503e69aa4c3b55ef3b_76461800.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/a6c60111edf192f1377a3bba1aab5a0e_38628514.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/99806282395d59466577f68190c84d46_69413430.png change filename to text .imagette225292991745985511/ imagette225292991745985511/1745984982_1336807_1354579557_e8cc180f9f836657bb3d4ffad8eb7856_rle_crop_3775024830_0.png.png imagette225292991745985511/1745984942_708850_1354579551_fbcdb23bae812ac0f0113d730ff27918_rle_crop_3775024680_0.png.png imagette225292991745985511/1745985461_1344270_1354580884_834233d32a6418e5158e1e543b7225e6_rle_crop_3775045217_0.png.png imagette225292991745985511/1745984982_1336807_1354579523_022ea6edd552275a9b7bdbc91a32c0c1_rle_crop_3775024842_0.png.png imagette225292991745985511/1745984982_1336807_1354579557_e8cc180f9f836657bb3d4ffad8eb7856_rle_crop_3775024831_0.png.png imagette225292991745985511/1745984942_708850_1354579583_0fe12f7826e14a27a50f82ec6ebeb495_rle_crop_3775024645_0.png.png imagette225292991745985511/1745984942_708850_1354579554_d99edf4a14c3640293e156860859d56a_rle_crop_3775024659_0.png.png imagette225292991745985511/1745984942_708850_1354579583_0fe12f7826e14a27a50f82ec6ebeb495_rle_crop_3775024644_0.png.png imagette225292991745985511/1745985373_712271_1354580435_f35f694b259e13acde11fe30c9116680_rle_crop_3775030139_0.png.png wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/15771758ed08f447f0061b5fbec44839_42598873.png imagette225292991745985511 22529300 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=22529300 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1354579641: '1745984942_708850_1354579583_0fe12f7826e14a27a50f82ec6ebeb495_rle_crop_3775024641_0.png', 1354579642: '1745984942_708850_1354579554_d99edf4a14c3640293e156860859d56a_rle_crop_3775024664_0.png', 1354579643: '1745984942_708850_1354579554_d99edf4a14c3640293e156860859d56a_rle_crop_3775024660_0.png', 1354579644: '1745984942_708850_1354579551_fbcdb23bae812ac0f0113d730ff27918_rle_crop_3775024678_0.png', 1354579673: '1745984982_1336807_1354579520_3ba9dc479770b177f811a17c975f88df_rle_crop_3775024848_0.png', 1354581315: '1745985373_712271_1354580435_f35f694b259e13acde11fe30c9116680_rle_crop_3775030135_0.png', 1354581316: '1745985373_712271_1354580435_f35f694b259e13acde11fe30c9116680_rle_crop_3775030140_0.png', 1354581317: '1745985373_712271_1354580406_cba256f5c3dac11afea03c5d140aa4f9_rle_crop_3775032154_0.png', 1354581778: '1745985461_1344270_1354580878_6a53d0b4b42b099c809f082a8eb0f504_rle_crop_3775045239_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/097bdb4d226b52702e026656c6d3a75a_19608870.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/55f0aaf7dfe196a98ad3b27970d63e7b_32932845.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/f35a4f8835dc6f97939c28559b84006e_98588552.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/7d219ef05c22bc706b187efc3262b723_16725862.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/09a0535926ad24ba5a9c10199225ffe0_37503715.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/951d3d894cf240d536d81b8d14f3439f_99529941.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/1a2821cccdb1c603ff12729dcfb5bacf_77092550.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/ef2751729cd7f3fb2038bdfa97e8e370_70379382.png change filename to text .imagette225293001745985511/ imagette225293001745985511/1745985373_712271_1354580435_f35f694b259e13acde11fe30c9116680_rle_crop_3775030135_0.png.png imagette225293001745985511/1745984942_708850_1354579554_d99edf4a14c3640293e156860859d56a_rle_crop_3775024660_0.png.png imagette225293001745985511/1745985373_712271_1354580406_cba256f5c3dac11afea03c5d140aa4f9_rle_crop_3775032154_0.png.png imagette225293001745985511/1745984942_708850_1354579583_0fe12f7826e14a27a50f82ec6ebeb495_rle_crop_3775024641_0.png.png imagette225293001745985511/1745985373_712271_1354580435_f35f694b259e13acde11fe30c9116680_rle_crop_3775030140_0.png.png imagette225293001745985511/1745984942_708850_1354579554_d99edf4a14c3640293e156860859d56a_rle_crop_3775024664_0.png.png imagette225293001745985511/1745984942_708850_1354579551_fbcdb23bae812ac0f0113d730ff27918_rle_crop_3775024678_0.png.png imagette225293001745985511/1745984982_1336807_1354579520_3ba9dc479770b177f811a17c975f88df_rle_crop_3775024848_0.png.png imagette225293001745985511/1745985461_1344270_1354580878_6a53d0b4b42b099c809f082a8eb0f504_rle_crop_3775045239_0.png.png wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/545bc89c9373b4372e3239c7e545532d_41534674.png imagette225293001745985511 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22529264 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22529304,22529305,22529306,22529307,22529308,22529309,22529310,22529311,22529312,22529313,22529314,22529315?tags=plastique,cartonnette,metal,kraft,environnement,Carton_gris,mal_croppe,Teint_Dans_La_Masse,Carton_brun,autre_refus,papier,flou your option no_mail is active, we will not send the real mail to your client args[1354581445] : ('0.06960849167071538',) no score found for photo 1354581445 We are sending mail with results at report@fotonower.com args[1354581397] : ('0.06960849167071538',) no score found for photo 1354581397 We are sending mail with results at report@fotonower.com args[1354581364] : ('0.06960849167071538',) no score found for photo 1354581364 We are sending mail with results at report@fotonower.com args[1354581340] : ('0.06960849167071538',) no score found for photo 1354581340 We are sending mail with results at report@fotonower.com refus_total : 0.06960849167071538 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=22529264 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_P22529264_30-04-2025_05_58_30.pdf results_Auto_P22529264_30-04-2025_05_58_30.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22529264_30-04-2025_05_58_30.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','22529264','results_Auto_P22529264_30-04-2025_05_58_30.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22529264_30-04-2025_05_58_30.pdf','pdf','','0.17','0.06960849167071538') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22529264]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1354581445, 1354581397, 1354581364, 1354581340] map_info['map_portfolio_photo'] : {22529264: [1354581445, 1354581397, 1354581364, 1354581340, 1354581145, 1354581117, 1354581093, 1354580887, 1354580884, 1354580881, 1354580878, 1354580833, 1354580808, 1354580782, 1354580755, 1354580471, 1354580435, 1354580406, 1354580378, 1354580352, 1354580001, 1354579972, 1354579949, 1354579700, 1354579698, 1354579696, 1354579669, 1354579665, 1354579662, 1354579622, 1354579619, 1354579614, 1354579611, 1354579583, 1354579557, 1354579554, 1354579551, 1354579547, 1354579523, 1354579520, 1354579518, 1354579516]} final : False mtd_id 4302 list_pids : [1354581445, 1354581397, 1354581364, 1354581340] 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, '2772312') ('4302', '22529264', '1354581445', None, None, None, None, None, '2772312') ('4302', None, None, None, None, None, None, None, '2772312') ('4302', '22529264', '1354581397', None, None, None, None, None, '2772312') ('4302', None, None, None, None, None, None, None, '2772312') ('4302', '22529264', '1354581364', None, None, None, None, None, '2772312') ('4302', None, None, None, None, None, None, None, '2772312') ('4302', '22529264', '1354581340', None, None, None, None, None, '2772312') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 4 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', '22529264', '1354581445', None, None, None, None, None, '2772312'), ('4302', '22529264', '1354581397', None, None, None, None, None, '2772312'), ('4302', '22529264', '1354581364', None, None, None, None, None, '2772312'), ('4302', '22529264', '1354581340', None, None, None, None, None, '2772312')] time used for this insertion : 0.01370692253112793 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.183727741241455 time spend to save output : 0.013873577117919922 total time spend for step 4 : 3.197601318359375 step5:split_time_score Wed Apr 30 05:58:33 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 : ['22529264'] 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 : [('22529264',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22529264) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1354581364: {'path': 'temp/1745985510_976020_1354581364_d97f4ba1ba5d565c33ad596293cea317.jpg', 'extension': 'jpg'}, 1354581445: {'path': 'temp/1745985510_976020_1354581445_d72451b5a661d51ec50f3c1bea67b539.jpg', 'extension': 'jpg'}, 1354581397: {'path': 'temp/1745985510_976020_1354581397_75a12c0318edefc64f281a523602af33.jpg', 'extension': 'jpg'}, 1354581340: {'path': 'temp/1745985510_976020_1354581340_f41d8461f168677a26c41521694e6c82.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 = 22529264; (('arc_en_ciel_jrm_live',), ('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 = 22529264 group by h (('05', 42),) 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=22529264 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 (22529264) 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 (22529264) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 30042025 22529264 Nombre de photos uploadées : 42 / 23040 (0%) 30042025 22529264 Nombre de photos taguées (types de déchets): 0 / 42 (0%) 30042025 22529264 Nombre de photos taguées (volume) : 0 / 42 (0%) [{'photo_id': 1354579523, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/022ea6edd552275a9b7bdbc91a32c0c1.jpg', 'username': None, 'uploaded_at': 1745984768, 'text': 'image_30042025_05_45_15_010136m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1354579520, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/3ba9dc479770b177f811a17c975f88df.jpg', 'username': None, 'uploaded_at': 1745984768, 'text': 'image_30042025_05_45_24_009122m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1354579518, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/1de67e7ddb1aa5c74c2f5ba71009aebc.jpg', 'username': None, 'uploaded_at': 1745984768, 'text': 'image_30042025_05_45_34_010142m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1354579516, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/9e466f0e00669f3a10f413946f58ed1f.jpg', 'username': None, 'uploaded_at': 1745984768, 'text': 'image_30042025_05_45_44_010139m0.jpg 4e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 3.0994415283203125e-06 elapsed_time : order_list_meta_photo_and_scores 7.867813110351562e-06 ?????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0028095245361328125 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 22529264, '2025-04-30' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1757228,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.025214672088623047 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= 1757228 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1757228, 'dashboard_run_id': 1765312, 'mtr_portfolio_id': 22528309, 'dashboard_result_id': 10169159, '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_P22528309_30-04-2025_05_17_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22528311, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22528312, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22528313, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22528314, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22528315, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22528316, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22528317, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22528318, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22528319, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22528320, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22528321, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22528322, 'pht': 3726}}"}, {'dashboat_entry_day': 1757228, 'dashboard_run_id': 1765312, 'mtr_portfolio_id': 22528467, 'dashboard_result_id': 10169160, '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_P22528467_30-04-2025_05_33_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22528470, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22528471, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22528472, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22528473, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22528474, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22528475, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22528476, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22528477, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22528478, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22528479, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22528480, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22528481, 'pht': 3726}}"}, {'dashboat_entry_day': 1757228, 'dashboard_run_id': 1765312, 'mtr_portfolio_id': 22528725, 'dashboard_result_id': 10169161, '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_P22528725_30-04-2025_05_49_01.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22528750, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22528751, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22528752, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22528753, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22528754, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22528755, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22528756, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22528757, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22528758, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22528759, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22528760, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22528761, 'pht': 3726}}"}, {'dashboat_entry_day': 1757228, 'dashboard_run_id': 1765312, 'mtr_portfolio_id': 22529264, 'dashboard_result_id': 10169162, '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_P22529264_30-04-2025_05_57_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22529292, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22529293, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22529294, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22529295, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22529296, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22529297, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22529298, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22529299, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22529300, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22529301, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22529302, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22529303, 'pht': 3726}}"}] SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 22528309 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': 2772135, 'mtr_portfolio_id': 22528309, 'created_at': datetime.datetime(2025, 4, 30, 5, 17), 'result': '0.062487971481830364', 'result_long': None, 'result_double': None}] Qualite : 0.062487971481830364 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22528309 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22528309_30-04-2025_05_17_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22528309 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_P22528309_30-04-2025_05_17_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22528311, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22528312, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22528313, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22528314, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22528315, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22528316, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22528317, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22528318, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22528319, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22528320, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22528321, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22528322, 'pht': 3726}}" where mtr_portfolio_id = 22528309 and dashboard_run_id = 1765312 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`=22528309 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10169159, 0.062487971481830364, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22528309_30-04-2025_05_17_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22528311, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22528312, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22528313, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22528314, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22528315, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22528316, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22528317, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22528318, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22528319, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22528320, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22528321, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22528322, '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 = 22528467 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': 2772159, 'mtr_portfolio_id': 22528467, 'created_at': datetime.datetime(2025, 4, 30, 5, 32, 59), 'result': '0.046184179297803565', 'result_long': None, 'result_double': None}] Qualite : 0.046184179297803565 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22528467 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22528467_30-04-2025_05_33_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22528467 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_P22528467_30-04-2025_05_33_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22528470, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22528471, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22528472, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22528473, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22528474, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22528475, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22528476, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22528477, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22528478, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22528479, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22528480, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22528481, 'pht': 3726}}" where mtr_portfolio_id = 22528467 and dashboard_run_id = 1765312 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`=22528467 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10169160, 0.046184179297803565, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22528467_30-04-2025_05_33_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22528470, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22528471, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22528472, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22528473, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22528474, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22528475, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22528476, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22528477, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22528478, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22528479, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22528480, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22528481, '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 = 22528725 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': 2772199, 'mtr_portfolio_id': 22528725, 'created_at': datetime.datetime(2025, 4, 30, 5, 49), 'result': '0.05033071843439702', 'result_long': None, 'result_double': None}] Qualite : 0.05033071843439702 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22528725 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22528725_30-04-2025_05_49_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22528725 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_P22528725_30-04-2025_05_49_01.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22528750, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22528751, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22528752, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22528753, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22528754, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22528755, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22528756, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22528757, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22528758, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22528759, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22528760, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22528761, 'pht': 3726}}" where mtr_portfolio_id = 22528725 and dashboard_run_id = 1765312 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`=22528725 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10169161, 0.05033071843439702, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22528725_30-04-2025_05_49_01.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22528750, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22528751, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22528752, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22528753, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22528754, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22528755, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22528756, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22528757, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22528758, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22528759, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22528760, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22528761, '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 = 22529264 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': 2772312, 'mtr_portfolio_id': 22529264, 'created_at': datetime.datetime(2025, 4, 30, 5, 58, 29), 'result': '0.06960849167071538', 'result_long': None, 'result_double': None}] Qualite : 0.06960849167071538 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22529264 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22529264_30-04-2025_05_58_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22529264 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_P22529264_30-04-2025_05_58_30.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22529292, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22529293, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22529294, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22529295, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22529296, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22529297, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22529298, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22529299, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22529300, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22529301, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22529302, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22529303, 'pht': 3726}}" where mtr_portfolio_id = 22529264 and dashboard_run_id = 1765312 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`=22529264 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10169162, 0.06960849167071538, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22529264_30-04-2025_05_58_30.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22529292, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22529293, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22529294, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22529295, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22529296, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22529297, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22529298, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22529299, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22529300, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22529301, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22529302, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22529303, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22528309,22528467,22528725,22529264) result : ((1354577390,), (1354577772,), (1354577795,), (1354577796,), (1354577797,), (1354577821,), (1354577823,), (1354577908,), (1354577910,), (1354577911,), (1354577912,), (1354577935,), (1354577937,), (1354577939,), (1354577941,), (1354577943,), (1354577945,), (1354577970,), (1354578010,), (1354578012,), (1354578116,), (1354578359,), (1354578453,), (1354578455,), (1354578458,), (1354578461,), (1354578485,), (1354578521,), (1354578523,), (1354578546,), (1354578550,), (1354578579,), (1354578581,), (1354578583,), (1354578622,), (1354578625,), (1354578629,), (1354578667,), (1354578668,), (1354578670,), (1354578671,), (1354578696,), (1354578728,), (1354578731,), (1354578734,), (1354578759,), (1354578762,), (1354578792,), (1354578793,), (1354578838,), (1354578840,), (1354578843,), (1354578849,), (1354578851,), (1354578873,), (1354578875,), (1354578876,), (1354578878,), (1354578899,), (1354578904,), (1354578906,), (1354578908,), (1354578911,), (1354578912,), (1354578931,), (1354578934,), (1354578936,), (1354578938,), (1354578994,), (1354578990,), (1354578991,), (1354578992,), (1354579022,), (1354579025,), (1354579029,), (1354579031,), (1354579033,), (1354579035,), (1354579057,), (1354579059,), (1354579060,), (1354579061,), (1354579062,), (1354579095,), (1354579097,), (1354579098,), (1354579099,), (1354579119,), (1354579123,), (1354579126,), (1354579128,), (1354579131,), (1354579158,), (1354579161,), (1354579170,), (1354579178,), (1354579180,), (1354579209,), (1354579212,), (1354579216,), (1354579219,), (1354579242,), (1354579247,), (1354579248,), (1354579250,), (1354579273,), (1354579277,), (1354579310,), (1354579316,), (1354579337,), (1354579354,), (1354579371,), (1354579399,), (1354579402,), (1354579405,), (1354579428,), (1354579430,), (1354579432,), (1354579434,), (1354579456,), (1354579457,), (1354579459,), (1354579480,), (1354579482,), (1354579486,), (1354579525,), (1354579516,), (1354579518,), (1354579520,), (1354579523,), (1354579547,), (1354579551,), (1354579554,), (1354579557,), (1354579583,), (1354579611,), (1354579614,), (1354579619,), (1354579622,), (1354579662,), (1354579665,), (1354579669,), (1354579696,), (1354579698,), (1354579700,), (1354579949,), (1354579972,), (1354580001,), (1354580352,), (1354580378,), (1354580406,), (1354580435,), (1354580471,), (1354580755,), (1354580782,), (1354580808,), (1354580833,), (1354580878,), (1354580881,), (1354580884,), (1354580887,), (1354581093,), (1354581117,), (1354581145,), (1354581340,), (1354581364,), (1354581397,), (1354581445,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'30042025': {'nb_upload': 42, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22529264]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1354581445, 1354581397, 1354581364, 1354581340] map_info['map_portfolio_photo'] : {22529264: [1354581445, 1354581397, 1354581364, 1354581340, 1354581145, 1354581117, 1354581093, 1354580887, 1354580884, 1354580881, 1354580878, 1354580833, 1354580808, 1354580782, 1354580755, 1354580471, 1354580435, 1354580406, 1354580378, 1354580352, 1354580001, 1354579972, 1354579949, 1354579700, 1354579698, 1354579696, 1354579669, 1354579665, 1354579662, 1354579622, 1354579619, 1354579614, 1354579611, 1354579583, 1354579557, 1354579554, 1354579551, 1354579547, 1354579523, 1354579520, 1354579518, 1354579516]} final : True mtd_id 4302 list_pids : [1354581445, 1354581397, 1354581364, 1354581340] Looping around the photos to save general results len do output : 1 /22529264Didn'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, '2772312') ('4302', '22529264', '1354581445', None, None, None, None, None, '2772312') ('4302', None, None, None, None, None, None, None, '2772312') ('4302', '22529264', '1354581397', None, None, None, None, None, '2772312') ('4302', None, None, None, None, None, None, None, '2772312') ('4302', '22529264', '1354581364', None, None, None, None, None, '2772312') ('4302', None, None, None, None, None, None, None, '2772312') ('4302', '22529264', '1354581340', None, None, None, None, None, '2772312') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 5 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, '22529264', 'None', None, None, None, None, '2772312'), ('4302', '22529264', '1354581445', None, None, None, None, None, '2772312'), ('4302', '22529264', '1354581397', None, None, None, None, None, '2772312'), ('4302', '22529264', '1354581364', None, None, None, None, None, '2772312'), ('4302', '22529264', '1354581340', None, None, None, None, None, '2772312')] time used for this insertion : 0.012318611145019531 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.33855557441711426 time spend to save output : 0.012471199035644531 total time spend for step 5 : 0.3510267734527588 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 (2772312) 1.97user 2.03system 0:08.58elapsed 46%CPU (0avgtext+0avgdata 159012maxresident)k 104inputs+7944outputs (8major+64185minor)pagefaults 0swaps