Error in sink (sink stack is full)

I have a code for training a model with Keras, this is a part of my code in which I define a search grid to find the best parameters and model.

runs.sp<-tuning_run("keras2_1.R",runs_dir = '_tuningE1',
                      flags=list(dropout1= c(0,0.05),
                                 units = c(u1_1, u2_1, u3_1, u4_1),
                                 activation1=("relu"),
                                 batchsize1=c(8, 16, 24, 32),
                                 Epoch1=c(10,50,100, 300),
                                 learning_rate=c(0.001),
                                 val_split=c(0.2)),sample=1,confirm = FALSE,echo =F)
  
  #####c) Saving each combination of hyperparameters in the Hyperpar data.frame
  runs.sp=runs.sp[order(runs.sp$flag_units,runs.sp$flag_dropout1, runs.sp$flag_batchsize1, runs.sp$flag_Epoch1),]
  runs.sp$grid_length=1:nrow(runs.sp)
  Parameters=data.frame(grid_length=runs.sp$grid_length,
                        metric_val_mse=runs.sp$metric_val_mse,flag_dropout1=runs,
                        sp$flag_dropout1,flag_units=runs.sp$flag_units, flag_batchsize1=runs,
                        sp$flag_batchsize1,epochs_completed=runs.sp$epochs_completed,
                        flag_learning_rate=runs.sp$flag_learning_rate, flag_activation1=runs,
                        sp$flag_activation1)
  Hyperpar=rbind(Hyperpar,data.frame(Parameters)) 
  
  }

#####d) Summarizing the five inner folds by hyperparameter combination
Hyperpar %>%
  group_by(grid_length) %>%
  summarise(val_mse=mean(metric_val_mse),
            dropout1=mean(flag_dropout1), #average of prediction for droupot
            units=mean(flag_units),       #average of prediction for units
            batchsize1=mean(flag_batchsize1), #average of prediction for batch size
            learning_rate=mean(flag_learning_rate),  #average of prediction for learning rate
            epochs=mean( epochs_completed)) %>%      #average of prediction for epoch
  select(grid_length,val_mse,dropout1,units,batchsize1,
         learning_rate, epochs) %>%
  mutate_if(is.numeric, funs(round(., 3))) %>%
  as.data.frame() -> Hyperpar_Opt

but after a couple of training runs I got this error:
Error in sink(file = output_file, type = "output", split = TRUE) : sink stack is full

I have no idea about this error!
Is there anybody who knows how to resolve it?
Thanks

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.