This is an example search with Kerastuner:

  

      github.com/keras-team/autokeras
  

  
    
  
	  
  

  
    
      F1 score support for objective 10
    

    
      
        opened 
        
          
        
        Dec 24, 2019
      
      

        
          closed 
        
          
        
        Jul 28, 2020
      
        

      
        
          
          alexcombessie
        
      
    

    
        bug report
        pinned
    
  


  
    Today objective = "val_f1" returns an error
Failed to train : <class 'ValueErro…r'> : Could not infer optimization direction ("min" or "max") for unknown metric "val_f1". Please specify the objective asa `kerastuner.Objective`, for example `kerastuner.Objective("val_f1", direction="min")`.
  

  

  
    
    
  

  


I think you can try the same with TFA or use the custom impl.