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 : 2105316 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 (2621470) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2621470) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20901042 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2621470'] with mtr_portfolio_ids : ['20901042'] and first list_photo_ids : [] new path : /proc/2105316/ Name: python3 Umask: 0002 State: R (running) Tgid: 2105316 Ngid: 0 Pid: 2105316 PPid: 2105315 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 2105316 NSpid: 2105316 NSpgid: 2103920 NSsid: 2103920 VmPeak: 1106848 kB VmSize: 1106848 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98608 kB VmRSS: 98608 kB RssAnon: 59760 kB RssFile: 38848 kB RssShmem: 0 kB VmData: 865596 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 544 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 3/63054 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 47 nonvoluntary_ctxt_switches: 124 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '2105316', 'Ngid': '0', 'Pid': '2105316', 'PPid': '2105315', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '2105316', 'NSpid': '2105316', 'NSpgid': '2103920', 'NSsid': '2103920', 'VmPeak': '1106848 kB', 'VmSize': '1106848 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98608 kB', 'VmRSS': '98608 kB', 'RssAnon': '59760 kB', 'RssFile': '38848 kB', 'RssShmem': '0 kB', 'VmData': '865596 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '544 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '3/63054', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '47', 'nonvoluntary_ctxt_switches': '124'} ('datou_batch_current', '2105316', '1106848', '0', '1106848', '865596', '98608', b'', 'marlene', '2621470') 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 (20901042) 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 (2621470 ) ) 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 (20901042) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1340018280, 'portfolio_id': 20901042}, {'photo_id': 1340018275, 'portfolio_id': 20901042}, {'photo_id': 1340018271, 'portfolio_id': 20901042}, {'photo_id': 1340018247, 'portfolio_id': 20901042}, {'photo_id': 1340018242, 'portfolio_id': 20901042}, {'photo_id': 1340018238, 'portfolio_id': 20901042}, {'photo_id': 1340018233, 'portfolio_id': 20901042}, {'photo_id': 1340018230, 'portfolio_id': 20901042}, {'photo_id': 1340018225, 'portfolio_id': 20901042}, {'photo_id': 1340018025, 'portfolio_id': 20901042}, {'photo_id': 1340018020, 'portfolio_id': 20901042}, {'photo_id': 1340017938, 'portfolio_id': 20901042}, {'photo_id': 1340017750, 'portfolio_id': 20901042}, {'photo_id': 1340017464, 'portfolio_id': 20901042}, {'photo_id': 1340017462, 'portfolio_id': 20901042}, {'photo_id': 1340017460, 'portfolio_id': 20901042}, {'photo_id': 1340017457, 'portfolio_id': 20901042}, {'photo_id': 1340017456, 'portfolio_id': 20901042}, {'photo_id': 1340017394, 'portfolio_id': 20901042}, {'photo_id': 1340017391, 'portfolio_id': 20901042}, {'photo_id': 1340017388, 'portfolio_id': 20901042}, {'photo_id': 1340017386, 'portfolio_id': 20901042}, {'photo_id': 1340017384, 'portfolio_id': 20901042}] map_portfolio_id_photo_id: {20901042: [1340018280, 1340018275, 1340018271, 1340018247, 1340018242, 1340018238, 1340018233, 1340018230, 1340018225, 1340018025, 1340018020, 1340017938, 1340017750, 1340017464, 1340017462, 1340017460, 1340017457, 1340017456, 1340017394, 1340017391, 1340017388, 1340017386, 1340017384]} ##### 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.028035640716552734 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Fri Feb 28 00:36:28 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 (20901042) 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 : 20901042 get user id for portfolio 20901042 get sub ptf for main ptf 20901042, type 3726 and hashtags ['flou', 'Carton_brun', 'plastique', 'Teint_Dans_La_Masse', 'environnement', 'metal', 'Carton_gris', 'kraft', 'mal_croppe', 'papier', 'cartonnette', 'autre_refus'] 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`=20901042 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','Carton_brun','plastique','Teint_Dans_La_Masse','environnement','metal','Carton_gris','kraft','mal_croppe','papier','cartonnette','autre_refus')) 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`=20901042 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','Carton_brun','plastique','Teint_Dans_La_Masse','environnement','metal','Carton_gris','kraft','mal_croppe','papier','cartonnette','autre_refus')) AND mptpi.`min_score`=0.5 To do returned map {'mal_croppe': {'main_port_id': 20901042, 'sub_port_id': 20901045, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13529617, 'last_updated_at': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_desc': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_asc': datetime.datetime(2025, 2, 28, 0, 34, 58)}, 'environnement': {'main_port_id': 20901042, 'sub_port_id': 20901046, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13529618, 'last_updated_at': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_desc': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_asc': datetime.datetime(2025, 2, 28, 0, 34, 58)}, 'flou': {'main_port_id': 20901042, 'sub_port_id': 20901047, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13529619, 'last_updated_at': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_desc': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_asc': datetime.datetime(2025, 2, 28, 0, 34, 58)}, 'Carton_gris': {'main_port_id': 20901042, 'sub_port_id': 20901048, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13529620, 'last_updated_at': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_desc': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_asc': datetime.datetime(2025, 2, 28, 0, 34, 58)}, 'cartonnette': {'main_port_id': 20901042, 'sub_port_id': 20901049, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13529621, 'last_updated_at': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_desc': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_asc': datetime.datetime(2025, 2, 28, 0, 34, 58)}, 'autre_refus': {'main_port_id': 20901042, 'sub_port_id': 20901050, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13529622, 'last_updated_at': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_desc': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_asc': datetime.datetime(2025, 2, 28, 0, 34, 58)}, 'Teint_Dans_La_Masse': {'main_port_id': 20901042, 'sub_port_id': 20901051, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13529623, 'last_updated_at': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_desc': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_asc': datetime.datetime(2025, 2, 28, 0, 34, 58)}, 'metal': {'main_port_id': 20901042, 'sub_port_id': 20901052, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13529624, 'last_updated_at': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_desc': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_asc': datetime.datetime(2025, 2, 28, 0, 34, 58)}, 'plastique': {'main_port_id': 20901042, 'sub_port_id': 20901053, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13529625, 'last_updated_at': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_desc': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_asc': datetime.datetime(2025, 2, 28, 0, 34, 58)}, 'kraft': {'main_port_id': 20901042, 'sub_port_id': 20901054, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13529626, 'last_updated_at': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_desc': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_asc': datetime.datetime(2025, 2, 28, 0, 34, 58)}, 'Carton_brun': {'main_port_id': 20901042, 'sub_port_id': 20901055, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13529627, 'last_updated_at': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_desc': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_asc': datetime.datetime(2025, 2, 28, 0, 34, 58)}, 'papier': {'main_port_id': 20901042, 'sub_port_id': 20901056, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13529628, 'last_updated_at': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_desc': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_asc': datetime.datetime(2025, 2, 28, 0, 34, 58)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20901045 , 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=20901042 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 (20901045) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20901042) result : ((1340017384,), (1340017386,), (1340017388,), (1340017391,), (1340017394,), (1340017456,), (1340017457,), (1340017460,), (1340017462,), (1340017464,), (1340017750,), (1340017938,), (1340018020,), (1340018025,), (1340018225,), (1340018230,), (1340018233,), (1340018238,), (1340018242,), (1340018247,), (1340018271,), (1340018275,), (1340018280,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20901046 , 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=20901042 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 (20901046) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20901042) result : ((1340017384,), (1340017386,), (1340017388,), (1340017391,), (1340017394,), (1340017456,), (1340017457,), (1340017460,), (1340017462,), (1340017464,), (1340017750,), (1340017938,), (1340018020,), (1340018025,), (1340018225,), (1340018230,), (1340018233,), (1340018238,), (1340018242,), (1340018247,), (1340018271,), (1340018275,), (1340018280,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20901047 , 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=20901042 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 (20901047) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20901042) result : ((1340017384,), (1340017386,), (1340017388,), (1340017391,), (1340017394,), (1340017456,), (1340017457,), (1340017460,), (1340017462,), (1340017464,), (1340017750,), (1340017938,), (1340018020,), (1340018025,), (1340018225,), (1340018230,), (1340018233,), (1340018238,), (1340018242,), (1340018247,), (1340018271,), (1340018275,), (1340018280,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20901048 , 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=20901042 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 (20901048) result : ((1340018196,), (1340018298,), (1340018299,), (1340018309,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20901042) result : ((1340017384,), (1340017386,), (1340017388,), (1340017391,), (1340017394,), (1340017456,), (1340017457,), (1340017460,), (1340017462,), (1340017464,), (1340017750,), (1340017938,), (1340018020,), (1340018025,), (1340018225,), (1340018230,), (1340018233,), (1340018238,), (1340018242,), (1340018247,), (1340018271,), (1340018275,), (1340018280,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20901049 , 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=20901042 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 (20901049) result : ((1340018198,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20901042) result : ((1340017384,), (1340017386,), (1340017388,), (1340017391,), (1340017394,), (1340017456,), (1340017457,), (1340017460,), (1340017462,), (1340017464,), (1340017750,), (1340017938,), (1340018020,), (1340018025,), (1340018225,), (1340018230,), (1340018233,), (1340018238,), (1340018242,), (1340018247,), (1340018271,), (1340018275,), (1340018280,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20901050 , 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=20901042 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 (20901050) result : ((1340018191,), (1340018192,), (1340018193,), (1340018194,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20901042) result : ((1340017384,), (1340017386,), (1340017388,), (1340017391,), (1340017394,), (1340017456,), (1340017457,), (1340017460,), (1340017462,), (1340017464,), (1340017750,), (1340017938,), (1340018020,), (1340018025,), (1340018225,), (1340018230,), (1340018233,), (1340018238,), (1340018242,), (1340018247,), (1340018271,), (1340018275,), (1340018280,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20901051 , 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=20901042 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 (20901051) result : ((1340018178,), (1340018180,), (1340018182,), (1340018184,), (1340018295,), (1340018296,), (1340018308,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20901042) result : ((1340017384,), (1340017386,), (1340017388,), (1340017391,), (1340017394,), (1340017456,), (1340017457,), (1340017460,), (1340017462,), (1340017464,), (1340017750,), (1340017938,), (1340018020,), (1340018025,), (1340018225,), (1340018230,), (1340018233,), (1340018238,), (1340018242,), (1340018247,), (1340018271,), (1340018275,), (1340018280,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20901052 , 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=20901042 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 (20901052) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20901042) result : ((1340017384,), (1340017386,), (1340017388,), (1340017391,), (1340017394,), (1340017456,), (1340017457,), (1340017460,), (1340017462,), (1340017464,), (1340017750,), (1340017938,), (1340018020,), (1340018025,), (1340018225,), (1340018230,), (1340018233,), (1340018238,), (1340018242,), (1340018247,), (1340018271,), (1340018275,), (1340018280,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20901053 , 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=20901042 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 (20901053) result : ((1340018305,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20901042) result : ((1340017384,), (1340017386,), (1340017388,), (1340017391,), (1340017394,), (1340017456,), (1340017457,), (1340017460,), (1340017462,), (1340017464,), (1340017750,), (1340017938,), (1340018020,), (1340018025,), (1340018225,), (1340018230,), (1340018233,), (1340018238,), (1340018242,), (1340018247,), (1340018271,), (1340018275,), (1340018280,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20901054 , 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=20901042 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 (20901054) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20901042) result : ((1340017384,), (1340017386,), (1340017388,), (1340017391,), (1340017394,), (1340017456,), (1340017457,), (1340017460,), (1340017462,), (1340017464,), (1340017750,), (1340017938,), (1340018020,), (1340018025,), (1340018225,), (1340018230,), (1340018233,), (1340018238,), (1340018242,), (1340018247,), (1340018271,), (1340018275,), (1340018280,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20901055 , 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=20901042 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 (20901055) result : ((1340018214,), (1340018215,), (1340018216,), (1340018217,), (1340018218,), (1340018219,), (1340018303,), (1340018304,), (1340018312,), (1340018313,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20901042) result : ((1340017384,), (1340017386,), (1340017388,), (1340017391,), (1340017394,), (1340017456,), (1340017457,), (1340017460,), (1340017462,), (1340017464,), (1340017750,), (1340017938,), (1340018020,), (1340018025,), (1340018225,), (1340018230,), (1340018233,), (1340018238,), (1340018242,), (1340018247,), (1340018271,), (1340018275,), (1340018280,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20901056 , 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=20901042 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 (20901056) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20901042) result : ((1340017384,), (1340017386,), (1340017388,), (1340017391,), (1340017394,), (1340017456,), (1340017457,), (1340017460,), (1340017462,), (1340017464,), (1340017750,), (1340017938,), (1340018020,), (1340018025,), (1340018225,), (1340018230,), (1340018233,), (1340018238,), (1340018242,), (1340018247,), (1340018271,), (1340018275,), (1340018280,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=20901042 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','Carton_brun','plastique','Teint_Dans_La_Masse','environnement','metal','Carton_gris','kraft','mal_croppe','papier','cartonnette','autre_refus')) 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`=20901042 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','Carton_brun','plastique','Teint_Dans_La_Masse','environnement','metal','Carton_gris','kraft','mal_croppe','papier','cartonnette','autre_refus')) AND mptpi.`min_score`=0.5 To do returned map {'mal_croppe': {'main_port_id': 20901042, 'sub_port_id': 20901057, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13529629, 'last_updated_at': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_desc': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_asc': datetime.datetime(2025, 2, 28, 0, 35)}, 'environnement': {'main_port_id': 20901042, 'sub_port_id': 20901058, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13529630, 'last_updated_at': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_desc': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_asc': datetime.datetime(2025, 2, 28, 0, 35)}, 'flou': {'main_port_id': 20901042, 'sub_port_id': 20901059, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13529631, 'last_updated_at': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_desc': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_asc': datetime.datetime(2025, 2, 28, 0, 35)}, 'Carton_gris': {'main_port_id': 20901042, 'sub_port_id': 20901060, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13529632, 'last_updated_at': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_desc': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_asc': datetime.datetime(2025, 2, 28, 0, 35)}, 'cartonnette': {'main_port_id': 20901042, 'sub_port_id': 20901061, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13529633, 'last_updated_at': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_desc': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_asc': datetime.datetime(2025, 2, 28, 0, 35)}, 'autre_refus': {'main_port_id': 20901042, 'sub_port_id': 20901062, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13529634, 'last_updated_at': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_desc': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_asc': datetime.datetime(2025, 2, 28, 0, 35)}, 'Teint_Dans_La_Masse': {'main_port_id': 20901042, 'sub_port_id': 20901063, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13529635, 'last_updated_at': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_desc': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_asc': datetime.datetime(2025, 2, 28, 0, 35)}, 'metal': {'main_port_id': 20901042, 'sub_port_id': 20901064, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13529636, 'last_updated_at': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_desc': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_asc': datetime.datetime(2025, 2, 28, 0, 35)}, 'plastique': {'main_port_id': 20901042, 'sub_port_id': 20901065, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13529637, 'last_updated_at': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_desc': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_asc': datetime.datetime(2025, 2, 28, 0, 35)}, 'kraft': {'main_port_id': 20901042, 'sub_port_id': 20901066, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13529638, 'last_updated_at': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_desc': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_asc': datetime.datetime(2025, 2, 28, 0, 35)}, 'Carton_brun': {'main_port_id': 20901042, 'sub_port_id': 20901067, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13529639, 'last_updated_at': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_desc': datetime.datetime(2025, 2, 28, 0, 35), 'last_updated_at_asc': datetime.datetime(2025, 2, 28, 0, 35)}, 'papier': {'main_port_id': 20901042, 'sub_port_id': 20901068, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13529640, 'last_updated_at': datetime.datetime(2025, 2, 28, 0, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 2, 28, 0, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 2, 28, 0, 35)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20901057,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20901045 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20901058,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20901046 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20901059,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20901047 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20901060,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20901048 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20901061,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20901049 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20901062,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20901050 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20901063,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20901051 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20901064,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20901052 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20901065,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20901053 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20901066,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20901054 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20901067,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20901055 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20901068,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20901056 lien utilise dans velours : https://www.fotonower.com/velours/20901057,20901058,20901059,20901060,20901061,20901062,20901063,20901064,20901065,20901066,20901067,20901068?tags=mal_croppe,environnement,flou,Carton_gris,cartonnette,autre_refus,Teint_Dans_La_Masse,metal,plastique,kraft,Carton_brun,papier After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20901042]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1340018280, 1340018275, 1340018271, 1340018247, 1340018242, 1340018238, 1340018233, 1340018230, 1340018225] map_info['map_portfolio_photo'] : {20901042: [1340018280, 1340018275, 1340018271, 1340018247, 1340018242, 1340018238, 1340018233, 1340018230, 1340018225, 1340018025, 1340018020, 1340017938, 1340017750, 1340017464, 1340017462, 1340017460, 1340017457, 1340017456, 1340017394, 1340017391, 1340017388, 1340017386, 1340017384]} final : False mtd_id 4302 list_pids : [1340018280, 1340018275, 1340018271, 1340018247, 1340018242, 1340018238, 1340018233, 1340018230, 1340018225] Looping around the photos to save general results len do output : 1 /20901042. 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, '2621470') ('4302', '20901042', '1340018280', None, None, None, None, None, '2621470') ('4302', None, None, None, None, None, None, None, '2621470') ('4302', '20901042', '1340018275', None, None, None, None, None, '2621470') ('4302', None, None, None, None, None, None, None, '2621470') ('4302', '20901042', '1340018271', None, None, None, None, None, '2621470') ('4302', None, None, None, None, None, None, None, '2621470') ('4302', '20901042', '1340018247', None, None, None, None, None, '2621470') ('4302', None, None, None, None, None, None, None, '2621470') ('4302', '20901042', '1340018242', None, None, None, None, None, '2621470') ('4302', None, None, None, None, None, None, None, '2621470') ('4302', '20901042', '1340018238', None, None, None, None, None, '2621470') ('4302', None, None, None, None, None, None, None, '2621470') ('4302', '20901042', '1340018233', None, None, None, None, None, '2621470') ('4302', None, None, None, None, None, None, None, '2621470') ('4302', '20901042', '1340018230', None, None, None, None, None, '2621470') ('4302', None, None, None, None, None, None, None, '2621470') ('4302', '20901042', '1340018225', None, None, None, None, None, '2621470') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 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, '20901042', "{'mal_croppe': 20901045, 'environnement': 20901046, 'flou': 20901047, 'Carton_gris': 20901048, 'cartonnette': 20901049, 'autre_refus': 20901050, 'Teint_Dans_La_Masse': 20901051, 'metal': 20901052, 'plastique': 20901053, 'kraft': 20901054, 'Carton_brun': 20901055, 'papier': 20901056}", None, None, None, None, '2621470'), ('4302', '20901042', '1340018280', None, None, None, None, None, '2621470'), ('4302', '20901042', '1340018275', None, None, None, None, None, '2621470'), ('4302', '20901042', '1340018271', None, None, None, None, None, '2621470'), ('4302', '20901042', '1340018247', None, None, None, None, None, '2621470'), ('4302', '20901042', '1340018242', None, None, None, None, None, '2621470'), ('4302', '20901042', '1340018238', None, None, None, None, None, '2621470'), ('4302', '20901042', '1340018233', None, None, None, None, None, '2621470'), ('4302', '20901042', '1340018230', None, None, None, None, None, '2621470'), ('4302', '20901042', '1340018225', None, None, None, None, None, '2621470')] time used for this insertion : 0.01580071449279785 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5100300312042236 time spend to save output : 0.016147136688232422 total time spend for step 1 : 1.526177167892456 step2:final Fri Feb 28 00:36: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 (20901042) 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 20901042 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1340017394,1340017391,1340017388,1340017386,1340017384,1340017464,1340017462,1340017460,1340017457,1340017456,1340018025,1340018020,1340017938,1340017750,1340018247,1340018242,1340018238,1340018233,1340018230,1340018225,1340018280,1340018275,1340018271); 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([20901042]) Inside saveOutput : final : False verbose : True original output for save of step final : {1340018280: ('0.09983636831665117',), 1340018275: ('0.09983636831665117',), 1340018271: ('0.09983636831665117',), 1340018247: ('0.09983636831665117',), 1340018242: ('0.09983636831665117',), 1340018238: ('0.09983636831665117',), 1340018233: ('0.09983636831665117',), 1340018230: ('0.09983636831665117',), 1340018225: ('0.09983636831665117',)} new output for save of step final : {1340018280: ('0.09983636831665117',), 1340018275: ('0.09983636831665117',), 1340018271: ('0.09983636831665117',), 1340018247: ('0.09983636831665117',), 1340018242: ('0.09983636831665117',), 1340018238: ('0.09983636831665117',), 1340018233: ('0.09983636831665117',), 1340018230: ('0.09983636831665117',), 1340018225: ('0.09983636831665117',)} [1340018280, 1340018275, 1340018271, 1340018247, 1340018242, 1340018238, 1340018233, 1340018230, 1340018225] map_info['map_portfolio_photo'] : {20901042: [1340018280, 1340018275, 1340018271, 1340018247, 1340018242, 1340018238, 1340018233, 1340018230, 1340018225, 1340018025, 1340018020, 1340017938, 1340017750, 1340017464, 1340017462, 1340017460, 1340017457, 1340017456, 1340017394, 1340017391, 1340017388, 1340017386, 1340017384]} final : False mtd_id 4302 list_pids : [1340018280, 1340018275, 1340018271, 1340018247, 1340018242, 1340018238, 1340018233, 1340018230, 1340018225] Looping around the photos to save general results len do output : 9 /1340018280.Didn't retrieve data . /1340018275.Didn't retrieve data . /1340018271.Didn't retrieve data . /1340018247.Didn't retrieve data . /1340018242.Didn't retrieve data . /1340018238.Didn't retrieve data . /1340018233.Didn't retrieve data . /1340018230.Didn't retrieve data . /1340018225.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, '2621470') ('4302', '20901042', '1340018280', None, None, None, None, None, '2621470') ('4302', None, None, None, None, None, None, None, '2621470') ('4302', '20901042', '1340018275', None, None, None, None, None, '2621470') ('4302', None, None, None, None, None, None, None, '2621470') ('4302', '20901042', '1340018271', None, None, None, None, None, '2621470') ('4302', None, None, None, None, None, None, None, '2621470') ('4302', '20901042', '1340018247', None, None, None, None, None, '2621470') ('4302', None, None, None, None, None, None, None, '2621470') ('4302', '20901042', '1340018242', None, None, None, None, None, '2621470') ('4302', None, None, None, None, None, None, None, '2621470') ('4302', '20901042', '1340018238', None, None, None, None, None, '2621470') ('4302', None, None, None, None, None, None, None, '2621470') ('4302', '20901042', '1340018233', None, None, None, None, None, '2621470') ('4302', None, None, None, None, None, None, None, '2621470') ('4302', '20901042', '1340018230', None, None, None, None, None, '2621470') ('4302', None, None, None, None, None, None, None, '2621470') ('4302', '20901042', '1340018225', None, None, None, None, None, '2621470') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 27 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', '20901042', '1340018280', '0.09983636831665117', None, None, None, None, '2621470'), ('4302', '20901042', '1340018275', '0.09983636831665117', None, None, None, None, '2621470'), ('4302', '20901042', '1340018271', '0.09983636831665117', None, None, None, None, '2621470'), ('4302', '20901042', '1340018247', '0.09983636831665117', None, None, None, None, '2621470'), ('4302', '20901042', '1340018242', '0.09983636831665117', None, None, None, None, '2621470'), ('4302', '20901042', '1340018238', '0.09983636831665117', None, None, None, None, '2621470'), ('4302', '20901042', '1340018233', '0.09983636831665117', None, None, None, None, '2621470'), ('4302', '20901042', '1340018230', '0.09983636831665117', None, None, None, None, '2621470'), ('4302', '20901042', '1340018225', '0.09983636831665117', None, None, None, None, '2621470')] time used for this insertion : 0.01752614974975586 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.07834815979003906 time spend to save output : 0.018081188201904297 total time spend for step 2 : 0.09642934799194336 step3:velours_tree Fri Feb 28 00:36: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 : {20901042: [{'mal_croppe': 20901045, 'environnement': 20901046, 'flou': 20901047, 'Carton_gris': 20901048, 'cartonnette': 20901049, 'autre_refus': 20901050, 'Teint_Dans_La_Masse': 20901051, 'metal': 20901052, 'plastique': 20901053, 'kraft': 20901054, 'Carton_brun': 20901055, 'papier': 20901056}]} input_args_next_step : {20901042: ()} output_args : {20901042: [{'mal_croppe': 20901045, 'environnement': 20901046, 'flou': 20901047, 'Carton_gris': 20901048, 'cartonnette': 20901049, 'autre_refus': 20901050, 'Teint_Dans_La_Masse': 20901051, 'metal': 20901052, 'plastique': 20901053, 'kraft': 20901054, 'Carton_brun': 20901055, 'papier': 20901056}]} args : 20901042 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 : ({'mal_croppe': 20901045, 'environnement': 20901046, 'flou': 20901047, 'Carton_gris': 20901048, 'cartonnette': 20901049, 'autre_refus': 20901050, 'Teint_Dans_La_Masse': 20901051, 'metal': 20901052, 'plastique': 20901053, 'kraft': 20901054, 'Carton_brun': 20901055, 'papier': 20901056},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20901042) 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([20901042]) 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.3285715579986572 time spend to save output : 7.152557373046875e-05 total time spend for step 3 : 0.3286430835723877 step4:send_mail_cod Fri Feb 28 00:36: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 : {1340018280: ('0.09983636831665117',), 1340018275: ('0.09983636831665117',), 1340018271: ('0.09983636831665117',), 1340018247: ('0.09983636831665117',), 1340018242: ('0.09983636831665117',), 1340018238: ('0.09983636831665117',), 1340018233: ('0.09983636831665117',), 1340018230: ('0.09983636831665117',), 1340018225: ('0.09983636831665117',)} input_args_next_step : {1340018280: ()} output_args : {1340018280: ('0.09983636831665117',), 1340018275: ('0.09983636831665117',), 1340018271: ('0.09983636831665117',), 1340018247: ('0.09983636831665117',), 1340018242: ('0.09983636831665117',), 1340018238: ('0.09983636831665117',), 1340018233: ('0.09983636831665117',), 1340018230: ('0.09983636831665117',), 1340018225: ('0.09983636831665117',)} args : 1340018280 depend.output_id : 0 input_args_next_step : {1340018280: ('0.09983636831665117',), 1340018275: ()} output_args : {1340018280: ('0.09983636831665117',), 1340018275: ('0.09983636831665117',), 1340018271: ('0.09983636831665117',), 1340018247: ('0.09983636831665117',), 1340018242: ('0.09983636831665117',), 1340018238: ('0.09983636831665117',), 1340018233: ('0.09983636831665117',), 1340018230: ('0.09983636831665117',), 1340018225: ('0.09983636831665117',)} args : 1340018275 depend.output_id : 0 input_args_next_step : {1340018280: ('0.09983636831665117',), 1340018275: ('0.09983636831665117',), 1340018271: ()} output_args : {1340018280: ('0.09983636831665117',), 1340018275: ('0.09983636831665117',), 1340018271: ('0.09983636831665117',), 1340018247: ('0.09983636831665117',), 1340018242: ('0.09983636831665117',), 1340018238: ('0.09983636831665117',), 1340018233: ('0.09983636831665117',), 1340018230: ('0.09983636831665117',), 1340018225: ('0.09983636831665117',)} args : 1340018271 depend.output_id : 0 input_args_next_step : {1340018280: ('0.09983636831665117',), 1340018275: ('0.09983636831665117',), 1340018271: ('0.09983636831665117',), 1340018247: ()} output_args : {1340018280: ('0.09983636831665117',), 1340018275: ('0.09983636831665117',), 1340018271: ('0.09983636831665117',), 1340018247: ('0.09983636831665117',), 1340018242: ('0.09983636831665117',), 1340018238: ('0.09983636831665117',), 1340018233: ('0.09983636831665117',), 1340018230: ('0.09983636831665117',), 1340018225: ('0.09983636831665117',)} args : 1340018247 depend.output_id : 0 input_args_next_step : {1340018280: ('0.09983636831665117',), 1340018275: ('0.09983636831665117',), 1340018271: ('0.09983636831665117',), 1340018247: ('0.09983636831665117',), 1340018242: ()} output_args : {1340018280: ('0.09983636831665117',), 1340018275: ('0.09983636831665117',), 1340018271: ('0.09983636831665117',), 1340018247: ('0.09983636831665117',), 1340018242: ('0.09983636831665117',), 1340018238: ('0.09983636831665117',), 1340018233: ('0.09983636831665117',), 1340018230: ('0.09983636831665117',), 1340018225: ('0.09983636831665117',)} args : 1340018242 depend.output_id : 0 input_args_next_step : {1340018280: ('0.09983636831665117',), 1340018275: ('0.09983636831665117',), 1340018271: ('0.09983636831665117',), 1340018247: ('0.09983636831665117',), 1340018242: ('0.09983636831665117',), 1340018238: ()} output_args : {1340018280: ('0.09983636831665117',), 1340018275: ('0.09983636831665117',), 1340018271: ('0.09983636831665117',), 1340018247: ('0.09983636831665117',), 1340018242: ('0.09983636831665117',), 1340018238: ('0.09983636831665117',), 1340018233: ('0.09983636831665117',), 1340018230: ('0.09983636831665117',), 1340018225: ('0.09983636831665117',)} args : 1340018238 depend.output_id : 0 input_args_next_step : {1340018280: ('0.09983636831665117',), 1340018275: ('0.09983636831665117',), 1340018271: ('0.09983636831665117',), 1340018247: ('0.09983636831665117',), 1340018242: ('0.09983636831665117',), 1340018238: ('0.09983636831665117',), 1340018233: ()} output_args : {1340018280: ('0.09983636831665117',), 1340018275: ('0.09983636831665117',), 1340018271: ('0.09983636831665117',), 1340018247: ('0.09983636831665117',), 1340018242: ('0.09983636831665117',), 1340018238: ('0.09983636831665117',), 1340018233: ('0.09983636831665117',), 1340018230: ('0.09983636831665117',), 1340018225: ('0.09983636831665117',)} args : 1340018233 depend.output_id : 0 input_args_next_step : {1340018280: ('0.09983636831665117',), 1340018275: ('0.09983636831665117',), 1340018271: ('0.09983636831665117',), 1340018247: ('0.09983636831665117',), 1340018242: ('0.09983636831665117',), 1340018238: ('0.09983636831665117',), 1340018233: ('0.09983636831665117',), 1340018230: ()} output_args : {1340018280: ('0.09983636831665117',), 1340018275: ('0.09983636831665117',), 1340018271: ('0.09983636831665117',), 1340018247: ('0.09983636831665117',), 1340018242: ('0.09983636831665117',), 1340018238: ('0.09983636831665117',), 1340018233: ('0.09983636831665117',), 1340018230: ('0.09983636831665117',), 1340018225: ('0.09983636831665117',)} args : 1340018230 depend.output_id : 0 input_args_next_step : {1340018280: ('0.09983636831665117',), 1340018275: ('0.09983636831665117',), 1340018271: ('0.09983636831665117',), 1340018247: ('0.09983636831665117',), 1340018242: ('0.09983636831665117',), 1340018238: ('0.09983636831665117',), 1340018233: ('0.09983636831665117',), 1340018230: ('0.09983636831665117',), 1340018225: ()} output_args : {1340018280: ('0.09983636831665117',), 1340018275: ('0.09983636831665117',), 1340018271: ('0.09983636831665117',), 1340018247: ('0.09983636831665117',), 1340018242: ('0.09983636831665117',), 1340018238: ('0.09983636831665117',), 1340018233: ('0.09983636831665117',), 1340018230: ('0.09983636831665117',), 1340018225: ('0.09983636831665117',)} args : 1340018225 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 : {20901042: [{'mal_croppe': 20901045, 'environnement': 20901046, 'flou': 20901047, 'Carton_gris': 20901048, 'cartonnette': 20901049, 'autre_refus': 20901050, 'Teint_Dans_La_Masse': 20901051, 'metal': 20901052, 'plastique': 20901053, 'kraft': 20901054, 'Carton_brun': 20901055, 'papier': 20901056}]} input_args_next_step : {1340018280: ('0.09983636831665117',), 1340018275: ('0.09983636831665117',), 1340018271: ('0.09983636831665117',), 1340018247: ('0.09983636831665117',), 1340018242: ('0.09983636831665117',), 1340018238: ('0.09983636831665117',), 1340018233: ('0.09983636831665117',), 1340018230: ('0.09983636831665117',), 1340018225: ('0.09983636831665117',), 20901042: ()} output_args : {20901042: [{'mal_croppe': 20901045, 'environnement': 20901046, 'flou': 20901047, 'Carton_gris': 20901048, 'cartonnette': 20901049, 'autre_refus': 20901050, 'Teint_Dans_La_Masse': 20901051, 'metal': 20901052, 'plastique': 20901053, 'kraft': 20901054, 'Carton_brun': 20901055, 'papier': 20901056}]} args : 20901042 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 :10, first value : ('0.09983636831665117',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20901042) 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 (1340018280,1340018275,1340018271,1340018247,1340018242,1340018238,1340018233,1340018230,1340018225) Found this number of photos: 9 ##### Call download_photos : nb_thread : 5 begin to download photo : 1340018225 begin to download photo : 1340018233 begin to download photo : 1340018242 begin to download photo : 1340018271 begin to download photo : 1340018280 download finish for photo 1340018271 begin to download photo : 1340018275 download finish for photo 1340018225 begin to download photo : 1340018230 download finish for photo 1340018280 download finish for photo 1340018242 begin to download photo : 1340018247 download finish for photo 1340018233 begin to download photo : 1340018238 download finish for photo 1340018275 download finish for photo 1340018230 download finish for photo 1340018247 download finish for photo 1340018238 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette209010451740699390/ imagette209010471740699390/ length of list_filenames : 9 ; length of list_pids : 9 ; length of list_args : 9 results_Auto_P20901042_28-02-2025_00_36_30.pdf 20901045 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=20901045 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette209010451740699390 20901047 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=20901047 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette209010471740699390 20901049 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=20901049 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1340018198: '1740699182_2120958_1340017394_8399f92c63707e1b0f64f2a4aee2b7be_rle_crop_3689262020_0.png'} change filename to text .imagette209010491740699390/ imagette209010491740699390/1740699182_2120958_1340017394_8399f92c63707e1b0f64f2a4aee2b7be_rle_crop_3689262020_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/28/6d67fa47767796938cd85e4dfdd1c9b7_42686483.png imagette209010491740699390 20901050 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=20901050 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1340018191: '1740699182_2120958_1340017394_8399f92c63707e1b0f64f2a4aee2b7be_rle_crop_3689262027_0.png', 1340018192: '1740699182_2120958_1340017391_41dc63e201804e6760972e08a374301a_rle_crop_3689262037_0.png', 1340018193: '1740699182_2120958_1340017386_a747f363f08d77d601bbc1151964a83a_rle_crop_3689262072_0.png', 1340018194: '1740699182_2120958_1340017384_c8c4da159b46bb8ad06bdef2855da899_rle_crop_3689262091_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/28/41555e00d8d56fa9314252190f8d137e_19002923.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/28/be2c9a1dc6402f05b395b06da3546798_54104963.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/28/f60c8d1e529cbd03d58f0a1e02947f7a_22525504.png change filename to text .imagette209010501740699390/ imagette209010501740699390/1740699182_2120958_1340017384_c8c4da159b46bb8ad06bdef2855da899_rle_crop_3689262091_0.png.png imagette209010501740699390/1740699182_2120958_1340017391_41dc63e201804e6760972e08a374301a_rle_crop_3689262037_0.png.png imagette209010501740699390/1740699182_2120958_1340017394_8399f92c63707e1b0f64f2a4aee2b7be_rle_crop_3689262027_0.png.png imagette209010501740699390/1740699182_2120958_1340017386_a747f363f08d77d601bbc1151964a83a_rle_crop_3689262072_0.png.png imagette209010521740699390/ wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/28/03c93b98d981cb6b2cc2fbc680b67427_54352563.png imagette209010501740699390 20901052 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=20901052 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette209010521740699390 20901053 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=20901053 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1340018305: '1740699293_2122144_1340017456_b53a5cd8163befb61c87a9f896935f03_rle_crop_3689262375_0.png'} change filename to text .imagette209010531740699390/ imagette209010531740699390/1740699293_2122144_1340017456_b53a5cd8163befb61c87a9f896935f03_rle_crop_3689262375_0.png.png imagette209010541740699390/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/28/d69b45f5a1598d937d4adaa5712b02cf_89111197.png imagette209010531740699390 20901054 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=20901054 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette209010541740699390 20901048 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=20901048 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1340018196: '1740699182_2120958_1340017394_8399f92c63707e1b0f64f2a4aee2b7be_rle_crop_3689262018_0.png', 1340018298: '1740699293_2122144_1340017460_672869406ef3a9431fb8da8d3d1a6170_rle_crop_3689262344_0.png', 1340018299: '1740699293_2122144_1340017460_672869406ef3a9431fb8da8d3d1a6170_rle_crop_3689262347_0.png', 1340018309: '1740699312_2122381_1340018020_22e9f95458765a4c8b8849b34cb84157_rle_crop_3689262386_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/28/f446778f1630e10e250462d399c7e449_83133194.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/28/7b9aaf4c7cb931387c59711eccc45831_16713118.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/28/0cf9242f06df4a10ab459446f8298964_94726392.png change filename to text .imagette209010481740699390/ imagette209010481740699390/1740699293_2122144_1340017460_672869406ef3a9431fb8da8d3d1a6170_rle_crop_3689262344_0.png.png imagette209010481740699390/1740699182_2120958_1340017394_8399f92c63707e1b0f64f2a4aee2b7be_rle_crop_3689262018_0.png.png imagette209010481740699390/1740699293_2122144_1340017460_672869406ef3a9431fb8da8d3d1a6170_rle_crop_3689262347_0.png.png imagette209010481740699390/1740699312_2122381_1340018020_22e9f95458765a4c8b8849b34cb84157_rle_crop_3689262386_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/28/bd0bbfd39149830d0bd49943acba1f5d_50080205.png imagette209010481740699390 20901051 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=20901051 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1340018178: '1740699182_2120958_1340017391_41dc63e201804e6760972e08a374301a_rle_crop_3689262040_0.png', 1340018180: '1740699182_2120958_1340017391_41dc63e201804e6760972e08a374301a_rle_crop_3689262048_0.png', 1340018182: '1740699182_2120958_1340017386_a747f363f08d77d601bbc1151964a83a_rle_crop_3689262079_0.png', 1340018184: '1740699182_2120958_1340017384_c8c4da159b46bb8ad06bdef2855da899_rle_crop_3689262103_0.png', 1340018295: '1740699293_2122144_1340017457_2b12d4bd01e6896e897c26aa45cf6779_rle_crop_3689262356_0.png', 1340018296: '1740699293_2122144_1340017456_b53a5cd8163befb61c87a9f896935f03_rle_crop_3689262376_0.png', 1340018308: '1740699312_2122381_1340017750_dc0bf204a31ce42f22a148db672dbe15_rle_crop_3689262412_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/28/71a3bd085195b128903684f5ab3d57e4_27438183.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/28/f107c140cf7daa4662e23a558cbae97e_89186964.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/28/e50e90d6c22adf09fa770bf920c476c1_22263996.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/28/21fb72843eed7619e809aed1b8dc54ab_88381852.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/28/f448f1feec0502c012d99c4c6ae05069_76431538.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/28/b7462847eb4def4e610830188018f85b_90557177.png change filename to text .imagette209010511740699390/ imagette209010511740699390/1740699312_2122381_1340017750_dc0bf204a31ce42f22a148db672dbe15_rle_crop_3689262412_0.png.png imagette209010511740699390/1740699182_2120958_1340017384_c8c4da159b46bb8ad06bdef2855da899_rle_crop_3689262103_0.png.png imagette209010511740699390/1740699182_2120958_1340017386_a747f363f08d77d601bbc1151964a83a_rle_crop_3689262079_0.png.png imagette209010511740699390/1740699293_2122144_1340017456_b53a5cd8163befb61c87a9f896935f03_rle_crop_3689262376_0.png.png imagette209010511740699390/1740699293_2122144_1340017457_2b12d4bd01e6896e897c26aa45cf6779_rle_crop_3689262356_0.png.png imagette209010511740699390/1740699182_2120958_1340017391_41dc63e201804e6760972e08a374301a_rle_crop_3689262048_0.png.png imagette209010511740699390/1740699182_2120958_1340017391_41dc63e201804e6760972e08a374301a_rle_crop_3689262040_0.png.png wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/28/a3b3b74abfcd1fc88f7a45ce8003b764_90029941.png imagette209010511740699390 20901055 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=20901055 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1340018214: '1740699182_2120958_1340017394_8399f92c63707e1b0f64f2a4aee2b7be_rle_crop_3689262025_0.png', 1340018215: '1740699182_2120958_1340017391_41dc63e201804e6760972e08a374301a_rle_crop_3689262046_0.png', 1340018216: '1740699182_2120958_1340017388_d1d5ce66a8ee9b4502c06ff7c065988e_rle_crop_3689262061_0.png', 1340018217: '1740699182_2120958_1340017388_d1d5ce66a8ee9b4502c06ff7c065988e_rle_crop_3689262058_0.png', 1340018218: '1740699182_2120958_1340017386_a747f363f08d77d601bbc1151964a83a_rle_crop_3689262077_0.png', 1340018219: '1740699182_2120958_1340017384_c8c4da159b46bb8ad06bdef2855da899_rle_crop_3689262101_0.png', 1340018303: '1740699293_2122144_1340017457_2b12d4bd01e6896e897c26aa45cf6779_rle_crop_3689262354_0.png', 1340018304: '1740699293_2122144_1340017456_b53a5cd8163befb61c87a9f896935f03_rle_crop_3689262374_0.png', 1340018312: '1740699312_2122381_1340017938_f6851dbc972deea7732d9aa33541f0c5_rle_crop_3689262397_0.png', 1340018313: '1740699312_2122381_1340017938_f6851dbc972deea7732d9aa33541f0c5_rle_crop_3689262398_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/28/4911acc7d53013821e22c4989650c317_60476773.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/28/03123405fd4b2db13ee5014551fa911f_64138173.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/28/ed4fb50456daeea49e310e2fd66af466_59324118.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/28/1b08391e1bb987569faba12cca0e8de3_29917608.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/28/f283200c61a7d9d1caf6e993ad278881_28628141.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/28/0e63f3ebdbda7666fc344015b775ebfb_87300023.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/28/7d0d29da13c783bebb42899bdf4482c0_40524702.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/28/5414de330797d23391248c1fd8838f8f_10318168.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/28/abcee56271b896e715df49ad3cbbc1e8_36613510.png change filename to text .imagette209010551740699391/ imagette209010551740699391/1740699312_2122381_1340017938_f6851dbc972deea7732d9aa33541f0c5_rle_crop_3689262398_0.png.png imagette209010551740699391/1740699182_2120958_1340017386_a747f363f08d77d601bbc1151964a83a_rle_crop_3689262077_0.png.png imagette209010551740699391/1740699182_2120958_1340017391_41dc63e201804e6760972e08a374301a_rle_crop_3689262046_0.png.png imagette209010551740699391/1740699312_2122381_1340017938_f6851dbc972deea7732d9aa33541f0c5_rle_crop_3689262397_0.png.png imagette209010551740699391/1740699293_2122144_1340017456_b53a5cd8163befb61c87a9f896935f03_rle_crop_3689262374_0.png.png imagette209010551740699391/1740699293_2122144_1340017457_2b12d4bd01e6896e897c26aa45cf6779_rle_crop_3689262354_0.png.png imagette209010551740699391/1740699182_2120958_1340017384_c8c4da159b46bb8ad06bdef2855da899_rle_crop_3689262101_0.png.png imagette209010551740699391/1740699182_2120958_1340017388_d1d5ce66a8ee9b4502c06ff7c065988e_rle_crop_3689262061_0.png.png imagette209010551740699391/1740699182_2120958_1340017394_8399f92c63707e1b0f64f2a4aee2b7be_rle_crop_3689262025_0.png.png imagette209010551740699391/1740699182_2120958_1340017388_d1d5ce66a8ee9b4502c06ff7c065988e_rle_crop_3689262058_0.png.png wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/28/4f3a36c7bc17a29ada7bd65d648a57db_17364850.png imagette209010551740699391 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=20901042 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/20901057,20901058,20901059,20901060,20901061,20901062,20901063,20901064,20901065,20901066,20901067,20901068?tags=mal_croppe,environnement,flou,Carton_gris,cartonnette,autre_refus,Teint_Dans_La_Masse,metal,plastique,kraft,Carton_brun,papier your option no_mail is active, we will not send the real mail to your client args[1340018280] : ('0.09983636831665117',) no score found for photo 1340018280 We are sending mail with results at report@fotonower.com args[1340018275] : ('0.09983636831665117',) no score found for photo 1340018275 We are sending mail with results at report@fotonower.com args[1340018271] : ('0.09983636831665117',) no score found for photo 1340018271 We are sending mail with results at report@fotonower.com args[1340018247] : ('0.09983636831665117',) no score found for photo 1340018247 We are sending mail with results at report@fotonower.com args[1340018242] : ('0.09983636831665117',) no score found for photo 1340018242 We are sending mail with results at report@fotonower.com args[1340018238] : ('0.09983636831665117',) no score found for photo 1340018238 We are sending mail with results at report@fotonower.com args[1340018233] : ('0.09983636831665117',) no score found for photo 1340018233 We are sending mail with results at report@fotonower.com args[1340018230] : ('0.09983636831665117',) no score found for photo 1340018230 We are sending mail with results at report@fotonower.com args[1340018225] : ('0.09983636831665117',) no score found for photo 1340018225 We are sending mail with results at report@fotonower.com refus_total : 0.09983636831665117 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=20901042 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_P20901042_28-02-2025_00_36_30.pdf results_Auto_P20901042_28-02-2025_00_36_30.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20901042_28-02-2025_00_36_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','20901042','results_Auto_P20901042_28-02-2025_00_36_30.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20901042_28-02-2025_00_36_30.pdf','pdf','','0.19','0.09983636831665117') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20901042]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1340018280, 1340018275, 1340018271, 1340018247, 1340018242, 1340018238, 1340018233, 1340018230, 1340018225] map_info['map_portfolio_photo'] : {20901042: [1340018280, 1340018275, 1340018271, 1340018247, 1340018242, 1340018238, 1340018233, 1340018230, 1340018225, 1340018025, 1340018020, 1340017938, 1340017750, 1340017464, 1340017462, 1340017460, 1340017457, 1340017456, 1340017394, 1340017391, 1340017388, 1340017386, 1340017384]} final : False mtd_id 4302 list_pids : [1340018280, 1340018275, 1340018271, 1340018247, 1340018242, 1340018238, 1340018233, 1340018230, 1340018225] 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, '2621470') ('4302', '20901042', '1340018280', None, None, None, None, None, '2621470') ('4302', None, None, None, None, None, None, None, '2621470') ('4302', '20901042', '1340018275', None, None, None, None, None, '2621470') ('4302', None, None, None, None, None, None, None, '2621470') ('4302', '20901042', '1340018271', None, None, None, None, None, '2621470') ('4302', None, None, None, None, None, None, None, '2621470') ('4302', '20901042', '1340018247', None, None, None, None, None, '2621470') ('4302', None, None, None, None, None, None, None, '2621470') ('4302', '20901042', '1340018242', None, None, None, None, None, '2621470') ('4302', None, None, None, None, None, None, None, '2621470') ('4302', '20901042', '1340018238', None, None, None, None, None, '2621470') ('4302', None, None, None, None, None, None, None, '2621470') ('4302', '20901042', '1340018233', None, None, None, None, None, '2621470') ('4302', None, None, None, None, None, None, None, '2621470') ('4302', '20901042', '1340018230', None, None, None, None, None, '2621470') ('4302', None, None, None, None, None, None, None, '2621470') ('4302', '20901042', '1340018225', None, None, None, None, None, '2621470') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 9 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', '20901042', '1340018280', None, None, None, None, None, '2621470'), ('4302', '20901042', '1340018275', None, None, None, None, None, '2621470'), ('4302', '20901042', '1340018271', None, None, None, None, None, '2621470'), ('4302', '20901042', '1340018247', None, None, None, None, None, '2621470'), ('4302', '20901042', '1340018242', None, None, None, None, None, '2621470'), ('4302', '20901042', '1340018238', None, None, None, None, None, '2621470'), ('4302', '20901042', '1340018233', None, None, None, None, None, '2621470'), ('4302', '20901042', '1340018230', None, None, None, None, None, '2621470'), ('4302', '20901042', '1340018225', None, None, None, None, None, '2621470')] time used for this insertion : 0.17473912239074707 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.127208948135376 time spend to save output : 0.17500805854797363 total time spend for step 4 : 3.3022170066833496 step5:split_time_score Fri Feb 28 00:36: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 : ['20901042'] 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 : [('20901042',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20901042) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1340018280: {'path': 'temp/1740699390_2105316_1340018280_20cb31ebb9d27745f187195661e66a1e.jpg', 'extension': 'jpg'}, 1340018271: {'path': 'temp/1740699390_2105316_1340018271_1f0e6298fd485af27110b308b5062017.jpg', 'extension': 'jpg'}, 1340018275: {'path': 'temp/1740699390_2105316_1340018275_6628d6513c60f560eeb2e0901a8349f3.jpg', 'extension': 'jpg'}, 1340018225: {'path': 'temp/1740699390_2105316_1340018225_d1c592465efb802ec9c685b3ba3bc0f0.jpg', 'extension': 'jpg'}, 1340018230: {'path': 'temp/1740699390_2105316_1340018230_c959ac30aea510b6cf7ac61120556370.jpg', 'extension': 'jpg'}, 1340018242: {'path': 'temp/1740699390_2105316_1340018242_380da3fe49f84b07c1fbc84efb03ef46.jpg', 'extension': 'jpg'}, 1340018247: {'path': 'temp/1740699390_2105316_1340018247_c062a7ed803b7b3310cc2ca827f438cd.jpg', 'extension': 'jpg'}, 1340018233: {'path': 'temp/1740699390_2105316_1340018233_3bc9594640537a84e6acdef13fdb876f.jpg', 'extension': 'jpg'}, 1340018238: {'path': 'temp/1740699390_2105316_1340018238_fd9e809d41105408a554f7de57a10825.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 = 20901042; (('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 = 20901042 group by h (('00', 23),) 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=20901042 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 (20901042) 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 (20901042) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 28022025 20901042 Nombre de photos uploadées : 23 / 23040 (0%) 28022025 20901042 Nombre de photos taguées (types de déchets): 0 / 23 (0%) 28022025 20901042 Nombre de photos taguées (volume) : 0 / 23 (0%) [{'photo_id': 1340017394, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/28/8399f92c63707e1b0f64f2a4aee2b7be.jpg', 'username': None, 'uploaded_at': 1740699071, 'text': 'image_28022025_00_30_04_10164.jpg'}, {'photo_id': 1340017391, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/28/41dc63e201804e6760972e08a374301a.jpg', 'username': None, 'uploaded_at': 1740699071, 'text': 'image_28022025_00_30_14_10139.jpg'}, {'photo_id': 1340017388, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/28/d1d5ce66a8ee9b4502c06ff7c065988e.jpg', 'username': None, 'uploaded_at': 1740699071, 'text': 'image_28022025_00_30_25_10135.jpg'}, {'photo_id': 1340017386, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/28/a747f363f08d77d601bbc1151964a83a.jpg', 'username': None, 'uploaded_at': 1740699071, 'text': 'image_28022025_00_30_34_9133.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.9073486328125e-06 elapsed_time : order_list_meta_photo_and_scores 4.5299530029296875e-06 ??????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0024912357330322266 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 20901042, '2025-02-28' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1629471,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.10247516632080078 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= 1629471 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1629471, 'dashboard_run_id': 1636979, 'mtr_portfolio_id': 20900111, 'dashboard_result_id': 9115766, '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_P20900111_28-02-2025_00_19_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20900115, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20900116, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20900117, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20900118, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20900119, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20900120, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20900121, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20900122, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20900123, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20900124, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20900125, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20900126, 'pht': 3726}}"}, {'dashboat_entry_day': 1629471, 'dashboard_run_id': 1636979, 'mtr_portfolio_id': 20900621, 'dashboard_result_id': 9115767, '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_P20900621_28-02-2025_00_32_29.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20900647, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20900648, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20900649, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20900650, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20900651, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20900652, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20900653, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20900654, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20900655, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20900656, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20900657, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20900658, 'pht': 3726}}"}, {'dashboat_entry_day': 1629471, 'dashboard_run_id': 1636979, 'mtr_portfolio_id': 20901042, 'dashboard_result_id': 9115768, '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_P20901042_28-02-2025_00_35_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20901045, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20901046, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20901047, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20901048, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20901049, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20901050, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20901051, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20901052, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20901053, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20901054, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20901055, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20901056, '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 = 20900111 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': 2621406, 'mtr_portfolio_id': 20900111, 'created_at': datetime.datetime(2025, 2, 28, 0, 19), 'result': '0.09491327279360236', 'result_long': None, 'result_double': None}] Qualite : 0.09491327279360236 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20900111 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20900111_28-02-2025_00_19_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20900111 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_P20900111_28-02-2025_00_19_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20900115, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20900116, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20900117, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20900118, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20900119, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20900120, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20900121, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20900122, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20900123, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20900124, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20900125, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20900126, 'pht': 3726}}" where mtr_portfolio_id = 20900111 and dashboard_run_id = 1636979 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`=20900111 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9115766, 0.09491327279360236, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20900111_28-02-2025_00_19_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20900115, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20900116, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20900117, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20900118, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20900119, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20900120, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20900121, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20900122, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20900123, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20900124, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20900125, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20900126, '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 = 20900621 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': 2621440, 'mtr_portfolio_id': 20900621, 'created_at': datetime.datetime(2025, 2, 28, 0, 32, 29), 'result': '0.10604364967055017', 'result_long': None, 'result_double': None}] Qualite : 0.10604364967055017 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20900621 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20900621_28-02-2025_00_32_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20900621 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_P20900621_28-02-2025_00_32_29.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20900647, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20900648, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20900649, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20900650, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20900651, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20900652, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20900653, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20900654, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20900655, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20900656, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20900657, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20900658, 'pht': 3726}}" where mtr_portfolio_id = 20900621 and dashboard_run_id = 1636979 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`=20900621 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9115767, 0.10604364967055017, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20900621_28-02-2025_00_32_29.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20900647, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20900648, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20900649, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20900650, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20900651, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20900652, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20900653, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20900654, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20900655, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20900656, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20900657, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20900658, '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 = 20901042 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': 2621470, 'mtr_portfolio_id': 20901042, 'created_at': datetime.datetime(2025, 2, 28, 0, 36, 29), 'result': '0.09983636831665117', 'result_long': None, 'result_double': None}] Qualite : 0.09983636831665117 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20901042 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20901042_28-02-2025_00_36_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20901042 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_P20901042_28-02-2025_00_36_30.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20901045, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20901046, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20901047, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20901048, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20901049, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20901050, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20901051, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20901052, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20901053, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20901054, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20901055, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20901056, 'pht': 3726}}" where mtr_portfolio_id = 20901042 and dashboard_run_id = 1636979 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`=20901042 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9115768, 0.09983636831665117, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20901042_28-02-2025_00_36_30.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20901045, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20901046, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20901047, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20901048, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20901049, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20901050, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20901051, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20901052, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20901053, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20901054, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20901055, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20901056, '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 (20900111,20900621,20901042) result : ((1340013836,), (1340013838,), (1340013840,), (1340014045,), (1340014049,), (1340014053,), (1340014058,), (1340014063,), (1340014110,), (1340014114,), (1340014116,), (1340014122,), (1340014126,), (1340014135,), (1340014180,), (1340014184,), (1340014188,), (1340014191,), (1340014227,), (1340014232,), (1340014237,), (1340014243,), (1340014251,), (1340015073,), (1340015079,), (1340015082,), (1340015086,), (1340015090,), (1340015358,), (1340015369,), (1340015401,), (1340015421,), (1340015426,), (1340015456,), (1340015466,), (1340015476,), (1340015481,), (1340015486,), (1340015492,), (1340015537,), (1340015543,), (1340015549,), (1340015593,), (1340015606,), (1340015611,), (1340015615,), (1340015659,), (1340015737,), (1340015742,), (1340015748,), (1340015755,), (1340015759,), (1340015808,), (1340015813,), (1340015818,), (1340015858,), (1340015862,), (1340015866,), (1340015870,), (1340015874,), (1340015882,), (1340015924,), (1340015934,), (1340015939,), (1340015945,), (1340015950,), (1340015975,), (1340015981,), (1340015986,), (1340015989,), (1340016136,), (1340016046,), (1340016050,), (1340016054,), (1340016112,), (1340016130,), (1340016481,), (1340016497,), (1340016502,), (1340016507,), (1340016517,), (1340016558,), (1340016562,), (1340016600,), (1340016604,), (1340016608,), (1340016613,), (1340016619,), (1340016665,), (1340016667,), (1340016670,), (1340016674,), (1340016677,), (1340016790,), (1340016794,), (1340016798,), (1340016803,), (1340016846,), (1340016850,), (1340016853,), (1340016856,), (1340016859,), (1340016896,), (1340016903,), (1340016918,), (1340016959,), (1340016963,), (1340016967,), (1340016971,), (1340016975,), (1340017011,), (1340017012,), (1340017014,), (1340017017,), (1340017021,), (1340017030,), (1340017094,), (1340017107,), (1340017111,), (1340017115,), (1340017119,), (1340017147,), (1340017149,), (1340017153,), (1340017157,), (1340017222,), (1340017232,), (1340017243,), (1340017248,), (1340017251,), (1340017282,), (1340017283,), (1340017285,), (1340017287,), (1340017290,), (1340017294,), (1340017336,), (1340017339,), (1340017399,), (1340017384,), (1340017386,), (1340017388,), (1340017391,), (1340017394,), (1340017456,), (1340017457,), (1340017460,), (1340017462,), (1340017464,), (1340017750,), (1340017938,), (1340018020,), (1340018025,), (1340018225,), (1340018230,), (1340018233,), (1340018238,), (1340018242,), (1340018247,), (1340018271,), (1340018275,), (1340018280,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'28022025': {'nb_upload': 23, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20901042]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1340018280, 1340018275, 1340018271, 1340018247, 1340018242, 1340018238, 1340018233, 1340018230, 1340018225] map_info['map_portfolio_photo'] : {20901042: [1340018280, 1340018275, 1340018271, 1340018247, 1340018242, 1340018238, 1340018233, 1340018230, 1340018225, 1340018025, 1340018020, 1340017938, 1340017750, 1340017464, 1340017462, 1340017460, 1340017457, 1340017456, 1340017394, 1340017391, 1340017388, 1340017386, 1340017384]} final : True mtd_id 4302 list_pids : [1340018280, 1340018275, 1340018271, 1340018247, 1340018242, 1340018238, 1340018233, 1340018230, 1340018225] Looping around the photos to save general results len do output : 1 /20901042Didn'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, '2621470') ('4302', '20901042', '1340018280', None, None, None, None, None, '2621470') ('4302', None, None, None, None, None, None, None, '2621470') ('4302', '20901042', '1340018275', None, None, None, None, None, '2621470') ('4302', None, None, None, None, None, None, None, '2621470') ('4302', '20901042', '1340018271', None, None, None, None, None, '2621470') ('4302', None, None, None, None, None, None, None, '2621470') ('4302', '20901042', '1340018247', None, None, None, None, None, '2621470') ('4302', None, None, None, None, None, None, None, '2621470') ('4302', '20901042', '1340018242', None, None, None, None, None, '2621470') ('4302', None, None, None, None, None, None, None, '2621470') ('4302', '20901042', '1340018238', None, None, None, None, None, '2621470') ('4302', None, None, None, None, None, None, None, '2621470') ('4302', '20901042', '1340018233', None, None, None, None, None, '2621470') ('4302', None, None, None, None, None, None, None, '2621470') ('4302', '20901042', '1340018230', None, None, None, None, None, '2621470') ('4302', None, None, None, None, None, None, None, '2621470') ('4302', '20901042', '1340018225', None, None, None, None, None, '2621470') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 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, '20901042', 'None', None, None, None, None, '2621470'), ('4302', '20901042', '1340018280', None, None, None, None, None, '2621470'), ('4302', '20901042', '1340018275', None, None, None, None, None, '2621470'), ('4302', '20901042', '1340018271', None, None, None, None, None, '2621470'), ('4302', '20901042', '1340018247', None, None, None, None, None, '2621470'), ('4302', '20901042', '1340018242', None, None, None, None, None, '2621470'), ('4302', '20901042', '1340018238', None, None, None, None, None, '2621470'), ('4302', '20901042', '1340018233', None, None, None, None, None, '2621470'), ('4302', '20901042', '1340018230', None, None, None, None, None, '2621470'), ('4302', '20901042', '1340018225', None, None, None, None, None, '2621470')] time used for this insertion : 0.016864538192749023 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.40729784965515137 time spend to save output : 0.01712965965270996 total time spend for step 5 : 0.42442750930786133 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 (2621470) 2.42user 1.97system 0:08.29elapsed 53%CPU (0avgtext+0avgdata 160432maxresident)k 8608inputs+10832outputs (70major+78952minor)pagefaults 0swaps