You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@submarine.apache.org by GitBox <gi...@apache.org> on 2022/09/14 13:05:16 UTC

[GitHub] [submarine] cdmikechen commented on a diff in pull request #994: SUBMARINE-1320. Drop supports for Python2.7 and Python3.6

cdmikechen commented on code in PR #994:
URL: https://github.com/apache/submarine/pull/994#discussion_r970780159


##########
website/versioned_docs/version-0.7.0/userDocs/submarine-sdk/pysubmarine/development.md:
##########
@@ -24,7 +24,7 @@ This is required for developing & testing changes, we recommend installing pysub
 in its own conda environment by running the following
 
 ```bash
-conda create --name submarine-dev python=3.6
+conda create --name submarine-dev python=3.7

Review Comment:
   I think the python codes with existing version documentation (0.6/0.7) can be left unchanged. Our focus can be more on master (0.8 or future).



##########
.github/workflows/python.yml:
##########
@@ -40,33 +42,73 @@ jobs:
     timeout-minutes: 30
     strategy:
       matrix:
-        python-version: [3.6, 3.7]
-        tf-version: [1.15.0, 2.6.0]
+        python-version: ['3.7', '3.8', '3.9', '3.10']
+        tf-version: ['tf15', 'tf26', 'tf27', 'tf28', 'tf29']
+        exclude:
+          - python-version: '3.8'
+            tf-version: 'tf15'
+          - python-version: '3.9'
+            tf-version: 'tf15'
+          - python-version: '3.10'
+            tf-version: 'tf15'
+          - python-version: '3.10'
+            tf-version: 'tf26'
+          - python-version: '3.10'
+            tf-version: 'tf27'
       fail-fast: false
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Setup python environment
-        uses: actions/setup-python@v2
+        uses: actions/setup-python@v4
         with:
           python-version: ${{ matrix.python-version }}
       - name: Install requirements
         run: |
-          pip install --upgrade pip
+          pip install --upgrade pip setuptools wheel
           pip install -r ./submarine-sdk/pysubmarine/github-actions/test-requirements.txt
-      - name: Install pysubmarine with tf1 and pytorch
-        if: matrix.tf-version == '1.15.0'
+      - name: Install pysubmarine with tf1.5 and pytorch
+        if: ${{ matrix.tf-version == 'tf15' }}
         run: pip install --no-cache-dir -e ./submarine-sdk/pysubmarine/.[tf,pytorch]
-      - name: Install pysubmarine with tf2 and pytorch
-        if: matrix.tf-version == '2.6.0'
-        run: pip install --no-cache-dir -e ./submarine-sdk/pysubmarine/.[tf2,pytorch]
+      - name: Install pysubmarine with tf2.6 and pytorch
+        if: ${{ matrix.tf-version == 'tf26' }}
+        run: pip install --no-cache-dir tensorflow==2.6.5 && pip install --no-cache-dir -e ./submarine-sdk/pysubmarine/.[tf2,pytorch]
+      - name: Install pysubmarine with tf2.7 and pytorch
+        if: ${{ matrix.tf-version == 'tf27' }}
+        run: pip install --no-cache-dir tensorflow==2.7.3 && pip install --no-cache-dir -e ./submarine-sdk/pysubmarine/.[tf2,pytorch]
+      - name: Install pysubmarine with tf2.8 and pytorch
+        if: ${{ matrix.tf-version == 'tf28' }}
+        run: pip install --no-cache-dir tensorflow==2.8.2 && pip install --no-cache-dir -e ./submarine-sdk/pysubmarine/.[tf2,pytorch]
+      - name: Install pysubmarine with tf2.9 and pytorch
+        if: ${{ matrix.tf-version == 'tf29' }}
+        run: pip install --no-cache-dir tensorflow==2.9.2 && pip install --no-cache-dir -e ./submarine-sdk/pysubmarine/.[tf2,pytorch]

Review Comment:
   The version of tensorflow may also be updated, and I was wondering if it could be defined in the following way so that pip would be smarter about downloading the latest packages to keep the version up-to-date/reliable.
   ```shell
   # if I want to install latest 2.9.x 
   pip install tensorflow<2.10.0 
   ```



##########
dev-support/style-check/python/lint-requirements.txt:
##########
@@ -13,7 +13,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-click==8.0.4 # For black to work properly. See SUBMARINE-1249.
-black[jupyter]==21.8b0
-flake8==3.9.2
-isort==5.9.3
+black[jupyter]

Review Comment:
   Can we still define a new dependency versions in order to avoid the problem of version conflicts that will arise again in the future?



##########
submarine-sdk/pysubmarine/setup.py:
##########
@@ -28,41 +28,41 @@
     packages=find_packages(exclude=["tests", "tests.*"]),
     package_data={"submarine.cli.config": ["cli_config.yaml"]},
     install_requires=[
-        "six>=1.10.0",
-        "numpy==1.19.2",
+        "numpy",
         "pandas",
         "sqlalchemy>=1.4.0",
         "sqlparse",
         "pymysql",
-        "requests==2.26.0",
+        "requests",
         "urllib3>=1.15.1",
         "certifi>=14.05.14",
         "python-dateutil>=2.5.3",
         "pyarrow>=6.0.1",
         "boto3>=1.17.58",
-        "click==8.0.3",
-        "rich==10.15.2",
-        "dacite==1.6.0",
-        "dataclasses>=0.6",
-        "pyaml==21.10.1",
+        "click>=8.1.0",
+        "rich",
+        "dacite",
+        "pyaml",
     ],
     extras_require={
-        "tf": ["tensorflow==1.15.0", "protobuf<=3.20.1"],
+        "tf": ["tensorflow==1.15.5", "numpy>=1.16.0,<1.19.0", "protobuf>=3.6.1,<3.20"],

Review Comment:
   3.20.1 should be the final supported version.
   https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@submarine.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org