Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: pkgmatch
Title: Find R Packages Matching Either Descriptions or Other R Packages
Version: 0.5.0.091
Version: 0.5.0.093
Authors@R: c(
person("Mark", "Padgham", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-2172-5265")),
Expand Down
12 changes: 6 additions & 6 deletions R/embeddings.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ convert_paths_to_pkgs <- function (packages) {
#' @param packages A vector of either names of installed packages, or local
#' paths to directories containing R packages.
#' @param n_chunks Number of randomly permuted chunks of input text to use to
#' generate average embeddings. Values should generally be > 1, because the
#' text of many packages exceeds the context window for the language models,
#' and so permutations ensure that all text is captured in resultant
#' embeddings. Note, however, that computation times scale linearly with this
#' value.
#' generate average embeddings. Issue #212 demonstrates that > 95% of all CRAN packages
#' have <= 8192 tokens, and so fit within the context windows of the embeddings
#' models used here. Chunking is therefore generally not necessary, and so this
#' parameter defaults to a value of 1. Also note that computation
#' times scale linearly with this value.
#' @param functions_only If `TRUE`, calculate embeddings for function
#' descriptions only. This is intended to generate a separate set of embeddings
#' which can then be used to match plain-text queries of functions, rather than
Expand All @@ -69,7 +69,7 @@ convert_paths_to_pkgs <- function (packages) {
#' names (emb_pkg)
#' colnames (emb_pkg$text_with_fns) # "curl"
pkgmatch_embeddings_from_pkgs <- function (packages = NULL,
n_chunks = 5L,
n_chunks = 1L,
functions_only = FALSE) {

checkmate::assert_integer (n_chunks, len = 1L)
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"codeRepository": "https://github.com/ropensci-review-tools/pkgmatch",
"issueTracker": "https://github.com/ropensci-review-tools/pkgmatch/issues",
"license": "https://spdx.org/licenses/MIT",
"version": "0.5.0.091",
"version": "0.5.0.093",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down
12 changes: 6 additions & 6 deletions man/pkgmatch_embeddings_from_pkgs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@
-0.026968248
]
],
"total_duration": 79280349,
"load_duration": 4627018,
"total_duration": 70626051,
"load_duration": 2804237,
"prompt_eval_count": 59
}
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@
0.013035012
]
],
"total_duration": 246722930,
"load_duration": 2980597,
"total_duration": 215597663,
"load_duration": 3358566,
"prompt_eval_count": 179
}
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@
-0.028184487
]
],
"total_duration": 596613308,
"load_duration": 3612651,
"total_duration": 531537702,
"load_duration": 2863633,
"prompt_eval_count": 398
}
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@
-0.00089879567
]
],
"total_duration": 165977790,
"load_duration": 3171402,
"total_duration": 154286877,
"load_duration": 3780620,
"prompt_eval_count": 136
}
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@
-0.027917823
]
],
"total_duration": 101383275,
"load_duration": 3401316,
"total_duration": 89842063,
"load_duration": 2867599,
"prompt_eval_count": 78
}
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@
0.030365974
]
],
"total_duration": 22076367,
"load_duration": 3098162,
"total_duration": 20790669,
"load_duration": 2997282,
"prompt_eval_count": 7
}
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@
0.019178685
]
],
"total_duration": 3675698007,
"load_duration": 8009516,
"total_duration": 3342807364,
"load_duration": 7954258,
"prompt_eval_count": 2340
}
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@
-0.025955537
]
],
"total_duration": 1841401918,
"load_duration": 3642221,
"total_duration": 1712754778,
"load_duration": 3436951,
"prompt_eval_count": 1245
}
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@
-0.033488743
]
],
"total_duration": 99158692,
"load_duration": 3039868,
"total_duration": 91215769,
"load_duration": 2897947,
"prompt_eval_count": 78
}
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@
-0.050223053
]
],
"total_duration": 16871019,
"load_duration": 3581706,
"total_duration": 17789547,
"load_duration": 3063146,
"prompt_eval_count": 2
}
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@
-0.062179822
]
],
"total_duration": 20789325,
"load_duration": 3424775,
"total_duration": 20631645,
"load_duration": 3081596,
"prompt_eval_count": 3
}
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@
-0.044476017
]
],
"total_duration": 417098616,
"load_duration": 292983345,
"total_duration": 412787173,
"load_duration": 292817504,
"prompt_eval_count": 98
}
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@
0.004767239
]
],
"total_duration": 48521639,
"load_duration": 8504563,
"total_duration": 409662080,
"load_duration": 369778651,
"prompt_eval_count": 22
}
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@
-0.047969084
]
],
"total_duration": 161241449,
"load_duration": 3558935,
"total_duration": 130933287,
"load_duration": 3235448,
"prompt_eval_count": 114
}
Loading