gesistsa / grafzahl

🧛 fine-tuning Transformers for text data from within R
https://gesistsa.github.io/grafzahl/
GNU General Public License v3.0
41 stars 2 forks source link

Two tests fail due to: Fail to download the model `../testdata/fake` from Hugging Face #23

Closed barracuda156 closed 1 year ago

barracuda156 commented 1 year ago

What is used to download models? Two tests fail for me. Should be fixable, I guess.

R version 4.2.3 (2023-03-15) -- "Shortstop Beagle"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: powerpc-apple-darwin10.8.0 (32-bit)

> # 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/tests.html
> # * https://testthat.r-lib.org/reference/test_package.html#special-files
> 
> library(testthat)
> library(grafzahl)
> 
> test_check("grafzahl")
[ FAIL 2 | WARN 0 | SKIP 0 | PASS 10 ]

══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test_grafzahl.R:14:5'): .infer local ──────────────────────────────
`.infer_model_type("../testdata/fake")` threw an unexpected error.
Message: Fail to download the model `../testdata/fake` from Hugging Face
Class:   simpleError/error/condition
Backtrace:
     ▆
  1. ├─testthat::expect_error(...) at test_grafzahl.R:14:4
  2. │ └─testthat:::expect_condition_matching(...)
  3. │   └─testthat:::quasi_capture(...)
  4. │     ├─testthat (local) .capture(...)
  5. │     │ └─base::withCallingHandlers(...)
  6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  7. └─grafzahl:::.infer_model_type("../testdata/fake")
  8.   └─grafzahl:::.download_from_huggingface(model_name)
  9.     └─base::tryCatch(...)
 10.       └─base (local) tryCatchList(expr, classes, parentenv, handlers)
 11.         └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
 12.           └─value[[3L]](cond)
── Error ('test_grafzahl.R:15:5'): .infer local ────────────────────────────────
Error: Fail to download the model `../testdata/fake` from Hugging Face
Backtrace:
    ▆
 1. ├─testthat::expect_equal(...) at test_grafzahl.R:15:4
 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
 3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
 4. └─grafzahl:::.infer_model_type("../testdata/fake")
 5.   └─grafzahl:::.download_from_huggingface(model_name)
 6.     └─base::tryCatch(...)
 7.       └─base (local) tryCatchList(expr, classes, parentenv, handlers)
 8.         └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
 9.           └─value[[3L]](cond)

[ FAIL 2 | WARN 0 | SKIP 0 | PASS 10 ]
Error: Test failures
Execution halted
barracuda156 commented 1 year ago

@chainsawriot Thank you!