mlr-org / mlr3misc

Miscellaneous helper functions for mlr3
https://mlr3misc.mlr-org.com
GNU Lesser General Public License v3.0
12 stars 3 forks source link

feat(calculate_hash): allow to customize hash input #98

Closed sebffischer closed 10 months ago

sebffischer commented 10 months ago

In mlr3torch, there are somewhat complicated "tensor-columns" that reference environments. Because the DataBackend hashes the whole data.table, this can lead to problems because of byte-code compilation (https://github.com/mlr-org/mlr3/blob/78ad4dd439bdc7ebfa2ca327eb6cb6e08c424e16/R/DataBackendDataTable.R#L159C24-L159C54).

By merging this PR, it is possible to customize which information from a column is used to calculate the hash.

sebffischer commented 10 months ago