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 : 2620335 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 (2690121) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2690121) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21701715 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2690121'] with mtr_portfolio_ids : ['21701715'] and first list_photo_ids : [] new path : /proc/2620335/ Name: python3 Umask: 0002 State: R (running) Tgid: 2620335 Ngid: 0 Pid: 2620335 PPid: 2620334 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 2620335 NSpid: 2620335 NSpgid: 2616200 NSsid: 2616200 VmPeak: 1106840 kB VmSize: 1106840 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 97956 kB VmRSS: 97956 kB RssAnon: 59752 kB RssFile: 38204 kB RssShmem: 0 kB VmData: 865588 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 584 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: 92 nonvoluntary_ctxt_switches: 241 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '2620335', 'Ngid': '0', 'Pid': '2620335', 'PPid': '2620334', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '2620335', 'NSpid': '2620335', 'NSpgid': '2616200', 'NSsid': '2616200', 'VmPeak': '1106840 kB', 'VmSize': '1106840 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '97956 kB', 'VmRSS': '97956 kB', 'RssAnon': '59752 kB', 'RssFile': '38204 kB', 'RssShmem': '0 kB', 'VmData': '865588 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '584 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': '00000 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06899499893188477 time spend to save output : 0.01936817169189453 total time spend for step 2 : 0.0883631706237793 step3:velours_tree Tue Mar 25 17:24:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 : {21701715: [{'environnement': 21701735, 'flou': 21701736, 'cartonnette': 21701737, 'Carton_brun': 21701738, 'mal_croppe': 21701739, 'Carton_gris': 21701740, 'metal': 21701741, 'plastique': 21701742, 'kraft': 21701743, 'papier': 21701744, 'Teint_Dans_La_Masse': 21701745, 'autre_refus': 21701746}]} input_args_next_step : {21701715: ()} output_args : {21701715: [{'environnement': 21701735, 'flou': 21701736, 'cartonnette': 21701737, 'Carton_brun': 21701738, 'mal_croppe': 21701739, 'Carton_gris': 21701740, 'metal': 21701741, 'plastique': 21701742, 'kraft': 21701743, 'papier': 21701744, 'Teint_Dans_La_Masse': 21701745, 'autre_refus': 21701746}]} args : 21701715 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'environnement': 21701735, 'flou': 21701736, 'cartonnette': 21701737, 'Carton_brun': 21701738, 'mal_croppe': 21701739, 'Carton_gris': 21701740, 'metal': 21701741, 'plastique': 21701742, 'kraft': 21701743, 'papier': 21701744, 'Teint_Dans_La_Masse': 21701745, 'autre_refus': 21701746},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21701715) 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([21701715]) 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.6125800609588623 time spend to save output : 7.748603820800781e-05 total time spend for step 3 : 0.6126575469970703 step4:send_mail_cod Tue Mar 25 17:24:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 : {1347245610: ('0.03432318794086982',), 1347245606: ('0.03432318794086982',), 1347245598: ('0.03432318794086982',), 1347245595: ('0.03432318794086982',), 1347245590: ('0.03432318794086982',)} input_args_next_step : {1347245610: ()} output_args : {1347245610: ('0.03432318794086982',), 1347245606: ('0.03432318794086982',), 1347245598: ('0.03432318794086982',), 1347245595: ('0.03432318794086982',), 1347245590: ('0.03432318794086982',)} args : 1347245610 depend.output_id : 0 input_args_next_step : {1347245610: ('0.03432318794086982',), 1347245606: ()} output_args : {1347245610: ('0.03432318794086982',), 1347245606: ('0.03432318794086982',), 1347245598: ('0.03432318794086982',), 1347245595: ('0.03432318794086982',), 1347245590: ('0.03432318794086982',)} args : 1347245606 depend.output_id : 0 input_args_next_step : {1347245610: ('0.03432318794086982',), 1347245606: ('0.03432318794086982',), 1347245598: ()} output_args : {1347245610: ('0.03432318794086982',), 1347245606: ('0.03432318794086982',), 1347245598: ('0.03432318794086982',), 1347245595: ('0.03432318794086982',), 1347245590: ('0.03432318794086982',)} args : 1347245598 depend.output_id : 0 input_args_next_step : {1347245610: ('0.03432318794086982',), 1347245606: ('0.03432318794086982',), 1347245598: ('0.03432318794086982',), 1347245595: ()} output_args : {1347245610: ('0.03432318794086982',), 1347245606: ('0.03432318794086982',), 1347245598: ('0.03432318794086982',), 1347245595: ('0.03432318794086982',), 1347245590: ('0.03432318794086982',)} args : 1347245595 depend.output_id : 0 input_args_next_step : {1347245610: ('0.03432318794086982',), 1347245606: ('0.03432318794086982',), 1347245598: ('0.03432318794086982',), 1347245595: ('0.03432318794086982',), 1347245590: ()} output_args : {1347245610: ('0.03432318794086982',), 1347245606: ('0.03432318794086982',), 1347245598: ('0.03432318794086982',), 1347245595: ('0.03432318794086982',), 1347245590: ('0.03432318794086982',)} args : 1347245590 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 : {21701715: [{'environnement': 21701735, 'flou': 21701736, 'cartonnette': 21701737, 'Carton_brun': 21701738, 'mal_croppe': 21701739, 'Carton_gris': 21701740, 'metal': 21701741, 'plastique': 21701742, 'kraft': 21701743, 'papier': 21701744, 'Teint_Dans_La_Masse': 21701745, 'autre_refus': 21701746}]} input_args_next_step : {1347245610: ('0.03432318794086982',), 1347245606: ('0.03432318794086982',), 1347245598: ('0.03432318794086982',), 1347245595: ('0.03432318794086982',), 1347245590: ('0.03432318794086982',), 21701715: ()} output_args : {21701715: [{'environnement': 21701735, 'flou': 21701736, 'cartonnette': 21701737, 'Carton_brun': 21701738, 'mal_croppe': 21701739, 'Carton_gris': 21701740, 'metal': 21701741, 'plastique': 21701742, 'kraft': 21701743, 'papier': 21701744, 'Teint_Dans_La_Masse': 21701745, 'autre_refus': 21701746}]} args : 21701715 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 :6, first value : ('0.03432318794086982',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21701715) 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 (1347245610,1347245606,1347245598,1347245595,1347245590) Found this number of photos: 5 ##### Call download_photos : nb_thread : 5 begin to download photo : 1347245590 begin to download photo : 1347245598 begin to download photo : 1347245610 download finish for photo 1347245610 download finish for photo 1347245590 begin to download photo : 1347245595 download finish for photo 1347245598 begin to download photo : 1347245606 download finish for photo 1347245606 download finish for photo 1347245595 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette217017361742919842/ imagette217017371742919842/ imagette217017391742919842/ imagette217017411742919842/ length of list_filenames : 5 ; length of list_pids : 5 ; length of list_args : 5 results_Auto_P21701715_25-03-2025_17_24_02.pdf 21701736 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=21701736 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217017361742919842 21701737 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=21701737 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217017371742919842 21701739 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=21701739 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217017391742919842 21701741 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=21701741 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217017411742919842 21701742 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=21701742 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1347245566: '1742919692_789349_1347244708_86636a89d2489fcbccb7f06dd7d72202_rle_crop_3729473585_0.png', 1347245567: '1742919692_789349_1347244704_e08c8b051619676a41fab318a7602a61_rle_crop_3729473594_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/1c6eb0c6605d458bb3eb47a615d8fa55_32633501.png change filename to text .imagette217017421742919842/ imagette217017421742919842/1742919692_789349_1347244708_86636a89d2489fcbccb7f06dd7d72202_rle_crop_3729473585_0.png.png imagette217017421742919842/1742919692_789349_1347244704_e08c8b051619676a41fab318a7602a61_rle_crop_3729473594_0.png.png imagette217017431742919842/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/fc4d37ceff0536f0c712b8c15ee53ff1_6141853.png imagette217017421742919842 21701743 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=21701743 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217017431742919842 21701746 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=21701746 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1347245488: '1742919652_788738_1347244744_8598edeab991edab6e175cfad349dea3_rle_crop_3729472991_0.png', 1347245561: '1742919692_789349_1347244700_938f5852ea94ec8965bc49d4fc41808b_rle_crop_3729473621_0.png', 1347245562: '1742919692_789349_1347244700_938f5852ea94ec8965bc49d4fc41808b_rle_crop_3729473619_0.png', 1347245563: '1742919692_789349_1347244693_2901398bf79ea66f5494210c46258c97_rle_crop_3729473630_0.png', 1347245564: '1742919692_789349_1347244689_37997359661b32c92a5032bd9fba9a65_rle_crop_3729473647_0.png', 1347245565: '1742919692_789349_1347244689_37997359661b32c92a5032bd9fba9a65_rle_crop_3729473646_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/3463349213f72aa7821df62bf6ccdaf6_5065863.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/1ffd301148ed176602550285d6e52fc1_24804520.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/a6a2eec37d1fd7223a8773e601b867e7_33885958.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/2a55a043ab2c321bccd644b10db35966_80716868.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/87f86534f60eed485dc46d6d58a15efc_65212351.png change filename to text .imagette217017461742919842/ imagette217017461742919842/1742919692_789349_1347244700_938f5852ea94ec8965bc49d4fc41808b_rle_crop_3729473621_0.png.png imagette217017461742919842/1742919692_789349_1347244693_2901398bf79ea66f5494210c46258c97_rle_crop_3729473630_0.png.png imagette217017461742919842/1742919692_789349_1347244689_37997359661b32c92a5032bd9fba9a65_rle_crop_3729473647_0.png.png imagette217017461742919842/1742919652_788738_1347244744_8598edeab991edab6e175cfad349dea3_rle_crop_3729472991_0.png.png imagette217017461742919842/1742919692_789349_1347244700_938f5852ea94ec8965bc49d4fc41808b_rle_crop_3729473619_0.png.png imagette217017461742919842/1742919692_789349_1347244689_37997359661b32c92a5032bd9fba9a65_rle_crop_3729473646_0.png.png wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/c7fe8e1edc9b07e7e2cbde02dd28a2f3_33807404.png imagette217017461742919842 21701738 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=21701738 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1347245493: '1742919652_788738_1347244744_8598edeab991edab6e175cfad349dea3_rle_crop_3729472994_0.png'} change filename to text .imagette217017381742919842/ imagette217017381742919842/1742919652_788738_1347244744_8598edeab991edab6e175cfad349dea3_rle_crop_3729472994_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/1ac4877d73e9c2bcfc23accacf01d21c_20740228.png imagette217017381742919842 21701740 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=21701740 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1347245490: '1742919652_788738_1347244765_240e6f37f036045d4aeb30e025fdaef5_rle_crop_3729472965_0.png'} change filename to text .imagette217017401742919842/ imagette217017401742919842/1742919652_788738_1347244765_240e6f37f036045d4aeb30e025fdaef5_rle_crop_3729472965_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/c3ebc68c5a679c2836257d56882b5545_29468968.png imagette217017401742919842 21701745 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=21701745 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1347245555: '1742919692_789349_1347244693_2901398bf79ea66f5494210c46258c97_rle_crop_3729473636_0.png', 1347245556: '1742919692_789349_1347244689_37997359661b32c92a5032bd9fba9a65_rle_crop_3729473649_0.png', 1347245557: '1742919692_789349_1347244689_37997359661b32c92a5032bd9fba9a65_rle_crop_3729473648_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/e2c81e747470423549adb0fbb4245d99_86777384.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/912854d42e12470c2db6bd8b52a33bee_22402111.png change filename to text .imagette217017451742919842/ imagette217017451742919842/1742919692_789349_1347244689_37997359661b32c92a5032bd9fba9a65_rle_crop_3729473648_0.png.png imagette217017451742919842/1742919692_789349_1347244689_37997359661b32c92a5032bd9fba9a65_rle_crop_3729473649_0.png.png imagette217017451742919842/1742919692_789349_1347244693_2901398bf79ea66f5494210c46258c97_rle_crop_3729473636_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/b908f5bf91cdd97435ae7132df50ba73_18085801.png imagette217017451742919842 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=21701715 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/21701747,21701748,21701749,21701750,21701751,21701752,21701753,21701754,21701755,21701756,21701757,21701758?tags=environnement,flou,cartonnette,Carton_brun,mal_croppe,Carton_gris,metal,plastique,kraft,papier,Teint_Dans_La_Masse,autre_refus your option no_mail is active, we will not send the real mail to your client args[1347245610] : ('0.03432318794086982',) no score found for photo 1347245610 We are sending mail with results at report@fotonower.com args[1347245606] : ('0.03432318794086982',) no score found for photo 1347245606 We are sending mail with results at report@fotonower.com args[1347245598] : ('0.03432318794086982',) no score found for photo 1347245598 We are sending mail with results at report@fotonower.com args[1347245595] : ('0.03432318794086982',) no score found for photo 1347245595 We are sending mail with results at report@fotonower.com args[1347245590] : ('0.03432318794086982',) no score found for photo 1347245590 We are sending mail with results at report@fotonower.com refus_total : 0.03432318794086982 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=21701715 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_P21701715_25-03-2025_17_24_02.pdf results_Auto_P21701715_25-03-2025_17_24_02.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21701715_25-03-2025_17_24_02.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','21701715','results_Auto_P21701715_25-03-2025_17_24_02.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21701715_25-03-2025_17_24_02.pdf','pdf','','0.11','0.03432318794086982') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21701715]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1347245610, 1347245606, 1347245598, 1347245595, 1347245590] map_info['map_portfolio_photo'] : {21701715: [1347245610, 1347245606, 1347245598, 1347245595, 1347245590, 1347245554, 1347245549, 1347245545, 1347245541, 1347245531, 1347245526, 1347245484, 1347245479, 1347245475, 1347245471, 1347245363, 1347245357, 1347245350, 1347245345, 1347245340, 1347245303, 1347245299, 1347245273, 1347245251, 1347245222, 1347245193, 1347244793, 1347244765, 1347244748, 1347244744, 1347244708, 1347244704, 1347244700, 1347244693, 1347244689]} final : False mtd_id 4302 list_pids : [1347245610, 1347245606, 1347245598, 1347245595, 1347245590] 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, '2690121') ('4302', '21701715', '1347245610', None, None, None, None, None, '2690121') ('4302', None, None, None, None, None, None, None, '2690121') ('4302', '21701715', '1347245606', None, None, None, None, None, '2690121') ('4302', None, None, None, None, None, None, None, '2690121') ('4302', '21701715', '1347245598', None, None, None, None, None, '2690121') ('4302', None, None, None, None, None, None, None, '2690121') ('4302', '21701715', '1347245595', None, None, None, None, None, '2690121') ('4302', None, None, None, None, None, None, None, '2690121') ('4302', '21701715', '1347245590', None, None, None, None, None, '2690121') 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', '21701715', '1347245610', None, None, None, None, None, '2690121'), ('4302', '21701715', '1347245606', None, None, None, None, None, '2690121'), ('4302', '21701715', '1347245598', None, None, None, None, None, '2690121'), ('4302', '21701715', '1347245595', None, None, None, None, None, '2690121'), ('4302', '21701715', '1347245590', None, None, None, None, None, '2690121')] time used for this insertion : 0.012811422348022461 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.9817852973937988 time spend to save output : 0.013032913208007812 total time spend for step 4 : 1.9948182106018066 step5:split_time_score Tue Mar 25 17:24:03 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['21701715'] 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 : [('21701715',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21701715) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1347245610: {'path': 'temp/1742919841_2620335_1347245610_bb365582d6981aa4c8177b8345642a88.jpg', 'extension': 'jpg'}, 1347245598: {'path': 'temp/1742919841_2620335_1347245598_fdad680d8ba69a9a810171412596bbcd.jpg', 'extension': 'jpg'}, 1347245606: {'path': 'temp/1742919841_2620335_1347245606_e639e38be83a911716d2585884cd1b15.jpg', 'extension': 'jpg'}, 1347245590: {'path': 'temp/1742919841_2620335_1347245590_1aac68720753fc05d0cae922f7ea4aa5.jpg', 'extension': 'jpg'}, 1347245595: {'path': 'temp/1742919841_2620335_1347245595_06317d7aa2ff938b587e4b090a3f87ae.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 = 21701715; (('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 = 21701715 group by h (('17', 35),) 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=21701715 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 (21701715) 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 (21701715) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 25032025 21701715 Nombre de photos uploadées : 35 / 23040 (0%) 25032025 21701715 Nombre de photos taguées (types de déchets): 0 / 35 (0%) 25032025 21701715 Nombre de photos taguées (volume) : 0 / 35 (0%) [{'photo_id': 1347244708, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/86636a89d2489fcbccb7f06dd7d72202.jpg', 'username': None, 'uploaded_at': 1742919437, 'text': 'image_25032025_17_15_03_9142.jpg'}, {'photo_id': 1347244704, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/e08c8b051619676a41fab318a7602a61.jpg', 'username': None, 'uploaded_at': 1742919437, 'text': 'image_25032025_17_15_13_10139.jpg'}, {'photo_id': 1347244700, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/938f5852ea94ec8965bc49d4fc41808b.jpg', 'username': None, 'uploaded_at': 1742919437, 'text': 'image_25032025_17_15_23_10142.jpg'}, {'photo_id': 1347244693, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/2901398bf79ea66f5494210c46258c97.jpg', 'username': None, 'uploaded_at': 1742919437, 'text': 'image_25032025_17_15_34_10136.jpg'}] 0 [] elapsed_time : load_data_split_time_score 5.9604644775390625e-06 elapsed_time : order_list_meta_photo_and_scores 1.2874603271484375e-05 ??????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0018646717071533203 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 21701715, '2025-03-25' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1685799,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.02686333656311035 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= 1685799 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1685799, 'dashboard_run_id': 1695750, 'mtr_portfolio_id': 21699089, 'dashboard_result_id': 9616787, '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_P21699089_25-03-2025_16_48_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21699115, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21699116, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21699117, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21699118, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21699119, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21699120, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21699121, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21699122, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21699123, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21699124, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21699125, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21699126, 'pht': 3726}}"}, {'dashboat_entry_day': 1685799, 'dashboard_run_id': 1695750, 'mtr_portfolio_id': 21700039, 'dashboard_result_id': 9616788, '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_P21700039_25-03-2025_17_05_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21700055, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21700056, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21700057, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21700058, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21700059, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21700060, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21700061, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21700062, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21700063, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21700064, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21700065, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21700066, 'pht': 3726}}"}, {'dashboat_entry_day': 1685799, 'dashboard_run_id': 1695750, 'mtr_portfolio_id': 21700672, 'dashboard_result_id': 9616789, '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_P21700672_25-03-2025_17_17_56.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 21700686, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21700687, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21700688, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21700689, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21700690, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21700691, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21700692, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21700693, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21700694, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21700695, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21700696, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21700697, 'pht': 3726}}"}, {'dashboat_entry_day': 1685799, 'dashboard_run_id': 1695750, 'mtr_portfolio_id': 21701715, 'dashboard_result_id': 9616790, '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_P21701715_25-03-2025_17_22_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21701735, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21701736, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21701737, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21701738, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21701739, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21701740, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21701741, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21701742, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21701743, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21701744, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21701745, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21701746, '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 = 21699089 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': 2689911, 'mtr_portfolio_id': 21699089, 'created_at': datetime.datetime(2025, 3, 25, 16, 48, 59), 'result': '0.04860963579605444', 'result_long': None, 'result_double': None}] Qualite : 0.04860963579605444 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21699089 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21699089_25-03-2025_16_48_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21699089 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_P21699089_25-03-2025_16_48_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21699115, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21699116, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21699117, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21699118, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21699119, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21699120, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21699121, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21699122, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21699123, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21699124, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21699125, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21699126, 'pht': 3726}}" where mtr_portfolio_id = 21699089 and dashboard_run_id = 1695750 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`=21699089 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9616787, 0.04860963579605444, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21699089_25-03-2025_16_48_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21699115, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21699116, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21699117, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21699118, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21699119, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21699120, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21699121, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21699122, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21699123, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21699124, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21699125, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21699126, '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 = 21700039 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': 2690023, 'mtr_portfolio_id': 21700039, 'created_at': datetime.datetime(2025, 3, 25, 17, 4, 59), 'result': '0.04290373396819406', 'result_long': None, 'result_double': None}] Qualite : 0.04290373396819406 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21700039 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21700039_25-03-2025_17_05_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21700039 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_P21700039_25-03-2025_17_05_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21700055, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21700056, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21700057, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21700058, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21700059, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21700060, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21700061, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21700062, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21700063, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21700064, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21700065, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21700066, 'pht': 3726}}" where mtr_portfolio_id = 21700039 and dashboard_run_id = 1695750 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`=21700039 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9616788, 0.04290373396819406, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21700039_25-03-2025_17_05_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21700055, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21700056, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21700057, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21700058, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21700059, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21700060, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21700061, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21700062, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21700063, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21700064, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21700065, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21700066, '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 = 21700672 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': 2690068, 'mtr_portfolio_id': 21700672, 'created_at': datetime.datetime(2025, 3, 25, 17, 17, 56), 'result': '0.031433546771438906', 'result_long': None, 'result_double': None}] Qualite : 0.031433546771438906 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21700672 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21700672_25-03-2025_17_17_56.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21700672 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_P21700672_25-03-2025_17_17_56.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 21700686, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21700687, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21700688, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21700689, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21700690, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21700691, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21700692, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21700693, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21700694, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21700695, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21700696, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21700697, 'pht': 3726}}" where mtr_portfolio_id = 21700672 and dashboard_run_id = 1695750 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`=21700672 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9616789, 0.031433546771438906, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21700672_25-03-2025_17_17_56.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 21700686, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21700687, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21700688, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21700689, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21700690, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21700691, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21700692, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21700693, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21700694, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21700695, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21700696, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21700697, '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 = 21701715 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': 2690121, 'mtr_portfolio_id': 21701715, 'created_at': datetime.datetime(2025, 3, 25, 17, 24, 1), 'result': '0.03432318794086982', 'result_long': None, 'result_double': None}] Qualite : 0.03432318794086982 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21701715 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21701715_25-03-2025_17_24_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21701715 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_P21701715_25-03-2025_17_24_02.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21701735, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21701736, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21701737, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21701738, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21701739, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21701740, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21701741, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21701742, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21701743, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21701744, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21701745, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21701746, 'pht': 3726}}" where mtr_portfolio_id = 21701715 and dashboard_run_id = 1695750 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`=21701715 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9616790, 0.03432318794086982, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21701715_25-03-2025_17_24_02.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21701735, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21701736, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21701737, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21701738, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21701739, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21701740, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21701741, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21701742, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21701743, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21701744, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21701745, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21701746, '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 (21699089,21700039,21700672,21701715) result : ((1347232396,), (1347232400,), (1347232405,), (1347232409,), (1347232571,), (1347232616,), (1347232634,), (1347232640,), (1347232644,), (1347232696,), (1347232699,), (1347232703,), (1347232708,), (1347232713,), (1347232802,), (1347232884,), (1347232945,), (1347232961,), (1347232993,), (1347233013,), (1347233113,), (1347233122,), (1347233127,), (1347233162,), (1347233231,), (1347233268,), (1347233272,), (1347233276,), (1347233290,), (1347233294,), (1347233325,), (1347233340,), (1347233348,), (1347233461,), (1347233463,), (1347233467,), (1347233470,), (1347233504,), (1347233513,), (1347233517,), (1347233522,), (1347233526,), (1347233529,), (1347233569,), (1347233572,), (1347233577,), (1347233581,), (1347233647,), (1347233651,), (1347233656,), (1347233665,), (1347233682,), (1347233719,), (1347233783,), (1347233826,), (1347233850,), (1347233878,), (1347233910,), (1347234019,), (1347234023,), (1347234024,), (1347234027,), (1347234031,), (1347234038,), (1347234085,), (1347234093,), (1347234096,), (1347234106,), (1347234109,), (1347234327,), (1347234358,), (1347234394,), (1347234412,), (1347234451,), (1347234469,), (1347234560,), (1347234549,), (1347234553,), (1347234556,), (1347234611,), (1347234700,), (1347234706,), (1347234708,), (1347234710,), (1347234719,), (1347234763,), (1347234770,), (1347234775,), (1347234778,), (1347234940,), (1347234973,), (1347235014,), (1347235029,), (1347235051,), (1347235089,), (1347235330,), (1347235334,), (1347235340,), (1347235346,), (1347235389,), (1347235392,), (1347235396,), (1347235402,), (1347235407,), (1347235413,), (1347235435,), (1347235443,), (1347235497,), (1347235502,), (1347235545,), (1347235570,), (1347235589,), (1347235657,), (1347235663,), (1347235667,), (1347235835,), (1347235852,), (1347235876,), (1347235886,), (1347235894,), (1347235948,), (1347235951,), (1347235953,), (1347235958,), (1347235963,), (1347235991,), (1347235993,), (1347235997,), (1347235999,), (1347236002,), (1347236007,), (1347236151,), (1347236192,), (1347236275,), (1347236334,), (1347237058,), (1347237089,), (1347237132,), (1347237157,), (1347237186,), (1347237722,), (1347237762,), (1347237798,), (1347237852,), (1347237881,), (1347237906,), (1347237993,), (1347238031,), (1347238074,), (1347238544,), (1347238217,), (1347238300,), (1347238340,), (1347238382,), (1347238440,), (1347238875,), (1347238917,), (1347238943,), (1347238981,), (1347239046,), (1347239344,), (1347239389,), (1347239440,), (1347239478,), (1347240437,), (1347240493,), (1347240554,), (1347240659,), (1347240733,), (1347240781,), (1347241151,), (1347241158,), (1347241189,), (1347241195,), (1347241202,), (1347241442,), (1347241490,), (1347241542,), (1347241593,), (1347241616,), (1347241706,), (1347242191,), (1347242261,), (1347242308,), (1347242353,), (1347242744,), (1347242760,), (1347242778,), (1347242792,), (1347242998,), (1347243032,), (1347243904,), (1347243945,), (1347244220,), (1347244245,), (1347244253,), (1347244261,), (1347244390,), (1347244449,), (1347244489,), (1347244498,), (1347244536,), (1347244540,), (1347244546,), (1347244568,), (1347244574,), (1347244630,), (1347244635,), (1347244639,), (1347244645,), (1347244652,), (1347244710,), (1347244689,), (1347244693,), (1347244700,), (1347244704,), (1347244708,), (1347244744,), (1347244748,), (1347244765,), (1347244793,), (1347245193,), (1347245222,), (1347245251,), (1347245273,), (1347245299,), (1347245303,), (1347245340,), (1347245345,), (1347245350,), (1347245357,), (1347245363,), (1347245471,), (1347245475,), (1347245479,), (1347245484,), (1347245526,), (1347245531,), (1347245541,), (1347245545,), (1347245549,), (1347245554,), (1347245590,), (1347245595,), (1347245598,), (1347245606,), (1347245610,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'25032025': {'nb_upload': 35, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21701715]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1347245610, 1347245606, 1347245598, 1347245595, 1347245590] map_info['map_portfolio_photo'] : {21701715: [1347245610, 1347245606, 1347245598, 1347245595, 1347245590, 1347245554, 1347245549, 1347245545, 1347245541, 1347245531, 1347245526, 1347245484, 1347245479, 1347245475, 1347245471, 1347245363, 1347245357, 1347245350, 1347245345, 1347245340, 1347245303, 1347245299, 1347245273, 1347245251, 1347245222, 1347245193, 1347244793, 1347244765, 1347244748, 1347244744, 1347244708, 1347244704, 1347244700, 1347244693, 1347244689]} final : True mtd_id 4302 list_pids : [1347245610, 1347245606, 1347245598, 1347245595, 1347245590] Looping around the photos to save general results len do output : 1 /21701715Didn'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, '2690121') ('4302', '21701715', '1347245610', None, None, None, None, None, '2690121') ('4302', None, None, None, None, None, None, None, '2690121') ('4302', '21701715', '1347245606', None, None, None, None, None, '2690121') ('4302', None, None, None, None, None, None, None, '2690121') ('4302', '21701715', '1347245598', None, None, None, None, None, '2690121') ('4302', None, None, None, None, None, None, None, '2690121') ('4302', '21701715', '1347245595', None, None, None, None, None, '2690121') ('4302', None, None, None, None, None, None, None, '2690121') ('4302', '21701715', '1347245590', None, None, None, None, None, '2690121') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '21701715', 'None', None, None, None, None, '2690121'), ('4302', '21701715', '1347245610', None, None, None, None, None, '2690121'), ('4302', '21701715', '1347245606', None, None, None, None, None, '2690121'), ('4302', '21701715', '1347245598', None, None, None, None, None, '2690121'), ('4302', '21701715', '1347245595', None, None, None, None, None, '2690121'), ('4302', '21701715', '1347245590', None, None, None, None, None, '2690121')] time used for this insertion : 0.014673471450805664 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.36946535110473633 time spend to save output : 0.014953136444091797 total time spend for step 5 : 0.3844184875488281 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 (2690121) 2.21user 1.94system 0:08.20elapsed 50%CPU (0avgtext+0avgdata 158176maxresident)k 49112inputs+5240outputs (292major+76642minor)pagefaults 0swaps