-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Funtion reduceResultsBatchmark saves backend when store_backends=FALSE #18
Comments
Hey @MislavSag. The task is stored, but |
Hi, I don't use |
Do you install packages with the |
I don't use this option. If it't default it TRUE, than I use it. |
Thanks for the info, can you provide a reprex? |
Or instead, can you please show me the output of |
Here is the ouput:
I am nor sure how should I reproduce the problem. I can upload to the cloud sample structure (say 10 results) so you can try to import them. But generaly, it takes lots of time to import results. |
Thanks, this is already helpful. Maybe you can run |
This is what
|
We have run into large RAM usage / slow reduceResultsBatchmark repeatedly with mlr3batchmark so this is also not really due to your specific circumstances. We will try to look into this.The only unusual thing here is the large amount of features. In your case, the task_prototype and data_prototype will definitely make the problem worse, because they are relatively large (reproducing such a data.table creates objects of size ~100KB for me). |
Are you using a GraphLearner? |
Yes, all my learners are graph learners. |
Okay, this problem will hopefully be gone when the new version of paradox (which we use to represent the parameter sets) is done. |
@sebffischer , could you recommend some workaround before new paradox package comes oout ? I hve 16.000 results now and it takes more than a day to import this, even in parallel. |
This depends on what exactly you want to do with the results. library(mlr3verse)
#> Loading required package: mlr3
library(batchtools)
library(mlr3batchmark)
library(mlr3misc)
#>
#> Attaching package: 'mlr3misc'
#> The following object is masked from 'package:batchtools':
#>
#> chunk
reg = makeExperimentRegistry(NA)
#> No readable configuration file found
#> Created registry in '/var/folders/ft/n79895td0xn0gpr6ny8jyh800000gn/T/Rtmpq5etTo/registry1b37547891f5' using cluster functions 'Interactive'
design = benchmark_grid(
tsks(c("iris", "sonar")),
lrns(c("classif.rpart", "classif.featureless")),
rsmp("cv")
)
batchmark(design)
#> Adding algorithm 'run_learner'
#> Adding problem '1c326920b82b400b'
#> Exporting new objects: '6b67bf63ecedae30' ...
#> Exporting new objects: '70dd22724e5c724d' ...
#> Exporting new objects: '7c35d835f3dfae37' ...
#> Adding 20 experiments ('1c326920b82b400b'[1] x 'run_learner'[2] x repls[10]) ...
#> Adding problem '7e770c7dda9c66ef'
#> Exporting new objects: 'c1fa2fa572e6d386' ...
#> Adding 20 experiments ('7e770c7dda9c66ef'[1] x 'run_learner'[2] x repls[10]) ...
submitJobs()
#> Submitting 40 jobs in 40 chunks using cluster functions 'Interactive' ...
job_table = getJobTable()
unique_jobs = unique(job_table$job.name)
measure = msr("classif.acc")
result = map_dtr(unique_jobs, function(job_name) {
ids = job_table[job_name, "job.id", on = "job.name"][[1]]
learner_info = job_table[job_name, "algo.pars", on = "job.name"]$algo.pars[[1]]
task_info = job_table[job_name, "prob.pars", on = "job.name"]$prob.pars[[1]]
task_id = task_info$task_id
task_hash = task_info$task_hash
learner_id = learner_info$learner_id
learner_hash = learner_info$learner_hash
scores = map_dbl(ids, function(id) {
result = loadResult(id)
test_prediction = as_prediction(result$prediction$test)
score = measure$score(test_prediction)
score
})
avg_score = mean(scores)
list(acc = avg_score, learner_id = learner_id, task_id = task_id, learner_hash = learner_hash, task_hash = task_hash)
})
result
#> acc learner_id task_id learner_hash task_hash
#> 1: 0.9333333 classif.rpart iris 70dd22724e5c724d 1c326920b82b400b
#> 2: 0.2333333 classif.featureless iris 7c35d835f3dfae37 1c326920b82b400b
#> 3: 0.7223810 classif.rpart sonar 70dd22724e5c724d 7e770c7dda9c66ef
#> 4: 0.5330952 classif.featureless sonar 7c35d835f3dfae37 7e770c7dda9c66ef Created on 2023-12-18 with reprex v2.0.2 |
I have gound the workaround, that worked till today. Now, when I tried to import tasks from
I get an error
I am not sure if this error is linked to |
you need to load mlr3 for that |
I have loaded |
I have used mlr 17.0 on HPC, and than 17.1. locally. Can that be the source of the error ? |
Yes, this can be the case, as Can you try using the same version and reporting whether it works? (It should) |
It seems that you have created the |
We have now addressed this with a warning message |
hi I have the same issue: reduceResultsBatchmark is taking up too much RAM on my cluster system, which is killing my job. results = batchtools::reduceResultsList(tab$job.id, reg = reg) I see that reduceResultsList has an argument |
Hi again,
I am experimenting with
reduceResultsBatchmark
function.The function consumes lots of RAM's on my local machine, even after setting
store_models=FALSE
andstore_backends=FALSE
. I have looked at source code and it seems it stores task in Result object no meter ofstore_backends=FALSE
argument:It just sets
store_backends
attribute to store_backends, but it saves task inside the object.Is that intentional? I would expect task would not save the backend if the
store_backend
argument is set to FALSE.The text was updated successfully, but these errors were encountered: