|
3 | 3 | register_tf_help_handler <- function() { |
4 | 4 | reticulate::register_module_help_handler("tensorflow", function(name, subtopic = NULL) { |
5 | 5 |
|
6 | | - # get the base tensorflow help url |
7 | | - version <- tf$`__version__` |
8 | | - version <- strsplit(version, ".", fixed = TRUE)[[1]] |
9 | | - help_url <- paste0("https://www.tensorflow.org/versions/r", |
10 | | - version[1], ".", version[2], "/api_docs/python/") |
11 | | - |
12 | | - # upstream TF is missing public docs for later version |
13 | | - # https://github.com/tensorflow/tensorflow/issues/89084 |
| 6 | + # # Version specific URLs are disabled because |
| 7 | + # # upstream TF is missing public docs for later version |
| 8 | + # # https://github.com/tensorflow/tensorflow/issues/89084 |
| 9 | + # # get the base tensorflow help url |
| 10 | + # version <- tf$`__version__` |
| 11 | + # version <- strsplit(version, ".", fixed = TRUE)[[1]] |
| 12 | + # help_url <- paste0("https://www.tensorflow.org/versions/r", |
| 13 | + # version[1], ".", version[2], "/api_docs/python/") |
| 14 | + |
14 | 15 | help_url <- "https://www.tensorflow.org/api_docs/python/" |
15 | 16 |
|
16 | 17 | # some adjustments |
| 18 | + name <- sub("^tensorflow\\._api\\.v2\\.", "tensorflow.", name) |
17 | 19 | name <- sub("^tensorflow", "tf", name) |
18 | 20 | name <- sub("python.client.session.", "", name, fixed = TRUE) |
19 | 21 | name <- sub("python.ops.", "", name, fixed = TRUE) |
|
0 commit comments