Skip to content

Commit f9d6f4b

Browse files
committed
fix help handler
1 parent 28d8d69 commit f9d6f4b

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

R/help.R

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,19 @@
33
register_tf_help_handler <- function() {
44
reticulate::register_module_help_handler("tensorflow", function(name, subtopic = NULL) {
55

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+
1415
help_url <- "https://www.tensorflow.org/api_docs/python/"
1516

1617
# some adjustments
18+
name <- sub("^tensorflow\\._api\\.v2\\.", "tensorflow.", name)
1719
name <- sub("^tensorflow", "tf", name)
1820
name <- sub("python.client.session.", "", name, fixed = TRUE)
1921
name <- sub("python.ops.", "", name, fixed = TRUE)

0 commit comments

Comments
 (0)