- using R version 4.5.2 Patched (2026-01-31 r89382)
- using platform: aarch64-apple-darwin20
- R was compiled by
Apple clang version 16.0.0 (clang-1600.0.26.6)
GNU Fortran (GCC) 14.2.0
- running under: macOS Ventura 13.7.8
- using session charset: UTF-8
- checking for file ‘asleep/DESCRIPTION’ ... OK
- this is package ‘asleep’ version ‘0.1.0’
- package encoding: UTF-8
- checking package namespace information ... OK
- checking package dependencies ... OK
- checking if this is a source package ... OK
- checking if there is a namespace ... OK
- checking for executable files ... OK
- checking for hidden files and directories ... OK
- checking for portable file names ... OK
- checking for sufficient/correct file permissions ... OK
- checking whether package ‘asleep’ can be installed ... [1s/1s] OK
See the install log for details.
- checking installed package size ... OK
- checking package directory ... OK
- checking DESCRIPTION meta-information ... OK
- checking top-level files ... OK
- checking for left-over files ... OK
- checking index information ... OK
- checking package subdirectories ... OK
- checking code files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- checking whether the package can be loaded ... [0s/1s] OK
- checking whether the package can be loaded with stated dependencies ... [0s/0s] OK
- checking whether the package can be unloaded cleanly ... [0s/0s] OK
- checking whether the namespace can be loaded with stated dependencies ... [0s/0s] OK
- checking whether the namespace can be unloaded cleanly ... [1s/1s] OK
- checking loading without being on the library search path ... [1s/1s] OK
- checking whether startup messages can be suppressed ... [1s/1s] OK
- checking dependencies in R code ... OK
- checking S3 generic/method consistency ... OK
- checking replacement functions ... OK
- checking foreign function calls ... OK
- checking R code for possible problems ... [2s/2s] OK
- checking Rd files ... [0s/0s] OK
- checking Rd metadata ... OK
- checking Rd cross-references ... OK
- checking for missing documentation entries ... OK
- checking for code/documentation mismatches ... OK
- checking Rd \usage sections ... OK
- checking Rd contents ... OK
- checking for unstated dependencies in examples ... OK
- checking examples ... [1s/1s] OK
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... [205s/155s] ERROR
Running ‘testthat.R’ [205s/155s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
> library(testthat)
> library(asleep)
>
> asleep:::cleanup_uv_lock_files(
+ c(".", tempdir(), dirname(tempdir()))
+ )
> testthat::test_check("asleep")
Downloading uv...Done!
Downloading cpython-3.8.20-macos-aarch64-none (download) (16.6MiB)
Downloaded cpython-3.8.20-macos-aarch64-none (download)
Building antlr4-python3-runtime==4.9.3
Building importlib==1.0.4
Updating https://github.com/muschellij2/asleep.git (HEAD)
Downloading torchvision (1.6MiB)
Downloading networkx (2.0MiB)
Downloading numba (2.5MiB)
Downloading numpy (13.2MiB)
Downloading transforms3d (1.3MiB)
Downloading llvmlite (27.4MiB)
Downloading sympy (5.9MiB)
Downloading fonttools (2.6MiB)
Downloading scipy (27.5MiB)
Downloading matplotlib (7.0MiB)
Downloading torch (59.3MiB)
Downloading pandas (10.2MiB)
Downloading statsmodels (9.6MiB)
Downloading pillow (3.2MiB)
Downloading scikit-learn (7.2MiB)
Built importlib==1.0.4
Built antlr4-python3-runtime==4.9.3
Downloaded transforms3d
Downloaded torchvision
Downloaded fonttools
Downloaded pillow
Building pyyaml==6.0.3
Downloaded networkx
Downloaded numba
Downloaded matplotlib
Downloaded scikit-learn
Downloaded sympy
Downloaded pandas
Downloaded statsmodels
Downloaded llvmlite
Downloaded numpy
Downloaded scipy
Downloaded torch
Updated https://github.com/muschellij2/asleep.git (4916a50c61dfe513a04ab340da3bfc4bd93dc96d)
Building asleep @ git+https://github.com/muschellij2/asleep.git@4916a50c61dfe513a04ab340da3bfc4bd93dc96d
Built asleep @ git+https://github.com/muschellij2/asleep.git@4916a50c61dfe513a04ab340da3bfc4bd93dc96d
Built pyyaml==6.0.3
Installed 50 packages in 840ms
Checking Data
File is:/Volumes/Builds/packages/big-sur-arm64/results/4.5/asleep.Rcheck/asleep/extdata/example_sleep.csv.gz
Downloading models if not already present
Downloading https://github.com/OxWearables/asleep/releases/download/0.4.12/ssl.joblib.lzma...
Saved to /Users/rbuild/Library/Caches/org.R-project.R/R/reticulate/uv/cache/archive-v0/tIllcMppRjudD4na/lib/python3.8/site-packages/asleep/ssl.joblib.lzma
Caching ssl-wearables repository...
Downloading: "https://github.com/OxWearables/ssl-wearables/zipball/v1.0.0" to /Users/rbuild/Library/Caches/org.R-project.R/R/reticulate/uv/cache/archive-v0/tIllcMppRjudD4na/lib/python3.8/site-packages/asleep/torch_hub_cache/v1.0.0.zip
Caching SleepNet repository and weights...
Downloading: "https://github.com/OxWearables/asleep/zipball/main" to /Users/rbuild/Library/Caches/org.R-project.R/R/reticulate/uv/cache/archive-v0/tIllcMppRjudD4na/lib/python3.8/site-packages/asleep/torch_hub_cache/main.zip
Downloading: "https://github.com/OxWearables/asleep/releases/download/0.4.9/sleepnet_apr_16_2024.mdl" to /Users/rbuild/Library/Caches/org.R-project.R/R/reticulate/uv/cache/archive-v0/tIllcMppRjudD4na/lib/python3.8/site-packages/asleep/torch_hub_cache/checkpoints/sleepnet_apr_16_2024.mdl
0%| | 0.00/232M [00:00<?, ?B/s]
3%|▎ | 7.38M/232M [00:00<00:03, 76.6MB/s]
6%|▋ | 14.8M/232M [00:00<00:12, 18.8MB/s]
9%|▊ | 20.1M/232M [00:00<00:11, 20.0MB/s]
12%|█▏ | 27.1M/232M [00:01<00:07, 28.6MB/s]
14%|█▎ | 31.8M/232M [00:01<00:07, 26.7MB/s]
17%|█▋ | 40.1M/232M [00:01<00:06, 29.1MB/s]
22%|██▏ | 50.1M/232M [00:01<00:05, 32.7MB/s]
26%|██▌ | 60.1M/232M [00:02<00:05, 35.1MB/s]
30%|███ | 70.1M/232M [00:02<00:04, 36.6MB/s]
33%|███▎ | 77.1M/232M [00:02<00:03, 41.9MB/s]
35%|███▌ | 81.9M/232M [00:02<00:04, 36.8MB/s]
39%|███▉ | 90.1M/232M [00:02<00:04, 36.1MB/s]
42%|████▏ | 98.1M/232M [00:03<00:03, 43.9MB/s]
44%|████▍ | 103M/232M [00:03<00:03, 36.8MB/s]
47%|████▋ | 110M/232M [00:03<00:03, 33.6MB/s]
51%|█████ | 118M/232M [00:03<00:02, 41.9MB/s]
53%|█████▎ | 123M/232M [00:03<00:03, 35.3MB/s]
56%|█████▌ | 130M/232M [00:04<00:03, 32.9MB/s]
60%|█████▉ | 138M/232M [00:04<00:02, 42.0MB/s]
62%|██████▏ | 144M/232M [00:04<00:02, 35.8MB/s]
65%|██████▍ | 150M/232M [00:05<00:04, 20.9MB/s]
68%|██████▊ | 157M/232M [00:05<00:02, 27.0MB/s]
70%|██████▉ | 162M/232M [00:05<00:04, 17.5MB/s]
73%|███████▎ | 170M/232M [00:05<00:02, 24.8MB/s]
75%|███████▌ | 175M/232M [00:06<00:02, 24.5MB/s]
78%|███████▊ | 180M/232M [00:06<00:02, 24.8MB/s]
82%|████████▏ | 190M/232M [00:06<00:01, 29.7MB/s]
86%|████████▌ | 200M/232M [00:06<00:01, 32.8MB/s]
90%|█████████ | 210M/232M [00:07<00:00, 35.1MB/s]
95%|█████████▍| 220M/232M [00:07<00:00, 36.1MB/s]
99%|█████████▉| 230M/232M [00:07<00:00, 37.5MB/s]
100%|██████████| 232M/232M [00:07<00:00, 32.0MB/s]Parsing raw data
All models downloaded successfully.
Lowpass filter...
Skipping lowpass filter: data sample rate 30 too low for cutoff rate 20
Lowpass filter... Done! (0.00s)
Gravity calibration...
Gravity calibration... Done! (0.04s)
Resampling...
Resampling... Done! (0.10s)
{'WearTime(days)': 0.1666662808564815, 'NonwearTime(days)': 0.0, 'NumNonwearEpisodes': 0}
Time shift applied: 0 hours
/Users/rbuild/Library/Caches/org.R-project.R/R/reticulate/uv/cache/archive-v0/tIllcMppRjudD4na/lib/python3.8/site-packages/asleep/utils.py:44: UserWarning: Could not infer format, so each element will be parsed individually, falling back to `dateutil`. To ensure parsing is consistent and as-expected, please specify a format.
data = pd.read_csv(
Raw data file saved to: /Volumes/Temp/tmp/RtmpZDYmGH/fileb7439f6ef20/raw.csv
Info data file saved to: /Volumes/Temp/tmp/RtmpZDYmGH/fileb7439f6ef20/info.json
time x y z non_wear
0 2000-01-04 20:00:00.000000000 -0.704000 0.413000 -0.540000 False
1 2000-01-04 20:00:00.033333333 -0.720795 0.419000 -0.561667 False
2 2000-01-04 20:00:00.066666666 -0.665154 0.428846 -0.578590 False
3 2000-01-04 20:00:00.100000000 -0.698000 0.434000 -0.525000 False
4 2000-01-04 20:00:00.133333333 -0.674051 0.417308 -0.575385 False
Transforming data for model input
Data shape for data2model: (480, 3, 900)
Data shape for times: (480,)
Data shape for nonwear: (480,)
Detecting sleep windows
args$outdir/Volumes/Temp/tmp/RtmpZDYmGH/fileb7439f6ef20
ssl_sleep_path: /Volumes/Temp/tmp/RtmpZDYmGH/fileb7439f6ef20/ssl_sleep.npy, exists:FALSE
data2model
array([[[-0.704 , -0.72079488, -0.66515385, ..., -0.69130774,
-0.69115383, -0.6903333 ],
[ 0.413 , 0.419 , 0.42884615, ..., 0.42430774,
0.42807678, 0.44416667],
[-0.54 , -0.56166666, -0.57858971, ..., -0.55976925,
-0.59274354, -0.61691666]],
[[-0.689 , -0.61469231, -0.58484615, ..., -0.62961541,
-0.62735884, -0.62341669],
[ 0.469 , 0.42923077, 0.43343586, ..., 0.466 ,
0.46 , 0.45547223],
[-0.648 , -0.55720514, -0.58207693, ..., -0.57223075,
-0.57330765, -0.56950002]],
[[-0.625 , -0.62246154, -0.63430771, ..., -0.73707666,
-0.73812797, -0.74825001],
[ 0.457 , 0.45953846, 0.46923078, ..., 0.18476925,
0.19420501, 0.20291666],
[-0.56 , -0.548 , -0.56430771, ..., -0.64523075,
-0.6363847 , -0.65150002]],
...,
[[-0.032 , -0.032 , -0.032 , ..., -0.032 ,
-0.032 , -0.032 ],
[-0.123 , -0.123 , -0.123 , ..., -0.123 ,
-0.123 , -0.123 ],
[-0.988 , -0.988 , -0.988 , ..., -0.988 ,
-0.988 , -0.988 ]],
[[-0.032 , -0.032 , -0.032 , ..., -0.032 ,
-0.032 , -0.032 ],
[-0.123 , -0.123 , -0.123 , ..., -0.123 ,
-0.123 , -0.123 ],
[-0.988 , -0.988 , -0.988 , ..., -0.988 ,
-0.988 , -0.988 ]],
[[-0.032 , -0.032 , -0.032 , ..., -0.032 ,
-0.032 , -0.032 ],
[-0.123 , -0.123 , -0.123 , ..., -0.123 ,
-0.123 , -0.123 ],
[-0.988 , -0.988 , -0.988 , ..., -0.988 ,
-0.988 , -0.988 ]]])
non_wear
array([False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False])
Data2model file saved to: /Volumes/Temp/tmp/RtmpZDYmGH/fileb7439f6ef20/data2model.npy
Times file saved to: /Volumes/Temp/tmp/RtmpZDYmGH/fileb7439f6ef20/times.npy
Non-wear file saved to: /Volumes/Temp/tmp/RtmpZDYmGH/fileb7439f6ef20/non_wear.npy
Downloading https://github.com/OxWearables/asleep/releases/download/0.4.12/ssl.joblib.lzma...
prediction set sample count: 480
Using local /Users/rbuild/Library/Caches/org.R-project.R/R/reticulate/uv/cache/archive-v0/tIllcMppRjudD4na/lib/python3.8/site-packages/asleep/torch_hub_cache/OxWearables_ssl-wearables_v1.0.0
0%| | 0/1 [00:00<?, ?it/s]
100%|██████████| 1/1 [00:23<00:00, 23.18s/it]Running SleepNet
SleepNet outdir: /Volumes/Temp/tmp/RtmpZDYmGH/fileb7439f6ef20
Upstream ssl model path: /Users/rbuild/Library/Caches/org.R-project.R/R/reticulate/uv/cache/archive-v0/tIllcMppRjudD4na/lib/python3.8/site-packages/asleep/ssl.joblib.lzma, exists: TRUE
SleepNet weight URL: https://github.com/OxWearables/asleep/releases/download/0.4.9/sleepnet_apr_16_2024.mdl
SleepNet artifact ssl_sleep: /Volumes/Temp/tmp/RtmpZDYmGH/fileb7439f6ef20/ssl_sleep.npy, exists: TRUE
SleepNet artifact y_pred: /Volumes/Temp/tmp/RtmpZDYmGH/fileb7439f6ef20/y_pred.npy, exists: FALSE
SleepNet artifact pred_prob: /Volumes/Temp/tmp/RtmpZDYmGH/fileb7439f6ef20/pred_prob.npy, exists: FALSE
SleepNet artifact x_npy: /Volumes/Temp/tmp/RtmpZDYmGH/fileb7439f6ef20/X.npy, exists: TRUE
SleepNet artifact x_npy_gz: /Volumes/Temp/tmp/RtmpZDYmGH/fileb7439f6ef20/X.npy.gz, exists: FALSE
SleepNet artifact npid: /Volumes/Temp/tmp/RtmpZDYmGH/fileb7439f6ef20/npid.npy, exists: TRUE
(480,)
(array([0., 2., 3.]), array([ 79, 45, 356]))
/Users/rbuild/Library/Caches/org.R-project.R/R/reticulate/uv/cache/archive-v0/tIllcMppRjudD4na/lib/python3.8/site-packages/asleep/sleepnet.py:207: UserWarning:
The version_base parameter is not specified.
Please specify a compatability version level, or None.
Will assume defaults for version 1.1
initialize(config_path="conf")
pytorch device: mps
setting up cnn
access local repo
Loading local weight from /Users/rbuild/Library/Caches/org.R-project.R/R/reticulate/uv/cache/archive-v0/tIllcMppRjudD4na/lib/python3.8/site-packages/asleep/torch_hub_cache/checkpoints/sleepnet_apr_16_2024.mdl
/Users/rbuild/Library/Caches/org.R-project.R/R/reticulate/uv/cache/archive-v0/tIllcMppRjudD4na/lib/python3.8/site-packages/asleep/torch_hub_cache/OxWearables_asleep_main/hubconf.py:22: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
state_dict = torch.load(local_weight_path,
Saving _problems/test-asleep-20.R
[ FAIL 1 | WARN 0 | SKIP 0 | PASS 67 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-asleep.R:20:5'): asleep model works ────────────────────────────
<python.builtin.RuntimeError/python.builtin.Exception/python.builtin.BaseException/python.builtin.object/error/condition>
Error in `py_call_impl(callable, call_args$unnamed, call_args$named)`: RuntimeError: MPS backend out of memory (MPS allocated: 8.00 MB, other allocations: 272.00 KB, max allowed: 1.70 GB). Tried to allocate 256 bytes on shared pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure).
Run `reticulate::py_last_error()` for details.
Backtrace:
▆
1. └─asleep::asleep(file = file, verbose = 2L, force_download = TRUE) at test-asleep.R:20:5
2. └─reticulate (local) start_sleep_net(...)
3. └─reticulate:::py_call_impl(callable, call_args$unnamed, call_args$named)
[ FAIL 1 | WARN 0 | SKIP 0 | PASS 67 ]
Error:
! Test failures.
Execution halted
/Users/rbuild/Library/Caches/org.R-project.R/R/reticulate/uv/python/cpython-3.8.20-macos-aarch64-none/lib/python3.8/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '
- checking PDF version of manual ... [2s/2s] OK
- DONE
Status: 1 ERROR