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

feat: Support python 3.10 runtime in apps #126

Merged
merged 7 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 6 additions & 6 deletions .github/workflows/snyk-scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.10'

- name: Check changed Deps files
uses: tj-actions/changed-files@v35
Expand All @@ -42,12 +42,12 @@ jobs:
sed '/^\.\//d; /^https:\/\//d; /^flake8/d; /^black==/d' requirements.txt > t.txt \
&& mv t.txt requirements.txt

python3.8 -m pip install -r requirements.txt && cd $topdir
python3.10 -m pip install -r requirements.txt && cd $topdir

snyk test \
-d \
--file=$file \
--command=python3.8 \
--command=python3.10 \
--skip-unresolved \
--package-manager=pip
done
Expand All @@ -66,7 +66,7 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.10'

- name: Monitor Python dependencies
env:
Expand All @@ -80,12 +80,12 @@ jobs:
sed '/^\.\//d; /^https:\/\//d; /^flake8/d; /^black==/d' requirements.txt > t.txt \
&& mv t.txt requirements.txt

python3.8 -m pip install -r requirements.txt && cd $topdir
python3.10 -m pip install -r requirements.txt && cd $topdir

snyk monitor \
-d \
--file=$file \
--command=python3.8 \
--command=python3.10 \
--skip-unresolved \
--package-manager=pip \
--remote-repo-url=wave-apps/${{ steps.extract_ref.outputs.ref }} \
Expand Down
9 changes: 9 additions & 0 deletions churn-risk/.snyk
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ignore:
SNYK-PYTHON-H2O-6125908:
- "*":
reason: Not fixed version for h2o yet
expires: 2025-01-01T00:00:00.000Z
snyk:lic:pip:certifi:MPL-2.0:
- "*":
reason: False positive
expires: 2025-01-01T00:00:00.000Z
2 changes: 1 addition & 1 deletion churn-risk/app.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[App]
Name = "ai.h2o.wave.churn-risk"
Version = "1.1.0"
Version = "1.2.0"
Title = "Telco Churn Risk"
Description = "Demo to predict churn risk of telco customers and display top reason codes."
LongDescription = "about.md"
Expand Down
5 changes: 3 additions & 2 deletions churn-risk/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
pandas==1.1.0
pygments==2.7.1
pandas==1.5.3
pygments==2.17.2
h2o-wave<1.0
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wave 1.0 introduces a breaking change for handle_on functionality. So Wave update needs to be handled separately.

h2o-wave-ml>=0.7.0
https://h2o-release.s3.amazonaws.com/h2o/rel-zizler/7/Python/h2o-3.34.0.7-py2.py3-none-any.whl
setuptools==65.5.1

black==20.8b1
flake8-black==0.2.1
Expand Down
9 changes: 9 additions & 0 deletions credit-risk/.snyk
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ignore:
SNYK-PYTHON-H2O-6125908:
- "*":
reason: Not fixed version for h2o yet
expires: 2025-01-01T00:00:00.000Z
snyk:lic:pip:certifi:MPL-2.0:
- "*":
reason: False positive
expires: 2025-01-01T00:00:00.000Z
2 changes: 1 addition & 1 deletion credit-risk/app.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[App]
Name = "ai.h2o.wave.credit-risk"
Version = "1.1.0"
Version = "1.2.0"
Title = "Credit Card Risk"
Description = "Demo for business users to review and update model predictions."
LongDescription = "about.md"
Expand Down
13 changes: 7 additions & 6 deletions credit-risk/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
numpy==1.19.1
pandas==1.1.0
numpy==1.26.4
pandas==1.5.3
plotly==4.10.0
pygments==2.7.1
pygments==2.17.2
h2o-wave<1.0
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wave 1.0 introduces a breaking change for handle_on functionality. So Wave update needs to be handled separately.

h2o-wave-ml>=0.7.0
requests
tabulate
requests==2.31.0
tabulate==0.9.0
colorama>=0.3.8
future
future==0.18.3
setuptools==65.5.1
https://h2o-release.s3.amazonaws.com/h2o/rel-zizler/7/Python/h2o-3.34.0.7-py2.py3-none-any.whl
2 changes: 1 addition & 1 deletion credit-risk/src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ async def render_customer_page(q: Q):
)

