Skip to content

Commit

Permalink
Merge pull request #2009 from recommenders-team/miguel/review_azureml…
Browse files Browse the repository at this point in the history
…_tests

Review azureml tests
  • Loading branch information
miguelgfierro authored Oct 7, 2023
2 parents 793ef41 + a1a1785 commit d3da0fe
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
3 changes: 0 additions & 3 deletions .github/actions/azureml-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,6 @@ runs:
--testlogs ${{inputs.TEST_LOGS_PATH}} --add_spark_dependencies --testkind ${{inputs.TEST_KIND}}
--conda_pkg_python ${{inputs.PYTHON_VERSION}} --testgroup ${{inputs.TEST_GROUP}}
--disable-warnings --sha "${GITHUB_SHA}"
- name: Print test logs
shell: bash
run: cat ${{inputs.TEST_LOGS_PATH}}
- name: Get exit status
shell: bash
id: exit_status
Expand Down
9 changes: 7 additions & 2 deletions tests/ci/azureml_tests/run_groupwise_pytest.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import pytest
import argparse
import glob
import pkg_resources
from azureml.core import Run
from test_groups import nightly_test_groups, pr_gate_test_groups

Expand Down Expand Up @@ -48,15 +49,19 @@
else:
test_group = pr_gate_test_groups[args.testgroup]

logger.info(f"Python version: {sys.version}")

logger.info("Installed packages:")
for p in pkg_resources.working_set:
logger.info(f" {p.project_name}:{p.version}")

logger.info("Tests to be executed")
logger.info(str(test_group))

# Run.get_context() is needed to save context as pytest causes corruption
# of env vars
run = Run.get_context()

logger.info("Python version ")
logger.info(str(sys.version))
logger.info("Executing tests now...")

# Add options to pytest command (Duration and disable warnings)
Expand Down
5 changes: 1 addition & 4 deletions tests/ci/azureml_tests/submit_groupwise_azureml_pytest.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ def setup_persistent_compute_target(workspace, cluster_name, vm_size, max_nodes)
def create_run_config(
cpu_cluster,
docker_proc_type,
workspace,
add_gpu_dependencies,
add_spark_dependencies,
conda_pkg_jdk,
Expand All @@ -167,7 +166,6 @@ def create_run_config(
- Reco_cpu_test
- Reco_gpu_test
docker_proc_type (str) : processor type, cpu or gpu
workspace : workspace reference
add_gpu_dependencies (bool) : True if gpu packages should be
added to the conda environment, else False
add_spark_dependencies (bool) : True if PySpark packages should be
Expand Down Expand Up @@ -400,7 +398,7 @@ def create_arg_parser():
"--conda_pkg_python",
action="store",
default="python=3.7",
help="conda package name for jdk",
help="conda package for Python",
)
parser.add_argument(
"--testkind",
Expand Down Expand Up @@ -453,7 +451,6 @@ def create_arg_parser():
run_config = create_run_config(
cpu_cluster=cpu_cluster,
docker_proc_type=docker_proc_type,
workspace=workspace,
add_gpu_dependencies=args.add_gpu_dependencies,
add_spark_dependencies=args.add_spark_dependencies,
conda_pkg_jdk=args.conda_pkg_jdk,
Expand Down
1 change: 1 addition & 0 deletions tests/unit/recommenders/utils/test_gpu_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,6 @@ def test_tensorflow_gpu():


@pytest.mark.gpu
@pytest.mark.skip(reason="This function in PyTorch is flaky")
def test_pytorch_gpu():
assert torch.cuda.is_available()

0 comments on commit d3da0fe

Please sign in to comment.