r-lib/cli

cli R package progress bars not showing through progressr handler

Opened this issue · 1 comments

rafev commented

I am having an issue where my progress bar no longer shows. I use the progressr package and use handler("cli") to display the progress bar as a CLI version for the ETA output. This worked perfectly under R v4.2.1 on my M1 mac, but now on v4.3 it does not display at all. Other progress handlers work, except for the CLI version, so I assume it's this version. Any clue what's happening?

handlers(global = TRUE)
handlers("cli")

my_1way.mods = function(modules_being_tested) {
	p = progressor(along = modules_being_tested)
	foreach (i = modules_being_tested) %dopar% {
	    # Run GLMNET
		set.seed(32)
		Net.fit = train(x = train_grp[, module_df[module_df$colors == i, 1]],
						y = train_pheno,
                        method = "glmnet",
                        trControl = cctrl1,
                        metric = "RMSE",
                        tuneGrid = expand.grid(.alpha = seq(.05, 1, length = 15),
                                   		   	   .lambda = seq(0.01, 1, 0.005)))

	        p(sprintf("i=%s", i))
  		
		my_list[[i]] = Net.fit
	}
}

Can you try to create a minimal example that we can run?