# summary
top_feature = contribs.idxmin(axis=1) if approve else contribs.idxmax(axis=1)
top_feature = contribs.idxmin(axis=0) if approve else contribs.idxmax(axis=0)
explanation_data = {
'will_or_will_not': 'will' if approve else 'will not',
'top_contributing_feature': top_feature,
Expand Down
5 changes: 5 additions & 0 deletions explaining-ratings/.snyk
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ignore:
snyk:lic:pip:certifi:MPL-2.0:
- "*":
reason: False positive
expires: 2025-01-01T00:00:00.000Z
2 changes: 1 addition & 1 deletion explaining-ratings/app.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[App]
Name = "ai.h2o.wave.explaining-ratings"
Version = "1.1.0"
Version = "1.2.0"
Title = "Explainable Hotel Ratings"
Description = "Demo to visually explore and compare predictions from text data."
LongDescription = "about.md"
Expand Down
8 changes: 5 additions & 3 deletions explaining-ratings/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
pandas==1.1.0
pandas==1.5.3
h2o-wave<1.0
matplotlib
wordcloud
matplotlib==3.8.3
wordcloud==1.9.3
numpy==1.26.4
setuptools==65.5.1
5 changes: 5 additions & 0 deletions guess-the-number/.snyk
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ignore:
snyk:lic:pip:certifi:MPL-2.0:
- "*":
reason: False positive
expires: 2025-01-01T00:00:00.000Z
2 changes: 1 addition & 1 deletion guess-the-number/app.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[App]
Name = "ai.h2o.wave.h2o-guess-the-number"
Version = "1.1.0"
Version = "1.2.0"
Title = "Guess the Number"
Description = "Prove you’re smarter than AI with this simple game."
LongDescription = "about.md"
Expand Down
12 changes: 1 addition & 11 deletions guess-the-number/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,2 @@
certifi==2020.12.5; python_version >= "3.6" and python_full_version >= "3.6.1"
click==7.1.2; python_full_version >= "3.6.1"
h11==0.11.0; python_version >= "3.6" and python_full_version >= "3.6.1"
certifi==2024.2.2
h2o-wave<1.0
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wave 1.0 introduces a breaking change for handle_on functionality. So Wave update needs to be handled separately.

httpcore==0.12.2; python_version >= "3.6" and python_full_version >= "3.6.1"
httpx==0.16.1; python_version >= "3.6" and python_full_version >= "3.6.1"
idna==2.10; python_version >= "3.6" and python_full_version >= "3.6.1"
rfc3986==1.4.0; python_version >= "3.6" and python_full_version >= "3.6.1"
sniffio==1.2.0; python_version >= "3.6" and python_full_version >= "3.6.1"
starlette==0.13.8; python_version >= "3.6" and python_full_version >= "3.6.1"
typing-extensions==3.7.4.3; python_version < "3.8" and python_full_version >= "3.6.1"
uvicorn==0.12.2; python_full_version >= "3.6.1"
9 changes: 9 additions & 0 deletions insurance-churn-risk/.snyk
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ignore:
SNYK-PYTHON-H2O-6125908:
- "*":
reason: Not fixed version for h2o yet
expires: 2025-01-01T00:00:00.000Z
snyk:lic:pip:certifi:MPL-2.0:
- "*":
reason: False positive
expires: 2025-01-01T00:00:00.000Z
2 changes: 1 addition & 1 deletion insurance-churn-risk/app.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[App]
Name = "ai.h2o.wave.insurance-churn-risk"
Version = "1.1.0"
Version = "1.2.0"
Title = "Home Insurance Churn Risk"
Description = "Demo to predict churn risk of insurance customers and display top factors."
LongDescription = "about.md"
Expand Down
7 changes: 5 additions & 2 deletions insurance-churn-risk/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
pandas==1.1.0
pygments==2.7.1
certifi==2024.2.2
pandas==1.5.3
pygments==2.17.2
h2o-wave<1.0
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wave 1.0 introduces a breaking change for handle_on functionality. So Wave update needs to be handled separately.

h2o-wave-ml>=0.6.0
numpy==1.26.4
setuptools==65.5.1
https://h2o-release.s3.amazonaws.com/h2o/rel-zizler/7/Python/h2o-3.34.0.7-py2.py3-none-any.whl

black==20.8b1
Expand Down
5 changes: 5 additions & 0 deletions sales-forecasting/.snyk
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ignore:
snyk:lic:pip:certifi:MPL-2.0:
- "*":
reason: False positive
expires: 2025-01-01T00:00:00.000Z
38 changes: 19 additions & 19 deletions sales-forecasting/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
boto3==1.16.23
botocore==1.19.23
certifi==2020.11.8; python_version >= "3.6" and python_full_version >= "3.6.1"
click==7.1.2; python_full_version >= "3.6.1"
h11==0.11.0; python_version >= "3.6" and python_full_version >= "3.6.1"
h2o-wave<1.0; python_full_version >= "3.6.1"
httpcore==0.12.2; python_version >= "3.6" and python_full_version >= "3.6.1"
httpx==0.16.1; python_version >= "3.6" and python_full_version >= "3.6.1"
idna==2.10; python_version >= "3.6" and python_full_version >= "3.6.1"
jmespath==0.10.0; python_version >= "2.6" and python_full_version < "3.0.0" or python_full_version >= "3.3.0"
numpy==1.19.4; python_version >= "3.6" and python_full_version >= "3.6.1"
pandas==1.1.4; python_full_version >= "3.6.1"
python-dateutil==2.8.1; python_full_version >= "3.6.1"
pytz==2020.4; python_full_version >= "3.6.1"
rfc3986==1.4.0; python_version >= "3.6" and python_full_version >= "3.6.1"
certifi==2024.2.2; python_version >= "3.10" and python_full_version >= "3.10.10"
click==7.1.2; python_full_version >= "3.10.10"
h11==0.11.0; python_version >= "3.10" and python_full_version >= "3.10.10"
h2o-wave<1.0; python_full_version >= "3.10.10"
httpcore==0.15.0; python_version >= "3.10" and python_full_version >= "3.10.10"
httpx==0.23.0; python_version >= "3.10" and python_full_version >= "3.10.10"
idna==2.10; python_version >= "3.10" and python_full_version >= "3.10.10"
jmespath==0.10.0; python_version >= "3.10" and python_full_version >= "3.10.10"
numpy==1.26.4; python_version >= "3.10" and python_full_version >= "3.10.10"
pandas==1.5.3; python_version >= "3.10" and python_full_version >= "3.10.10"
python-dateutil==2.8.1; python_full_version >= "3.10.10"
pytz==2020.4; python_full_version >= "3.10.1"
rfc3986==1.4.0; python_version >= "3.10" and python_full_version >= "3.10.10"
s3transfer==0.3.3
six==1.15.0; python_full_version >= "3.6.1"
sniffio==1.2.0; python_version >= "3.6" and python_full_version >= "3.6.1"
starlette==0.13.8; python_version >= "3.6" and python_full_version >= "3.6.1"
typing-extensions==3.7.4.3; python_version < "3.8" and python_full_version >= "3.6.1"
urllib3==1.26.2; python_version >= "2.7" and python_full_version < "3.0.0" and python_version != "3.4" or python_full_version >= "3.5.0" and python_version < "4" and python_version != "3.4"
uvicorn==0.12.2; python_full_version >= "3.6.1"
six==1.15.0; python_full_version >= "3.10.10"
sniffio==1.2.0; python_version >= "3.10" and python_full_version >= "3.10.10"
starlette==0.37.1; python_version >= "3.10" and python_full_version >= "3.10.10"
typing-extensions==3.10.0; python_version >= "3.10" and python_full_version >= "3.10.10"
urllib3==1.26.18
uvicorn==0.12.3
5 changes: 5 additions & 0 deletions shopping-cart-recommendations/.snyk
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ignore:
snyk:lic:pip:certifi:MPL-2.0:
- "*":
reason: False positive
expires: 2025-01-01T00:00:00.000Z
2 changes: 1 addition & 1 deletion shopping-cart-recommendations/app.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[App]
Name = "ai.h2o.wave.shopping-cart-recommendations"
Version = "1.1.0"
Version = "1.2.0"
Title = "Shopping Cart Recommendations"
Description = "Demo of a recommendation engine on groceries items."
LongDescription="about.md"
Expand Down
5 changes: 4 additions & 1 deletion shopping-cart-recommendations/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
certifi==2024.2.2
h2o-wave<1.0
pandas==1.1.4
pandas==1.5.3
numpy==1.26.4
urllib3==1.26.18
5 changes: 5 additions & 0 deletions template-explore-binary-classification/.snyk
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ignore:
snyk:lic:pip:certifi:MPL-2.0:
- "*":
reason: False positive
expires: 2025-01-01T00:00:00.000Z
12 changes: 9 additions & 3 deletions template-explore-binary-classification/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
h2o_wave==0.20.0
certifi==2024.2.2
h2o_wave==0.26.3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wave 1.0 introduces a breaking change for handle_on functionality. So Wave update needs to be handled separately.

toml==0.10.2
loguru==0.6.0
pandas==1.4.1
matplotlib==3.5.1
pandas==1.5.3
matplotlib==3.5.1
starlette==0.37.1
typing-extensions==3.10.0
httpcore==0.15.0
httpx==0.23.0
setuptools==65.5.1
2 changes: 1 addition & 1 deletion twitter-sentiment/app.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[App]
Name = "ai.h2o.wave.twitter-sentiment"
Version = "1.1.0"
Version = "1.2.0"
Title = "Twitter Sentiment"
Description = "Search keywords on twitter and see the sentiments of the latest tweets."
LongDescription="about.md"
Expand Down
Loading