Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix R NA check for databricks-utils.R #8429

Merged
merged 3 commits into from
May 17, 2023
Merged

Conversation

jinzhang21
Copy link
Collaborator

Related Issues/PRs

#xxx

What changes are proposed in this pull request?

See title. This is related to R 4.3.0 change

Calling && or || with LHS or (if evaluated) RHS of length greater than one is now always an error, with a report of the form

    'length = 4' in coercion to 'logical(1)'
Environment variable _R_CHECK_LENGTH_1_LOGIC2_ no longer has any effect.

Cited here.

How is this patch tested?

  • Existing unit/integration tests
  • New unit/integration tests
  • Manual tests (describe details, including test results, below)

Does this PR change the documentation?

  • No. You can skip the rest of this section.
  • Yes. Make sure the changed pages / sections render correctly in the documentation preview.

Release Notes

Is this a user-facing change?

  • No. You can skip the rest of this section.
  • Yes. Give a description of this change to be included in the release notes for MLflow users.

(Details in 1-2 sentences. You can just refer to another PR with a description if this PR is part of a larger change.)

What component(s), interfaces, languages, and integrations does this PR affect?

Components

  • area/artifacts: Artifact stores and artifact logging
  • area/build: Build and test infrastructure for MLflow
  • area/docs: MLflow documentation pages
  • area/examples: Example code
  • area/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registry
  • area/models: MLmodel format, model serialization/deserialization, flavors
  • area/recipes: Recipes, Recipe APIs, Recipe configs, Recipe Templates
  • area/projects: MLproject format, project running backends
  • area/scoring: MLflow Model server, model deployment tools, Spark UDFs
  • area/server-infra: MLflow Tracking server backend
  • area/tracking: Tracking Service, tracking client APIs, autologging

Interface

  • area/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev server
  • area/docker: Docker use across MLflow's components, such as MLflow Projects and MLflow Models
  • area/sqlalchemy: Use of SQLAlchemy in the Tracking Service or Model Registry
  • area/windows: Windows support

Language

  • language/r: R APIs and clients
  • language/java: Java APIs and clients
  • language/new: Proposals for new client languages

Integrations

  • integrations/azure: Azure and Azure ML integrations
  • integrations/sagemaker: SageMaker integrations
  • integrations/databricks: Databricks integrations

How should the PR be classified in the release notes? Choose one:

  • rn/breaking-change - The PR will be mentioned in the "Breaking Changes" section
  • rn/none - No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" section
  • rn/feature - A new user-facing feature worth mentioning in the release notes
  • rn/bug-fix - A user-facing bug fix worth mentioning in the release notes
  • rn/documentation - A user-facing documentation change worth mentioning in the release notes

Signed-off-by: Jin Zhang <jin.zhang@databricks.com>
@mlflow-automation
Copy link
Collaborator

mlflow-automation commented May 12, 2023

Documentation preview for cda9abf will be available here when this CircleCI job completes successfully.

More info

@github-actions github-actions bot added language/r R APIs and clients rn/none List under Small Changes in Changelogs. labels May 12, 2023
@jinzhang21 jinzhang21 requested a review from harupy May 12, 2023 23:28
@@ -161,7 +161,7 @@ mlflow_get_run_context.mlflow_databricks_client <- function(client, experiment_i
} else {
NA
}
if (!is.na(job_info) && !is.na(job_info$job_id)) {
if (!all(is.na(job_info)) && !is.na(job_info$job_id)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we update the R version to 4.3.0 to make sure this line works fine with it?

# Note: the version of R released on 4/21/23, 4.3.0, has build issues with devtools.
# Remove this version pin once issues on dependent packages have been fixed.
with:
r-version: "4.2.3"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some failures in tests on time duration output format. I can change the tests but is it desired? @harupy @WeichenXu123

── Failure ('test-tracking-runs.R:206:3'): mlflow_log_metric() rounds step and timestamp inputs ──
mlflow_get_metric_history("timestamp_metric")$timestamp (`actual`) and purrr::map(round(timestamp_inputs), mlflow:::milliseconds_to_date) (`expected`) don't have the same values.
* Only in `actual`:   1970-01-01 00:01:06.796, 1970-01-01 00:01:29.372, 1970-01-01 00:01:24.502, 1970-01-01 00:01:04.028, 1970-01-01 00:00:17.371, 1970-01-01 00:00:47.979, 1970-01-01 00:00:42.036, 1970-01-01 00:00:15.319, 1970-01-01 00:00:39.544, 1970-01-01 00:01:39.184
* Only in `expected`: 66.796, 89.372, 84.502, 64.028, 17.371, 47.979, 42.036, 15.319, 39.544, 99.184

── Failure ('test-tracking-runs.R:259:3'): mlflow_log_metric() with step produces expected metric data ──
metric_history_1$timestamp (`actual`) and purrr::map(c(300, 100, 200), mlflow:::milliseconds_to_date) (`expected`) don't have the same values.
* Only in `actual`:   1970-01-01 00:00:00.3, 1970-01-01 00:00:00.1, 1970-01-01 00:00:00.2
* Only in `expected`: 0.3, 0.1, 0.2

── Failure ('test-tracking-runs.R:439:3'): mlflow_log_batch() works ────────────
metrics$timestamp (`actual`) and purrr::map(c(200, 300, 400, 500, 600), mlflow:::milliseconds_to_date) (`expected`) don't have the same values.
* Only in `actual`:   1970-01-01 00:00:00.4, 1970-01-01 00:00:00.3, 1970-01-01 00:00:00.2, 1970-01-01 00:00:00.5, 1970-01-01 00:00:00.6
* Only in `expected`: 0.2, 0.3, 0.4, 0.5, 0.6

── Failure ('test-tracking-runs.R:453:3'): mlflow_log_batch() works ────────────
metric_history$timestamp (`actual`) and purrr::map(c(100, 200), mlflow:::milliseconds_to_date) (`expected`) don't have the same values.
* Only in `actual`:   1970-01-01 00:00:00.1, 1970-01-01 00:00:00.2
* Only in `expected`: 0.1, 0.2

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jinzhang21 Let's fix them :)

Copy link
Member

@harupy harupy May 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found R 4.3.0 contains changes related to dates and times: https://cran.r-project.org/doc/manuals/r-release/NEWS.html

Copy link
Member

@harupy harupy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once #8429 (comment) is addressed :)

Signed-off-by: Jin Zhang <jin.zhang@databricks.com>
@harupy harupy mentioned this pull request May 17, 2023
33 tasks
Signed-off-by: harupy <hkawamura0130@gmail.com>
@harupy
Copy link
Member

harupy commented May 17, 2023

Merged master to reflect #8446. The R check should pass now.

@harupy harupy enabled auto-merge (squash) May 17, 2023 10:19
@harupy harupy merged commit ea754e8 into mlflow:master May 17, 2023
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language/r R APIs and clients rn/none List under Small Changes in Changelogs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants