You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@submarine.apache.org by cd...@apache.org on 2023/03/26 00:45:44 UTC
[submarine] branch master updated: SUBMARINE-1372. Fix tensorflow 2.6.5 in CI always failed
This is an automated email from the ASF dual-hosted git repository.
cdmikechen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/submarine.git
The following commit(s) were added to refs/heads/master by this push:
new 5987b92a SUBMARINE-1372. Fix tensorflow 2.6.5 in CI always failed
5987b92a is described below
commit 5987b92af1ded1ad8cbd7ecc9d6403b8eb0d0ba1
Author: cdmikechen <cd...@apache.org>
AuthorDate: Sun Mar 19 12:18:29 2023 +0800
SUBMARINE-1372. Fix tensorflow 2.6.5 in CI always failed
### What is this PR for?
Limit torch under 3.0.0 and fix mypy error
### What type of PR is it?
Hot Fix
### Todos
* [x] - Limit typeguard < 3.0.0
* [x] - Fix mypy SQLAlchemy type check
* [x] - Add `pipdeptree` to better trace python dependency issues
### What is the Jira issue?
https://issues.apache.org/jira/browse/SUBMARINE-1372
### How should this be tested?
python CI
### Screenshots (if appropriate)
### Questions:
* Do the license files need updating? No
* Are there breaking changes for older versions? No
* Does this need new documentation? No
Author: cdmikechen <cd...@apache.org>
Signed-off-by: cdmikechen <cd...@apache.org>
Closes #1057 from cdmikechen/SUBMARINE-1372 and squashes the following commits:
9dc3c1f3 [cdmikechen] Fix format
8df285ee [cdmikechen] Avoid Optional[int] check
94a145ba [cdmikechen] format
8f876ba6 [cdmikechen] Limit typeguard < 3.0.0
576fdc45 [cdmikechen] Limit torch under 2.0.0
---
.github/workflows/python.yml | 2 +-
submarine-sdk/pysubmarine/github-actions/test-requirements.txt | 1 +
submarine-sdk/pysubmarine/setup.py | 5 +++++
.../pysubmarine/submarine/store/model_registry/sqlalchemy_store.py | 5 ++++-
4 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml
index df08c8f3..0646733c 100644
--- a/.github/workflows/python.yml
+++ b/.github/workflows/python.yml
@@ -76,7 +76,7 @@ jobs:
pip install --no-cache-dir -e ./submarine-sdk/pysubmarine/.[tf2,pytorch]
pip install --no-cache-dir 'tensorflow~=${{ matrix.tf-version }}'
- name: List installed packages
- run: pip list
+ run: pip list && pipdeptree
- name: Run unit test
working-directory: ./submarine-sdk/pysubmarine
run: pytest -m "not e2e" --cov-report xml
diff --git a/submarine-sdk/pysubmarine/github-actions/test-requirements.txt b/submarine-sdk/pysubmarine/github-actions/test-requirements.txt
index 7319debb..cf767b7e 100644
--- a/submarine-sdk/pysubmarine/github-actions/test-requirements.txt
+++ b/submarine-sdk/pysubmarine/github-actions/test-requirements.txt
@@ -26,3 +26,4 @@ python_dateutil>=2.5.3
scikit-learn>=0.24.2,<=1.0.2 # 1.1.x does not support cp37
setuptools>=21.0.0
urllib3>=1.15.1
+pipdeptree==2.5.2
diff --git a/submarine-sdk/pysubmarine/setup.py b/submarine-sdk/pysubmarine/setup.py
index 24e2da96..16463eea 100644
--- a/submarine-sdk/pysubmarine/setup.py
+++ b/submarine-sdk/pysubmarine/setup.py
@@ -54,6 +54,11 @@ setup(
"tensorflow-addons==0.17.0",
"tensorflow-estimator>=2.9.0rc0,<2.10.0",
"tf_slim==1.1.0",
+ # todo(cdmikechen): Based on SUBMARINE-1372, typeguard has recently been upgraded to version 3.0,
+ # which will restrict some python syntax and types more tightly.
+ # We are not upgrading this in submarine 0.8.0 for now,
+ # and will fix version compatibility issues in 0.8.1 or 0.9.0.
+ "typeguard<3.0.0",
],
"pytorch": ["torch>=1.5.0", "torchvision>=0.6.0"],
},
diff --git a/submarine-sdk/pysubmarine/submarine/store/model_registry/sqlalchemy_store.py b/submarine-sdk/pysubmarine/submarine/store/model_registry/sqlalchemy_store.py
index 3b1766bd..a174bc68 100644
--- a/submarine-sdk/pysubmarine/submarine/store/model_registry/sqlalchemy_store.py
+++ b/submarine-sdk/pysubmarine/submarine/store/model_registry/sqlalchemy_store.py
@@ -353,7 +353,10 @@ class SqlAlchemyStore(AbstractStore):
def next_version(sql_registered_model: SqlRegisteredModel) -> int:
if sql_registered_model.model_versions:
- return max(m.version for m in sql_registered_model.model_versions) + 1
+ return (
+ max(0 if m.version is None else m.version for m in sql_registered_model.model_versions)
+ + 1
+ )
else:
return 1
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@submarine.apache.org
For additional commands, e-mail: dev-help@submarine.apache.org