From ae671b484036b464cd159a5898d6fe0134427899 Mon Sep 17 00:00:00 2001 From: Daniel King Date: Sat, 28 Jan 2023 12:10:09 -0800 Subject: [PATCH 01/11] try list conversion --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e0ea7e02d8..f2fa42cfd9 100644 --- a/setup.py +++ b/setup.py @@ -200,7 +200,7 @@ def package_files(prefix: str, directory: str, extension: str): extra_deps['mlflow'] = ['mlflow>=2.0.1,<3.0'] -extra_deps['all'] = set(dep for deps in extra_deps.values() for dep in deps) +extra_deps['all'] = list(set(dep for deps in extra_deps.values() for dep in deps)) composer_data_files = ['py.typed'] composer_data_files += package_files('composer', 'yamls', '.yaml') From dd6fe39c0a165bf6fd9449380797cb96c901749a Mon Sep 17 00:00:00 2001 From: Daniel King Date: Sat, 28 Jan 2023 12:22:35 -0800 Subject: [PATCH 02/11] revert previous attempt and fix streaming spec --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index f2fa42cfd9..94d66d494b 100644 --- a/setup.py +++ b/setup.py @@ -180,7 +180,7 @@ def package_files(prefix: str, directory: str, extension: str): ] extra_deps['streaming'] = [ - 'mosaicml-streaming<0.3.*', + 'mosaicml-streaming<0.3', 'boto3>=1.21.45,<2', 'paramiko>=2.11.0,<3', ] @@ -200,7 +200,7 @@ def package_files(prefix: str, directory: str, extension: str): extra_deps['mlflow'] = ['mlflow>=2.0.1,<3.0'] -extra_deps['all'] = list(set(dep for deps in extra_deps.values() for dep in deps)) +extra_deps['all'] = set(dep for deps in extra_deps.values() for dep in deps) composer_data_files = ['py.typed'] composer_data_files += package_files('composer', 'yamls', '.yaml') @@ -210,7 +210,7 @@ def package_files(prefix: str, directory: str, extension: str): if package_name != 'mosaicml': print(f'`Building composer as `{package_name}`)', file=sys.stderr) - +print(extra_deps) setup(name=package_name, version=composer_version, author='MosaicML', From da92728c702d941ef11912df49a0c76e620333e1 Mon Sep 17 00:00:00 2001 From: Daniel King Date: Sat, 28 Jan 2023 12:46:14 -0800 Subject: [PATCH 03/11] upgrade isort version --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f17b013e00..eca4e6d3c9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,7 @@ repos: - repo: https://github.com/pycqa/isort hooks: - id: isort - rev: 5.10.1 + rev: 5.12.0 # - repo: https://github.com/pycqa/pylint # hooks: # - id: pylint From b9889186d90db5fb7611decb41f8013381d5044c Mon Sep 17 00:00:00 2001 From: Daniel King Date: Sat, 28 Jan 2023 12:59:55 -0800 Subject: [PATCH 04/11] move pip install to command section so that it can pick up changes to setup.py --- .github/mcp/mcp_pytest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/mcp/mcp_pytest.py b/.github/mcp/mcp_pytest.py index 88922486c8..e86677d146 100644 --- a/.github/mcp/mcp_pytest.py +++ b/.github/mcp/mcp_pytest.py @@ -28,7 +28,6 @@ 'integration_type': 'git_repo', 'git_repo': 'mosaicml/composer', 'ssh_clone': 'False', - 'pip_install': '--user -e .[all]', } if args.git_branch is not None and args.git_commit is None: git_integration['git_branch'] = args.git_branch @@ -45,6 +44,8 @@ git checkout pr_branch + pip install --user -e .[all] + ''' command += f''' From 12c7febb48d49414dfdfb5de221280f4a7ba5a29 Mon Sep 17 00:00:00 2001 From: Daniel King Date: Sat, 28 Jan 2023 13:06:24 -0800 Subject: [PATCH 05/11] add log --- .github/mcp/mcp_pytest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/mcp/mcp_pytest.py b/.github/mcp/mcp_pytest.py index e86677d146..603237fd18 100644 --- a/.github/mcp/mcp_pytest.py +++ b/.github/mcp/mcp_pytest.py @@ -34,7 +34,8 @@ if args.git_commit is not None: git_integration['git_commit'] = args.git_commit - command = 'cd composer' + command = 'echo Starting command section...' + command += 'cd composer' # Checkout a specific PR if specified if args.pr_number is not None: From f4a7a0f675077afbc9684aaf9e4ab1936c35a5b6 Mon Sep 17 00:00:00 2001 From: Daniel King Date: Sat, 28 Jan 2023 13:12:16 -0800 Subject: [PATCH 06/11] add log --- .github/workflows/pytest-gpu.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pytest-gpu.yaml b/.github/workflows/pytest-gpu.yaml index c6af30a7e7..9a75841e3c 100644 --- a/.github/workflows/pytest-gpu.yaml +++ b/.github/workflows/pytest-gpu.yaml @@ -54,4 +54,5 @@ jobs: run: | set -ex export PR_NUMBER=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH") + cat .github/mcp/mcp_pytest.py python .github/mcp/mcp_pytest.py --image '${{ matrix.container }}' --pr_number $PR_NUMBER --pytest_markers '${{ matrix.markers }}' --pytest_command '${{ matrix.pytest_command }}' From 4e31b9063ab86e05d80aa82e31b4075773c3ca2f Mon Sep 17 00:00:00 2001 From: Daniel King Date: Sat, 28 Jan 2023 13:15:22 -0800 Subject: [PATCH 07/11] try removing cache --- .github/workflows/pytest-gpu.yaml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/pytest-gpu.yaml b/.github/workflows/pytest-gpu.yaml index 9a75841e3c..d0b2d98a60 100644 --- a/.github/workflows/pytest-gpu.yaml +++ b/.github/workflows/pytest-gpu.yaml @@ -33,16 +33,6 @@ jobs: uses: actions/setup-python@v2 with: python-version: 3.9 - - name: Cache pip - uses: actions/cache@v2 - with: - # This path is specific to Ubuntu - path: ~/.cache/pip - # Look to see if there is a cache hit for the corresponding requirements file - key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }} - restore-keys: | - ${{ runner.os }}-pip- - ${{ runner.os }}- - name: Setup MCLI run: | set -ex From ee64a8a02bad2b6ecaeddf6a0f2324685118217b Mon Sep 17 00:00:00 2001 From: Daniel King Date: Sat, 28 Jan 2023 13:22:51 -0800 Subject: [PATCH 08/11] revert debugging changes --- .github/mcp/mcp_pytest.py | 3 +-- .github/workflows/pytest-gpu.yaml | 11 ++++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/mcp/mcp_pytest.py b/.github/mcp/mcp_pytest.py index 603237fd18..e86677d146 100644 --- a/.github/mcp/mcp_pytest.py +++ b/.github/mcp/mcp_pytest.py @@ -34,8 +34,7 @@ if args.git_commit is not None: git_integration['git_commit'] = args.git_commit - command = 'echo Starting command section...' - command += 'cd composer' + command = 'cd composer' # Checkout a specific PR if specified if args.pr_number is not None: diff --git a/.github/workflows/pytest-gpu.yaml b/.github/workflows/pytest-gpu.yaml index d0b2d98a60..c6af30a7e7 100644 --- a/.github/workflows/pytest-gpu.yaml +++ b/.github/workflows/pytest-gpu.yaml @@ -33,6 +33,16 @@ jobs: uses: actions/setup-python@v2 with: python-version: 3.9 + - name: Cache pip + uses: actions/cache@v2 + with: + # This path is specific to Ubuntu + path: ~/.cache/pip + # Look to see if there is a cache hit for the corresponding requirements file + key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + ${{ runner.os }}- - name: Setup MCLI run: | set -ex @@ -44,5 +54,4 @@ jobs: run: | set -ex export PR_NUMBER=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH") - cat .github/mcp/mcp_pytest.py python .github/mcp/mcp_pytest.py --image '${{ matrix.container }}' --pr_number $PR_NUMBER --pytest_markers '${{ matrix.markers }}' --pytest_command '${{ matrix.pytest_command }}' From ee695d515bcbe569b632a910a465749081786197 Mon Sep 17 00:00:00 2001 From: Daniel King Date: Sat, 28 Jan 2023 13:23:45 -0800 Subject: [PATCH 09/11] remov debugging print --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 94d66d494b..b79935ed66 100644 --- a/setup.py +++ b/setup.py @@ -210,7 +210,7 @@ def package_files(prefix: str, directory: str, extension: str): if package_name != 'mosaicml': print(f'`Building composer as `{package_name}`)', file=sys.stderr) -print(extra_deps) + setup(name=package_name, version=composer_version, author='MosaicML', From aa6fe1aa93b466269ac67bbe94e8a5e87d3b4685 Mon Sep 17 00:00:00 2001 From: Daniel King Date: Sat, 28 Jan 2023 13:28:27 -0800 Subject: [PATCH 10/11] remove editable install --- .github/mcp/mcp_pytest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/mcp/mcp_pytest.py b/.github/mcp/mcp_pytest.py index e86677d146..283a2333b9 100644 --- a/.github/mcp/mcp_pytest.py +++ b/.github/mcp/mcp_pytest.py @@ -44,7 +44,7 @@ git checkout pr_branch - pip install --user -e .[all] + pip install --user .[all] ''' From 904778c75277bc92be55bff0d4c3d4ded35da293 Mon Sep 17 00:00:00 2001 From: Daniel King Date: Sat, 28 Jan 2023 13:54:07 -0800 Subject: [PATCH 11/11] move pip install --- .github/mcp/mcp_pytest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/mcp/mcp_pytest.py b/.github/mcp/mcp_pytest.py index 283a2333b9..398f371ad0 100644 --- a/.github/mcp/mcp_pytest.py +++ b/.github/mcp/mcp_pytest.py @@ -44,12 +44,12 @@ git checkout pr_branch - pip install --user .[all] - ''' command += f''' + pip install --user .[all] + export COMMON_ARGS="-v --durations=20 -m '{args.pytest_markers}'" make test PYTEST='{args.pytest_command}' EXTRA_ARGS="$COMMON_ARGS --codeblocks"