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

Restricting cornac to 1.15.1 for issue with 1.15.4 #1934

Merged
merged 22 commits into from
Jun 8, 2023
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
dc64de0
Restricting cornac to 1.15.1
miguelgfierro Jun 1, 2023
584c4ec
restrict cornac
miguelgfierro Jun 2, 2023
cc8edd1
Clarification cornac
miguelgfierro Jun 2, 2023
fce46cc
Install the development environment instead of the pip package
miguelgfierro Jun 2, 2023
4938e38
Install the development environment instead of the pip package
miguelgfierro Jun 2, 2023
7a69fba
Install the development environment instead of the pip package
miguelgfierro Jun 2, 2023
21460e5
Install the development environment instead of the pip package
miguelgfierro Jun 2, 2023
71bcd8f
Install the development environment instead of the pip package
miguelgfierro Jun 2, 2023
643d81b
Install the development environment instead of the pip package
miguelgfierro Jun 2, 2023
6960cb5
Try with interpreter options
miguelgfierro Jun 2, 2023
e18a4be
cornac
miguelgfierro Jun 5, 2023
81c2bce
WIP
miguelgfierro Jun 5, 2023
21b519b
Try building dockerfile
miguelgfierro Jun 6, 2023
a4adec9
Error with spark and gpu excluded tests
miguelgfierro Jun 6, 2023
cdaeb7a
Error with spark and gpu excluded tests
miguelgfierro Jun 6, 2023
5f80758
Error with spark and gpu excluded tests
miguelgfierro Jun 6, 2023
1c73cfb
Error with spark and gpu excluded tests
miguelgfierro Jun 6, 2023
be68442
Try to install the local wheel of recommenders
simonzhaoms Jun 7, 2023
67c6d25
Change pip install scheme
simonzhaoms Jun 7, 2023
754e428
Test normal usage of Environment.add_private_pip_wheel()
simonzhaoms Jun 8, 2023
28cdedc
Install recommenders from GitHub
simonzhaoms Jun 8, 2023
caf7192
Clean up
simonzhaoms Jun 8, 2023
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
11 changes: 7 additions & 4 deletions .github/actions/azureml-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ runs:
run: pip install --quiet wheel
- name: Create wheel from setup.py
shell: bash
run: python setup.py --quiet bdist_wheel
run: |
random_key=$(openssl rand 1000 | tr -dc 'a-z0-9' | fold -w 9 | head -n 1)
sed -i "/__version__/ s/$/ + '+${random_key}'/" setup.py
python setup.py --quiet bdist_wheel
- name: Submit CPU tests to AzureML
shell: bash
if: contains(inputs.TEST_GROUP, 'cpu')
Expand All @@ -94,7 +97,7 @@ runs:
--rg ${{inputs.RG}} --wsname ${{inputs.WS}} --expname ${{inputs.EXP_NAME}}_${{inputs.TEST_GROUP}}
--testlogs ${{inputs.TEST_LOGS_PATH}} --testkind ${{inputs.TEST_KIND}}
--conda_pkg_python ${{inputs.PYTHON_VERSION}} --testgroup ${{inputs.TEST_GROUP}}
--disable-warnings
--disable-warnings --sha "${GITHUB_SHA}"
- name: Submit GPU tests to AzureML
shell: bash
if: contains(inputs.TEST_GROUP, 'gpu')
Expand All @@ -104,7 +107,7 @@ runs:
--rg ${{inputs.RG}} --wsname ${{inputs.WS}} --expname ${{inputs.EXP_NAME}}_${{inputs.TEST_GROUP}}
--testlogs ${{inputs.TEST_LOGS_PATH}} --add_gpu_dependencies --testkind ${{inputs.TEST_KIND}}
--conda_pkg_python ${{inputs.PYTHON_VERSION}} --testgroup ${{inputs.TEST_GROUP}}
--disable-warnings
--disable-warnings --sha "${GITHUB_SHA}"
- name: Submit PySpark tests to AzureML
shell: bash
if: contains(inputs.TEST_GROUP, 'spark')
Expand All @@ -114,7 +117,7 @@ runs:
--rg ${{inputs.RG}} --wsname ${{inputs.WS}} --expname ${{inputs.EXP_NAME}}_${{inputs.TEST_GROUP}}
--testlogs ${{inputs.TEST_LOGS_PATH}} --add_spark_dependencies --testkind ${{inputs.TEST_KIND}}
--conda_pkg_python ${{inputs.PYTHON_VERSION}} --testgroup ${{inputs.TEST_GROUP}}
--disable-warnings
--disable-warnings --sha "${GITHUB_SHA}"
- name: Print test logs
shell: bash
run: cat ${{inputs.TEST_LOGS_PATH}}
Expand Down
12 changes: 8 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
install_requires = [
"numpy>=1.19", # 1.19 required by tensorflow 2.6
"pandas>1.0.3,<2",
"scipy>=1.0.0,<2",
"scipy>=1.0.0,<2",
"tqdm>=4.31.1,<5",
"matplotlib>=2.2.2,<4",
"scikit-learn>=0.22.1,<1.0.3",
Expand All @@ -45,7 +45,8 @@
"jinja2>=2,<3.1",
"pyyaml>=5.4.1,<6",
"requests>=2.0.0,<3",
"cornac>=1.1.2,<2",
"cornac>=1.1.2,<1.15.2;python_version<='3.7'",
"cornac>=1.15.2,<2;python_version>='3.8'", # After 1.15.2, Cornac requires python 3.8
"retrying>=1.3.3",
"pandera[strategies]>=0.6.5", # For generating fake datasets
"scikit-surprise>=1.0.6",
Expand Down Expand Up @@ -137,6 +138,9 @@
install_requires=install_requires,
package_dir={"recommenders": "recommenders"},
python_requires=">=3.6, <3.10",
packages=find_packages(where=".", exclude=["contrib", "docs", "examples", "scenarios", "tests", "tools"]),
setup_requires=["numpy>=1.15"]
packages=find_packages(
where=".",
exclude=["contrib", "docs", "examples", "scenarios", "tests", "tools"],
),
setup_requires=["numpy>=1.15"],
)
37 changes: 17 additions & 20 deletions tests/ci/azureml_tests/submit_groupwise_azureml_pytest.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def create_run_config(
add_spark_dependencies,
conda_pkg_jdk,
conda_pkg_python,
reco_wheel_path,
commit_sha,
):
"""
AzureML requires the run environment to be setup prior to submission.
Expand All @@ -172,6 +172,7 @@ def create_run_config(
added to the conda environment, else False
add_spark_dependencies (bool) : True if PySpark packages should be
added to the conda environment, else False
commit_sha (str) : the commit that triggers the workflow

Return:
run_azuremlcompute : AzureML run config
Expand All @@ -188,32 +189,28 @@ def create_run_config(
# True means the user will manually configure the environment
run_azuremlcompute.environment.python.user_managed_dependencies = False

# install local version of recommenders on AzureML compute using .whl file
whl_url = run_azuremlcompute.environment.add_private_pip_wheel(
workspace=workspace,
file_path=reco_wheel_path,
exist_ok=True,
)
conda_dep = CondaDependencies()
conda_dep.add_conda_package(conda_pkg_python)
conda_dep.add_pip_package(whl_url)
conda_dep.add_pip_package(
"pymanopt@https://github.com/pymanopt/pymanopt/archive/fb36a272cdeecb21992cfd9271eb82baafeb316d.zip"
)

# install extra dependencies
# install recommenders
reco_extras = "dev,examples"
if add_gpu_dependencies and add_spark_dependencies:
conda_dep.add_channel("conda-forge")
conda_dep.add_conda_package(conda_pkg_jdk)
conda_dep.add_pip_package("recommenders[dev,examples,spark,gpu]")
reco_extras = reco_extras + ",spark,gpu"
elif add_gpu_dependencies:
conda_dep.add_pip_package("recommenders[dev,examples,gpu]")
reco_extras = reco_extras + ",gpu"
elif add_spark_dependencies:
conda_dep.add_channel("conda-forge")
conda_dep.add_conda_package(conda_pkg_jdk)
conda_dep.add_pip_package("recommenders[dev,examples,spark]")
else:
conda_dep.add_pip_package("recommenders[dev,examples]")
reco_extras = reco_extras + ",spark"

conda_dep.add_pip_package(
f"recommenders[{reco_extras}]@git+https://github.com/microsoft/recommenders.git@{commit_sha}"
)

run_azuremlcompute.environment.python.conda_dependencies = conda_dep
return run_azuremlcompute
Expand Down Expand Up @@ -286,6 +283,11 @@ def create_arg_parser():
"""

parser = argparse.ArgumentParser(description="Process some inputs")
parser.add_argument(
"--sha",
action="store",
help="the commit that triggers the workflow",
)
# script to run pytest
parser.add_argument(
"--test",
Expand Down Expand Up @@ -448,11 +450,6 @@ def create_arg_parser():
max_nodes=args.maxnodes,
)

wheel_list = glob.glob("./dist/*.whl")
if not wheel_list:
logger.error("Wheel not found!")
logger.info("Found wheel at " + wheel_list[0])

run_config = create_run_config(
cpu_cluster=cpu_cluster,
docker_proc_type=docker_proc_type,
Expand All @@ -461,7 +458,7 @@ def create_arg_parser():
add_spark_dependencies=args.add_spark_dependencies,
conda_pkg_jdk=args.conda_pkg_jdk,
conda_pkg_python=args.conda_pkg_python,
reco_wheel_path=wheel_list[0],
commit_sha=args.sha,
)

logger.info("exp: In Azure, look for experiment named {}".format(args.expname))
Expand Down