Skip to content
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

high-performance {tabnet} profvis on CPU #79

Open
cregouby opened this issue Jan 31, 2022 · 0 comments
Open

high-performance {tabnet} profvis on CPU #79

cregouby opened this issue Jan 31, 2022 · 0 comments
Labels
wontfix This will not be worked on

Comments

@cregouby
Copy link
Collaborator

cregouby commented Jan 31, 2022

This issue aims at improving tabnet performance through common tools and understanding of where to put effort on

proposed performance script

The goal here is to have the largest batch available to run on a CPU, in order to favor time spent in compute over time spent in data movement.

library(tabnet)

# use local caching
d_train <- data.table::fread(pins::pin("https://s3.amazonaws.com/benchm-ml--main/train-0.1m.csv"), stringsAsFactors=TRUE)
d_test <- data.table::fread(pins::pin("https://s3.amazonaws.com/benchm-ml--main/test.csv"))

## align cat. values (factors)
d_train_test <- rbind(d_train, d_test)
n1 <- nrow(d_train)
n2 <- nrow(d_test)
d_train <- d_train_test[1:n1,]
d_test <- d_train_test[(n1+1):(n1+n2),]


system.time({
  md <- tabnet_fit(dep_delayed_15min ~ . ,d_train, device="cpu",
                   epochs = 5, batch_size = 1024^2,
                   virtual_batch_size=262144, verbose = TRUE)
})

result table proposed

CPU Linux

Actual CPU profile Expected CPU profile Actual profvis flame graph
image image !!image

Profviz Data

image

CPU Windows

Actual CPU profile Expected CPU profile Actual profvis flame graph

Profviz Data

CPU MacOS

Actual CPU profile Expected CPU profile Actual profvis flame graph

Profviz Data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant