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

[backport/0.42] Backport important patches #2062

Merged
merged 10 commits into from
Dec 18, 2023
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
9 changes: 7 additions & 2 deletions .github/actions/setup_environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,19 @@ runs:
shell: bash
run: |
zenml integration export-requirements --output-file integration-requirements.txt --ignore-integration feast --ignore-integration label_studio --ignore-integration bentoml --ignore-integration seldon --ignore-integration kserve --ignore-integration langchain --ignore-integration llama_index --ignore-integration pycaret
# pin pyyaml>=6.0.1
echo "" >> integration-requirements.txt
echo "pyyaml>=6.0.1" >> integration-requirements.txt
pip install -r integration-requirements.txt
rm integration-requirements.txt

- name: Install langchain and llama_index integrations


- name: Install langchain integration
if: steps.cache-virtualenv.outputs.cache-hit != 'true' && inputs.install_integrations == 'yes'
shell: bash
run: |
zenml integration install -y langchain llama_index
zenml integration install -y langchain

# Refresh the ZenML installation if using a cached virtualenv or after
# installing integrations
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_api_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ jobs:

- name: Runs docs generation
run: |
bash scripts/generate-docs.sh -s src/zenml/ --push --latest -v ${{ steps.get_version.outputs.VERSION }}
bash scripts/generate-docs.sh -s src/zenml/ --push -v ${{ steps.get_version.outputs.VERSION }}
5 changes: 4 additions & 1 deletion .github/workflows/publish_to_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ jobs:
virtualenvs-in-project: true

- name: Include latest dashboard
run: bash scripts/install-dashboard.sh
shell: bash
env:
TAG: v0.9.0
run: scripts/install-dashboard.sh

- name: publish
env:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
·
<a href="#-meet-the-team">Meet the Team</a>
<br />
🎉 Version 0.42.1 is out. Check out the release notes
🎉 Version 0.42.2 is out. Check out the release notes
<a href="https://github.com/zenml-io/zenml/releases">here</a>.
<br />
<br />
Expand Down
6 changes: 6 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<!-- markdown-link-check-disable -->
# 0.42.2

Backports some important fixes that have been introduced in more recent versions
of ZenML to the 0.42.x release line.

**Full Changelog**: https://github.com/zenml-io/zenml/compare/0.42.1...0.42.2

# 0.42.1

Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "zenml"
version = "0.42.1"
version = "0.42.2"
packages = [
{ include = "zenml", from = "src" },
]
Expand Down Expand Up @@ -69,7 +69,7 @@ python-terraform = { version = "^0.10.1" }
pyyaml = ">=6.0.1"
rich = {extras = ["jupyter"], version = "^12.0.0"}
sqlalchemy_utils = "0.38.3"
sqlmodel = "~0.0.8"
sqlmodel = "0.0.8"

# Optional dependencies for the ZenServer
fastapi = { version = ">=0.75,<0.100", optional = true }
Expand Down Expand Up @@ -345,6 +345,7 @@ module = [
"datasets.*",
"pyngrok.*",
"cloudpickle.*",
"matplotlib.*",
]
ignore_missing_imports = true

Expand Down
21 changes: 0 additions & 21 deletions release-cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ steps:
-f docker/base.Dockerfile . \
-t $$USERNAME/zenml:$TAG_NAME-py3.8 \
-t $$USERNAME/zenml:$TAG_NAME

# use latest tags only for official releases
if [[ $TAG_NAME =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]]; then
docker tag $$USERNAME/zenml:$TAG_NAME-py3.8 $$USERNAME/zenml:py3.8
docker tag $$USERNAME/zenml:$TAG_NAME-py3.8 $$USERNAME/zenml:latest
fi
id: build-base-3.8
waitFor: ['-']
entrypoint: bash
Expand All @@ -34,11 +28,6 @@ steps:
--target base \
-f docker/base.Dockerfile . \
-t $$USERNAME/zenml:$TAG_NAME-py3.9

# use latest tags only for official releases
if [[ $TAG_NAME =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]]; then
docker tag $$USERNAME/zenml:$TAG_NAME-py3.9 $$USERNAME/zenml:py3.9
fi
id: build-base-3.9
waitFor: ['-']
entrypoint: bash
Expand All @@ -56,11 +45,6 @@ steps:
--target base \
-f docker/base.Dockerfile . \
-t $$USERNAME/zenml:$TAG_NAME-py3.10

# use latest tags only for official releases
if [[ $TAG_NAME =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]]; then
docker tag $$USERNAME/zenml:$TAG_NAME-py3.10 $$USERNAME/zenml:py3.10
fi
id: build-base-3.10
waitFor: ['-']
entrypoint: bash
Expand All @@ -77,11 +61,6 @@ steps:
--build-arg PYTHON_VERSION=3.8 \
-f docker/base.Dockerfile . \
-t $$USERNAME/zenml-server:$TAG_NAME

