From ed44e7f1264a76bcdcb72980f8bc0f011ed5299a Mon Sep 17 00:00:00 2001 From: ahjota <3588606+ahjota@users.noreply.github.com> Date: Thu, 27 Jul 2023 14:48:52 -0700 Subject: [PATCH] v2.18.4 (#5) --- datarobot/DESCRIPTION | 4 ++-- datarobot/NEWS.md | 10 ++++++++-- datarobot/R/PredictionDatasets.R | 11 +++++++++-- datarobot/R/Projects.R | 8 +++++--- datarobot/inst/doc/AdvancedTuning.html | 4 ++-- datarobot/inst/doc/AdvancedVignette.Rmd | 2 +- datarobot/inst/doc/AdvancedVignette.html | 10 +++++----- datarobot/inst/doc/Calendars.html | 4 ++-- datarobot/inst/doc/ComparingSubsets.html | 4 ++-- datarobot/inst/doc/ComplianceDocumentation.html | 4 ++-- datarobot/inst/doc/DatetimePartitionedProjects.html | 4 ++-- datarobot/inst/doc/Deployment.html | 4 ++-- datarobot/inst/doc/IntroductionToDataRobot.html | 4 ++-- datarobot/inst/doc/Multiclass.html | 4 ++-- datarobot/inst/doc/PartialDependence.html | 4 ++-- datarobot/inst/doc/PredictionExplanations.Rmd | 2 +- datarobot/inst/doc/PredictionExplanations.html | 8 ++++---- datarobot/inst/doc/RatingTables.html | 4 ++-- datarobot/inst/doc/TimeSeries.html | 4 ++-- datarobot/inst/doc/TrainingPredictions.html | 4 ++-- datarobot/inst/doc/VariableImportance.html | 4 ++-- datarobot/vignettes/AdvancedVignette.Rmd | 2 +- datarobot/vignettes/PredictionExplanations.Rmd | 2 +- 23 files changed, 63 insertions(+), 48 deletions(-) diff --git a/datarobot/DESCRIPTION b/datarobot/DESCRIPTION index 6973d26d..5fe21cdf 100644 --- a/datarobot/DESCRIPTION +++ b/datarobot/DESCRIPTION @@ -1,6 +1,6 @@ Package: datarobot Title: 'DataRobot' Predictive Modeling API -Version: 2.18.3 +Version: 2.18.4 Description: For working with the 'DataRobot' predictive modeling platform's API . Depends: R (>= 3.5), methods, stats Imports: httr (>= 1.2.0), jsonlite (>= 1.0), yaml (>= 2.1.19) @@ -28,6 +28,6 @@ Suggests: lubridate, knitr, testthat, lintr, data.table, AmesHousing, VignetteBuilder: knitr RoxygenNote: 7.2.3 NeedsCompilation: no -Packaged: 2023-07-12 19:51:13 UTC; aj +Packaged: 2023-07-25 01:33:05 UTC; aj Language: en-US Config/testthat/edition: 2 diff --git a/datarobot/NEWS.md b/datarobot/NEWS.md index 2ecaf37c..1734179d 100644 --- a/datarobot/NEWS.md +++ b/datarobot/NEWS.md @@ -1,4 +1,4 @@ -# datarobot v2.18.3 +# datarobot v2.18.4 The `datarobot` package is now dependent on R >= 3.5. @@ -11,10 +11,11 @@ Enhancements: * The function `RequestFeatureImpact` now accepts a `rowCount` argument, which will change the sample size used for Feature Impact calculations. * The un-exported function `datarobot:::UploadData` now takes an optional argument `fileName`. +* The function `ListProjects` now accepts `limit` and `offset` arguments, which allows users to retrieve additional projects. Bugfixes: -* Fixed an issue where an [undocumented feature](https://github.com/jeroen/curl/pull/290/) in curl==5.0.1 is installed that caused any invocation of `datarobot:::UploadData` (i.e. `SetupProject`) to fail with the error `No method asJSON S3 class: form_file`. +* Fixed an issue where a [new feature](https://github.com/jeroen/curl/pull/290/) in curl==5.0.1 caused invocations of `datarobot:::UploadData` (i.e. `SetupProject`) as well as `datarobot:::UploadPredictionDataset` to fail with the error `No method asJSON S3 class: form_file`. * Loading the `datarobot` package with `suppressPackageStartupMessages()` will now suppress all messages. API Changes: @@ -37,6 +38,11 @@ Dependency Changes: Documentation Changes: * Updated "Introduction to DataRobot" vignette to use Ames, Iowa housing data instead of Boston housing dataset. +* Removed hard links to `lendingclub.com` in vignettes due to issues with the CRAN URL checker. + +# datarobot v2.18.3 + +This release is superseded by v2.18.4. # datarobot v2.18.2 diff --git a/datarobot/R/PredictionDatasets.R b/datarobot/R/PredictionDatasets.R index ab4490be..78b59f4c 100644 --- a/datarobot/R/PredictionDatasets.R +++ b/datarobot/R/PredictionDatasets.R @@ -1,3 +1,11 @@ +# Copyright 2021-2023 DataRobot, Inc. and its affiliates. +# +# All rights reserved. +# +# DataRobot, Inc. +# +# This is proprietary source code of DataRobot, Inc. and its +# affiliates. #' Function to upload new data to a DataRobot project for predictions #' #' The DataRobot prediction engine requires a CSV file containing the data to be @@ -59,9 +67,8 @@ UploadPredictionDataset <- function(project, dataSource, forecastPoint = NULL, routeString <- UrlJoin("projects", projectId, "predictionDatasets", "urlUploads") dataList <- list(url = dataSource) } else { - dataPath <- DataPathFromDataArg(dataSource) routeString <- UrlJoin("projects", projectId, "predictionDatasets", "fileUploads") - dataList <- list(file = httr::upload_file(dataPath)) + dataList <- list(file = UploadData(dataSource)) } if (!is.null(forecastPoint) && (!is.null(predictionsStartDate) || !is.null(predictionsEndDate))) { stop(sQuote("forecastPoint"), " cannot be provided along with ", sQuote("predictionsStartDate"), diff --git a/datarobot/R/Projects.R b/datarobot/R/Projects.R index aa057d9b..118c7c96 100644 --- a/datarobot/R/Projects.R +++ b/datarobot/R/Projects.R @@ -40,6 +40,8 @@ DeleteProject <- function(project) { #' @param filter list. Optional. A named list that can be used to specify various filters. #' Currently `projectName` is supported which will filter returned projects for projects with #' names containing the specified string. +#' @param limit integer. Optional. At most this many results are returned, default: 1000 +#' @param offset integer. Optional. This many results will be skipped, default: 0 #' #' @return An S3 object of class 'projectSummaryList', consisting of the following elements: #' \itemize{ @@ -78,9 +80,9 @@ DeleteProject <- function(project) { #' ListProjects(filter = list("projectName" = "TimeSeries")) #' } #' @export -ListProjects <- function(filter = NULL) { +ListProjects <- function(filter = NULL, limit = 1000, offset = 0) { routeString <- "projects/" - params <- NULL + params <- list(offset = offset, limit = limit) if (!is.null(filter)) { if (!is.list(filter)) { stop("`filter` must be a list.") @@ -89,7 +91,7 @@ ListProjects <- function(filter = NULL) { if (length(filter$projectName) != 1) { stop("`projectName` must be a character vector of length 1.") } - params <- list("projectName" = filter$projectName) + params$projectName <- filter$projectName } } returnValue <- DataRobotGET(routeString, query = params) diff --git a/datarobot/inst/doc/AdvancedTuning.html b/datarobot/inst/doc/AdvancedTuning.html index 6f867d56..df7db300 100644 --- a/datarobot/inst/doc/AdvancedTuning.html +++ b/datarobot/inst/doc/AdvancedTuning.html @@ -12,7 +12,7 @@ - + Advanced Tuning for Models @@ -341,7 +341,7 @@

Advanced Tuning for Models

Peter Hurford

-

2023-07-12

+

2023-07-24

diff --git a/datarobot/inst/doc/AdvancedVignette.Rmd b/datarobot/inst/doc/AdvancedVignette.Rmd index b2feeba5..63fb10bc 100644 --- a/datarobot/inst/doc/AdvancedVignette.Rmd +++ b/datarobot/inst/doc/AdvancedVignette.Rmd @@ -40,7 +40,7 @@ ConnectToDataRobot(endpoint = "http:///api/v2", token = " - + Introduction to Lift Chart, ROC Curve and Word Cloud @@ -342,7 +342,7 @@

Introduction to Lift Chart, ROC Curve and Word Cloud

Peter Hurford, Thakur Raj Anand, Chester Ismay

-

2023-07-12

+

2023-07-24

@@ -392,8 +392,8 @@

Connecting to DataRobot

Data

We will be using the Lending Club dataset, a sample dataset related to credit scoring -open-sourced by LendingClub (https://www.lendingclub.com/). We can create a project -with this dataset like this:

+open-sourced by LendingClub. We can create a project with this dataset +like this:

lendingClubURL <- "https://s3.amazonaws.com/datarobot_public_datasets/10K_Lending_Club_Loans.csv"
 project <- StartProject(dataSource = lendingClubURL,
                         projectName = "AdvancedModelInsightsVignette",
@@ -701,7 +701,7 @@ 

Word Cloud

colors = colors, scale = c(3, 0.3)) )
-

+

diff --git a/datarobot/inst/doc/Calendars.html b/datarobot/inst/doc/Calendars.html index cad3e864..f131a351 100644 --- a/datarobot/inst/doc/Calendars.html +++ b/datarobot/inst/doc/Calendars.html @@ -12,7 +12,7 @@ - + Introduction to Calendars @@ -341,7 +341,7 @@

Introduction to Calendars

Peter Hurford

-

2023-07-12

+

2023-07-24

diff --git a/datarobot/inst/doc/ComparingSubsets.html b/datarobot/inst/doc/ComparingSubsets.html index a60f992d..7d6dd1cc 100644 --- a/datarobot/inst/doc/ComparingSubsets.html +++ b/datarobot/inst/doc/ComparingSubsets.html @@ -12,7 +12,7 @@ - + Using Many Models to Compare Datasets @@ -363,7 +363,7 @@

Using Many Models to Compare Datasets

Ron Pearson

-

2023-07-12

+

2023-07-24

diff --git a/datarobot/inst/doc/ComplianceDocumentation.html b/datarobot/inst/doc/ComplianceDocumentation.html index a1767981..0deb0bf2 100644 --- a/datarobot/inst/doc/ComplianceDocumentation.html +++ b/datarobot/inst/doc/ComplianceDocumentation.html @@ -12,7 +12,7 @@ - + Compliance Documentation @@ -341,7 +341,7 @@

Compliance Documentation

Peter Hurford

-

2023-07-12

+

2023-07-24

diff --git a/datarobot/inst/doc/DatetimePartitionedProjects.html b/datarobot/inst/doc/DatetimePartitionedProjects.html index 939afed3..0325609d 100644 --- a/datarobot/inst/doc/DatetimePartitionedProjects.html +++ b/datarobot/inst/doc/DatetimePartitionedProjects.html @@ -12,7 +12,7 @@ - + Datetime Partitioning @@ -342,7 +342,7 @@

Datetime Partitioning

Sergey Yurgenson, Madeleine Mott, Zach Mayer, Igor Veksler, Thakur Raj Anand

-

2023-07-12

+

2023-07-24

diff --git a/datarobot/inst/doc/Deployment.html b/datarobot/inst/doc/Deployment.html index c0eab627..948848b6 100644 --- a/datarobot/inst/doc/Deployment.html +++ b/datarobot/inst/doc/Deployment.html @@ -12,7 +12,7 @@ - + Introduction to Model Deployment @@ -341,7 +341,7 @@

Introduction to Model Deployment

Peter Hurford

-

2023-07-12

+

2023-07-24

diff --git a/datarobot/inst/doc/IntroductionToDataRobot.html b/datarobot/inst/doc/IntroductionToDataRobot.html index 66143ab7..9b7b5e32 100644 --- a/datarobot/inst/doc/IntroductionToDataRobot.html +++ b/datarobot/inst/doc/IntroductionToDataRobot.html @@ -12,7 +12,7 @@ - + Introduction to the DataRobot R Package @@ -342,7 +342,7 @@

Introduction to the DataRobot R Package

Ron Pearson, Peter Hurford, Matt Harris

-

2023-07-12

+

2023-07-24

diff --git a/datarobot/inst/doc/Multiclass.html b/datarobot/inst/doc/Multiclass.html index 134e5c47..cb04fdc6 100644 --- a/datarobot/inst/doc/Multiclass.html +++ b/datarobot/inst/doc/Multiclass.html @@ -12,7 +12,7 @@ - + Introduction to Multiclass @@ -341,7 +341,7 @@

Introduction to Multiclass

Peter Hurford

-

2023-07-12

+

2023-07-24

diff --git a/datarobot/inst/doc/PartialDependence.html b/datarobot/inst/doc/PartialDependence.html index e0317814..9459501c 100644 --- a/datarobot/inst/doc/PartialDependence.html +++ b/datarobot/inst/doc/PartialDependence.html @@ -12,7 +12,7 @@ - + Interpreting Predictive Models Using Partial Dependence Plots @@ -364,7 +364,7 @@

Interpreting Predictive Models Using Partial Dependence Plots

Ron Pearson

-

2023-07-12

+

2023-07-24

diff --git a/datarobot/inst/doc/PredictionExplanations.Rmd b/datarobot/inst/doc/PredictionExplanations.Rmd index 7fe1107c..373cc6c0 100644 --- a/datarobot/inst/doc/PredictionExplanations.Rmd +++ b/datarobot/inst/doc/PredictionExplanations.Rmd @@ -50,7 +50,7 @@ ConnectToDataRobot(endpoint = endpoint, token = apiToken) ``` ## Data -We would be using a sample dataset related to credit scoring open sourced by LendingClub (https://www.lendingclub.com/). Below is the information related to the variables. +We would be using a sample dataset related to credit scoring open sourced by LendingClub. Below is the information related to the variables. ```{r echo = FALSE, results = "asis", message = FALSE, warning = FALSE} Lending <- fread("https://s3.amazonaws.com/datarobot_public_datasets/10K_Lending_Club_Loans.csv") diff --git a/datarobot/inst/doc/PredictionExplanations.html b/datarobot/inst/doc/PredictionExplanations.html index 3541e121..89e30af0 100644 --- a/datarobot/inst/doc/PredictionExplanations.html +++ b/datarobot/inst/doc/PredictionExplanations.html @@ -12,7 +12,7 @@ - + Introduction to Prediction Explanations @@ -343,7 +343,7 @@

Introduction to Prediction Explanations

Peter Hurford, Colin Priest, Sergey Yurgenson, Thakur Raj Anand

-

2023-07-12

+

2023-07-24

@@ -416,8 +416,8 @@

Connecting to DataRobot

Data

We would be using a sample dataset related to credit scoring open -sourced by LendingClub (https://www.lendingclub.com/). Below is the information -related to the variables.

+sourced by LendingClub. Below is the information related to the +variables.

diff --git a/datarobot/inst/doc/RatingTables.html b/datarobot/inst/doc/RatingTables.html index 5d8ad4c0..3507463a 100644 --- a/datarobot/inst/doc/RatingTables.html +++ b/datarobot/inst/doc/RatingTables.html @@ -12,7 +12,7 @@ - +Introduction to Rating Tables @@ -341,7 +341,7 @@

Introduction to Rating Tables

Peter Hurford

-

2023-07-12

+

2023-07-24

diff --git a/datarobot/inst/doc/TimeSeries.html b/datarobot/inst/doc/TimeSeries.html index 30850c89..b8b0d321 100644 --- a/datarobot/inst/doc/TimeSeries.html +++ b/datarobot/inst/doc/TimeSeries.html @@ -12,7 +12,7 @@ - +Introduction to Time Series @@ -341,7 +341,7 @@

Introduction to Time Series

Peter Hurford, Madeleine Mott

-

2023-07-12

+

2023-07-24

diff --git a/datarobot/inst/doc/TrainingPredictions.html b/datarobot/inst/doc/TrainingPredictions.html index f98402da..c9c410f4 100644 --- a/datarobot/inst/doc/TrainingPredictions.html +++ b/datarobot/inst/doc/TrainingPredictions.html @@ -12,7 +12,7 @@ - +Introduction to Training Predictions @@ -341,7 +341,7 @@

Introduction to Training Predictions

Peter Hurford

-

2023-07-12

+

2023-07-24

diff --git a/datarobot/inst/doc/VariableImportance.html b/datarobot/inst/doc/VariableImportance.html index 6bbb80e7..0ccb6bc5 100644 --- a/datarobot/inst/doc/VariableImportance.html +++ b/datarobot/inst/doc/VariableImportance.html @@ -12,7 +12,7 @@ - +Assessing Variable Importance for Predictive Models of Arbitrary Type @@ -364,7 +364,7 @@

Assessing Variable Importance for Predictive Models of Arbitrary Type

Ron Pearson

-

2023-07-12

+

2023-07-24

diff --git a/datarobot/vignettes/AdvancedVignette.Rmd b/datarobot/vignettes/AdvancedVignette.Rmd index b2feeba5..63fb10bc 100644 --- a/datarobot/vignettes/AdvancedVignette.Rmd +++ b/datarobot/vignettes/AdvancedVignette.Rmd @@ -40,7 +40,7 @@ ConnectToDataRobot(endpoint = "http:///api/v2", token = "