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

Remove mleap commands in .create-test-env.R #5217

Merged
merged 5 commits into from Jan 5, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 0 additions & 8 deletions .github/workflows/master.yml
Expand Up @@ -84,20 +84,12 @@ jobs:
os_name=$(lsb_release -ds | sed 's/\s/-/g')
echo "::set-output name=os-name::$os_name"
- name: Cache R packages
if: runner.os != 'Windows'
Copy link
Member Author

Choose a reason for hiding this comment

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

We don't need this if condition.

uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
# We cache R dependencies based on a tuple of the current OS, the R version, and the list of
# R dependencies
key: ${{ steps.os-name.outputs.os-name }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ steps.os-name.outputs.os-name }}-${{ hashFiles('.github/R-version') }}-1-
Copy link
Member Author

@harupy harupy Jan 5, 2022

Choose a reason for hiding this comment

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

Removed restore-keys to avoid restoring cache when .github/depends.Rds (which is created based on the DESCRIPTION file) changes.

Copy link
Member Author

@harupy harupy Jan 5, 2022

Choose a reason for hiding this comment

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

This should prevent restoring cache that contains packages that the DESCRIPTION file doesn't (e.g. mleap).

# Cache spark archive downloaded in `mlflow/R/mlflow/.create-test-env.R`
- name: Cache spark archive
uses: actions/cache@v2
with:
path: ~/spark/spark-2.4.5-bin-hadoop2.7
key: ${{ hashFiles('mlflow/R/mlflow/.spark-version') }}
- name: Install system dependencies
run: |
sudo apt-get install -y libcurl4-openssl-dev
Expand Down
11 changes: 0 additions & 11 deletions mlflow/R/mlflow/.create-test-env.R
Expand Up @@ -13,14 +13,3 @@ reticulate::conda_install("'h5py<3.0.0'", envname = mlflow:::mlflow_conda_env_na
reticulate::conda_install(Sys.getenv("MLFLOW_HOME", "../../../../."), envname = mlflow:::mlflow_conda_env_name(), pip = TRUE)
reticulate::conda_install("xgboost", envname = mlflow:::mlflow_conda_env_name())
reticulate::conda_install(paste0("h2o==", packageVersion("h2o")), envname = mlflow:::mlflow_conda_env_name(), pip = TRUE)

# The default timeout value (60 seconds) can be insufficient for `spark_install` to complete
options(timeout=60 * 60)

spark_version_file <- "../.spark-version"
spark_version <- trimws(readChar(spark_version_file, file.info(spark_version_file)$size))

# Install MLeap runtime and required dependencies
sparklyr::spark_install(version = spark_version, verbose = TRUE)
mleap::install_maven()
mleap::install_mleap(version = "0.16.0")
Comment on lines -25 to -26
Copy link
Member Author

@harupy harupy Jan 5, 2022

Choose a reason for hiding this comment

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

I think the reason these lines suddenly started failing today is probably because cache for R has expired.

1 change: 0 additions & 1 deletion mlflow/R/mlflow/.spark-version

This file was deleted.