# use latest tags only for official releases
if [[ $TAG_NAME =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]]; then
docker tag $$USERNAME/zenml-server:$TAG_NAME $$USERNAME/zenml-server:latest
fi
id: build-server
waitFor: ['-']
entrypoint: bash
Expand Down
2 changes: 1 addition & 1 deletion src/zenml/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.42.1
0.42.2
4 changes: 3 additions & 1 deletion src/zenml/integrations/deepchecks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ class DeepchecksIntegration(Integration):
NAME = DEEPCHECKS
REQUIREMENTS = [
"deepchecks[vision]==0.8.0",
"torchvision==0.14.0",
"torchvision>=0.14.0",
"pandas<2.0.0",
"opencv-python==4.5.5.64", # pin to same version
"opencv-python-headless==4.5.5.64", # pin to same version
]
APT_PACKAGES = ["ffmpeg", "libsm6", "libxext6"]

Expand Down
2 changes: 1 addition & 1 deletion src/zenml/integrations/langchain/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class LangchainIntegration(Integration):
"""Definition of langchain integration for ZenML."""

NAME = LANGCHAIN
REQUIREMENTS = ["langchain>=0.0.116"]
REQUIREMENTS = ["langchain>=0.0.116", "pyyaml>=6.0.1"]

@classmethod
def activate(cls) -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
LCDocument = Any
else:
from langchain.docstore.document import Document as LCDocument
from llama_index.readers.schema.base import Document
from llama_index.readers.schema.base import ( # type: ignore[import]
Document,
)


class LlamaIndexDocumentMaterializer(LangchainDocumentMaterializer):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,12 @@
GPTFaissIndex = Any
T = TypeVar("T", bound=Any)
else:
from llama_index.indices.base import BaseGPTIndex
from llama_index.indices.vector_store import GPTFaissIndex
from llama_index.indices.base import ( # type: ignore[import]
BaseGPTIndex,
)
from llama_index.indices.vector_store import ( # type: ignore[import]
GPTFaissIndex,
)

T = TypeVar("T", bound=BaseGPTIndex[Any])

Expand Down
2 changes: 1 addition & 1 deletion src/zenml/integrations/openai/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class OpenAIIntegration(Integration):
"""Definition of OpenAI integration for ZenML."""

NAME = OPEN_AI
REQUIREMENTS = ["openai>=0.27.0"]
REQUIREMENTS = ["openai>=0.27.0,<1.0.0"]


OpenAIIntegration.check_installation()
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def openai_alerter_failure_hook_helper(
sys.stdout = original_stdout
rich_traceback = output_captured.getvalue()

response = openai.ChatCompletion.create( # type: ignore[no-untyped-call]
response = openai.ChatCompletion.create( # type: ignore
model=model_name,
messages=[
{
Expand Down
4 changes: 2 additions & 2 deletions src/zenml/materializers/numpy_materializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def _save_histogram(self, output_path: str, arr: "NDArray[Any]") -> None:
output_path: The path to save the histogram to.
arr: The numpy array of which to save the histogram.
"""
import matplotlib.pyplot as plt # type: ignore
import matplotlib.pyplot as plt

plt.hist(arr)
with fileio.open(output_path, "wb") as f:
Expand Down Expand Up @@ -183,7 +183,7 @@ def _save_image(self, output_path: str, arr: "NDArray[Any]") -> None:
output_path: The path to save the image to.
arr: The numpy array to save.
"""
from matplotlib.image import imsave # type: ignore
from matplotlib.image import imsave

with fileio.open(output_path, "wb") as f:
imsave(f, arr)
Expand Down
3 changes: 3 additions & 0 deletions src/zenml/zen_server/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ def authenticate_credentials(
elif activation_token is not None:
if not UserAuthModel.verify_activation_token(activation_token, user):
return None
else:
if authentication_scheme() != AuthScheme.NO_AUTH:
return None

return auth_context

Expand Down
2 changes: 1 addition & 1 deletion src/zenml/zen_server/deploy/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ home: https://zenml.io
sources:
- https://github.com/zenml-io/zenml
icon: https://raw.githubusercontent.com/zenml-io/zenml/main/docs/book/.gitbook/assets/zenml_logo.png
appVersion: "0.42.1"
appVersion: "0.42.2"

This file was deleted.

13 changes: 0 additions & 13 deletions tests/unit/integrations/llama_index/__init__.py

This file was deleted.

13 changes: 0 additions & 13 deletions tests/unit/integrations/llama_index/materializers/__init__.py

This file was deleted.

This file was deleted.

Loading