Skip to content

luz

Higher Level 'API' for 'torch'

v0.5.2 · Apr 28, 2026 · MIT + file LICENSE

Description

A high level interface for 'torch' providing utilities to reduce the the amount of code needed for common tasks, abstract away torch details and make the same code work on both the 'CPU' and 'GPU'. It's flexible enough to support expressing a large range of models. It's heavily inspired by 'fastai' by Howard et al. (2020) <doi:10.48550/arXiv.2002.04688>, 'Keras' by Chollet et al. (2015) and 'PyTorch Lightning' by Falcon et al. (2019) <doi:10.5281/zenodo.3828935>.

Downloads

CRAN

2K

Last 30 days

2777th

9.8K

Last 90 days

41.4K

Last year

Trend: -23.7% (30d vs prior 30d)

r2u CRAN

70

Last 30 days

176

Last 90 days

425

Last year

Trend: +18.6% (30d vs prior 30d)

autoCRAN

5

Last 7 days

20

Last 30 days

2

All-time

autoCRAN-only: this name is served only by autoCRAN, so the count is exact.

conda-forge CRAN

76

Last 30 days

337

Last 90 days

1.3K

Last year

Trend: -41.5% (30d vs prior 30d)

CRAN Check Status

13 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Code

Structure

Lines of code

10,664

Files

123

Compiled share

0%

Has compiled src

No

Language breakdown

R 4,249 (39.8%)Tests 3,037 (28.5%)Docs 2,913 (27.3%)Vignettes 465 (4.4%)

API

Exported functions

44

Internal functions

78

Recent export changes

v0.5.0+1 luz_callback_mixed_precision
v0.4.0+5 luz_callback_auto_resume, luz_callback_resume_from_checkpoint, luz_callback_tfevents +2 more

Testing & CI

Has tests

Yes

Test-to-code ratio

0.76

testthat edition

3

CI present

No

CI type

[]

PR gated

No

Docs

Return-value doc rate

57.1%

\dontrun example ratio

0%

Roxygen coverage

97.7%

Has pkgdown

No

NEWS present

Yes

Health & Security signals

Informational signals; not verdicts.

on.exit coverage

0%

Unsafe pattern score

6

Dep constraint coverage

15.4%

Secret pattern count

0

Bundled 3rd-party code

2 items

Portability & License

Min R version

System requirements

C++ standard

License

MIT + file LICENSE

License flags

SPDX valid, OSI approved

History

Versions

8

First release

2021-06-17

Latest release

2026-04-28

Avg cadence

180 days

Cold removal rate

Dep drift

1

LOC over versions

v0.1.0: 6,855 LOCv0.2.0: 8,980 LOCv0.3.0: 9,763 LOCv0.3.1: 9,763 LOCv0.4.0: 11,273 LOCv0.5.0: 10,626 LOCv0.5.1: 10,656 LOCv0.5.2: 10,664 LOC

Per-file churn detail lives in the source pipeline: https://github.com/r-observatory/cran-code-metrics.

Reverse Dependencies (8)

imports

Dependency Network

Dependencies Reverse dependencies torch magrittr zeallot rlang coro glue progress R6 generics purrr fs prettyunits cli NNMoMo deepImp sits bundle genderBR innsight nn2poly vetiver luz

Version History

9 tracked
updated 0.5.2 ← 0.5.1 diff Apr 28, 2026
new 0.5.1 Mar 10, 2026
updated 0.5.1 ← 0.5.0 diff Oct 29, 2025
updated 0.5.0 ← 0.4.0 diff Jul 28, 2025
updated 0.4.0 ← 0.3.1 diff Apr 16, 2023
updated 0.3.1 ← 0.3.0 diff Sep 5, 2022
updated 0.3.0 ← 0.2.0 diff Aug 18, 2022
updated 0.2.0 ← 0.1.0 diff Oct 6, 2021
new 0.1.0 Jun 16, 2021