I don’t know if it could be related to:

  

      github.com/keras-team/keras-tuner
  

  
    
  
	  
  

  
    
      If override "loss", the original "metrics" will be missing. 11
    

    
      
        opened 
        
          
        
        Nov 2, 2021
      
      


      
        
          
          haifeng-jin
        
      
    

    
        
          bug
        
    
  


  
    **Describe the bug**
Metrics and loss are both defined in hypermodel when compi…ling the model.
If override "loss" when init tuner, the original "metrics" will be missing.

**Expected behavior**
Keep the original metrics.

**Additional context**
The cause of the problem is:

1. `model.metrics` is `[]` before `fit`, no matter what metrics was set by the user.

2. model cannot be compiled multiple times, so overriding compile args have to compile the model with all the args.

3. `model` is recompiled with the empty metric got from `model.metrics`.
  

  

  
    
    
  

  


/cc @haifeng