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

Adding Known Issues Section to README.md #107

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
86c3630
fix: made install_protoc.sh compatible with wget2 (#256)
Al-Pragliola Aug 12, 2024
914aaa3
build(deps): bump aiohttp from 3.10.1 to 3.10.3 in /clients/python (#…
dependabot[bot] Aug 12, 2024
d7208ff
build(deps-dev): bump furo from 2024.7.18 to 2024.8.6 in /clients/pyt…
dependabot[bot] Aug 12, 2024
ce173e1
build(deps-dev): bump mypy from 1.11.0 to 1.11.1 in /clients/python (…
dependabot[bot] Aug 12, 2024
d6d4444
build(deps-dev): bump ruff from 0.5.6 to 0.5.7 in /clients/python (#264)
dependabot[bot] Aug 12, 2024
8c70b65
openapi: require name for contexts (#253)
isinyaaa Aug 12, 2024
e15fb89
build(deps): bump react-dom from 18.2.0 to 18.3.1 in /clients/ui/fron…
dependabot[bot] Aug 13, 2024
b6d358a
build(deps-dev): bump style-loader from 3.3.4 to 4.0.0 in /clients/ui…
dependabot[bot] Aug 13, 2024
23abcb3
build(deps-dev): bump rimraf from 5.0.7 to 6.0.1 in /clients/ui/front…
dependabot[bot] Aug 13, 2024
feeb0dc
build(deps): bump @patternfly/react-styles from 6.0.0-alpha.24 to 6.0…
dependabot[bot] Aug 13, 2024
462a7b8
Adds description and display name properties to mocked ModelRegistry …
alexcreasy Aug 15, 2024
721cdd2
py: update contexts (#270)
isinyaaa Aug 19, 2024
22c93da
GHA: build: simplify action (#271)
isinyaaa Aug 19, 2024
46bc5f0
build(deps): bump github.com/docker/docker from 27.1.1+incompatible t…
dependabot[bot] Aug 19, 2024
689b20b
build(deps): bump aiohttp from 3.10.3 to 3.10.4 in /clients/python (#…
dependabot[bot] Aug 19, 2024
7d53ea3
Bump ruff to 0.6.1 (#285)
isinyaaa Aug 20, 2024
e578a3f
Adding Known Issues Section
tonyxrmdavidson Aug 20, 2024
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
33 changes: 12 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ name: Build
on:
push:
branches:
- 'main'
- "main"
pull_request:
paths-ignore:
- 'LICENSE*'
- 'DOCKERFILE*'
- '**.gitignore'
- '**.md'
- '**.txt'
- '.github/ISSUE_TEMPLATE/**'
- '.github/dependabot.yml'
- 'docs/**'
- 'scripts/**'
- "LICENSE*"
- "DOCKERFILE*"
- "**.gitignore"
- "**.md"
- "**.txt"
- ".github/ISSUE_TEMPLATE/**"
- ".github/dependabot.yml"
- "docs/**"
- "scripts/**"
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -22,22 +22,13 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
version: "24.3"
repo-token: ${{ secrets.GITHUB_TOKEN }}
go-version: "1.21"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install makefile dependencies
run: make deps
- name: Clean
run: make clean
- name: Build
run: make build
run: make clean build
- name: Check if there are uncommitted file changes
run: |
clean=$(git status --porcelain)
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,19 @@ End-to-end testing is developed with Robot Framework; this higher-lever layer of
- demonstrate *User Stories* from high level perspective
- demonstrate coherent logical data mapping by performing the same high level capabilities, using REST API flow Vs Python client flow,
directly checking the end results in the backend gRPC MLMD server.

## Known Issues
### Model-Registry-db mysql:8.3.0 rate limiting

Ocassionally you may encounter an 'ImagePullBackOff' error within the model-registry-db container. See example below.

```
Failed to pull image “mysql:8.3.0”: rpc error: code = Unknown desc = fetching target platform image selected from image index: reading manifest sha256:f9097d95a4ba5451fff79f4110ea6d750ac17ca08840f1190a73320b84ca4c62 in docker.io/library/mysql: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
```

This error is caused by the use of the image tag mysql:8.3.0. To mitigate against this error you can use the following image, to be updated in the file with key value pair.
```
manifests/kustomize/overlays/db/model-registry-db-deployment.yaml file.

spec.template.spec.containers.image: public.ecr.aws/docker/library/mysql:8.3.0
```
14 changes: 14 additions & 0 deletions api/openapi/model-registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1023,10 +1023,18 @@ components:
- $ref: "#/components/schemas/BaseResourceList"
RegisteredModelCreate:
description: A registered model in model registry. A registered model has ModelVersion children.
required:
- name
allOf:
- type: object
- $ref: "#/components/schemas/BaseResourceCreate"
- $ref: "#/components/schemas/RegisteredModelUpdate"
properties:
name:
description: |-
The client provided name of the model. It must be unique among all the RegisteredModels of the same
type within a Model Registry instance and cannot be changed once set.
type: string
RegisteredModelUpdate:
description: A registered model in model registry. A registered model has ModelVersion children.
allOf:
Expand All @@ -1045,6 +1053,7 @@ components:
ModelVersionCreate:
description: Represents a ModelVersion belonging to a RegisteredModel.
required:
- name
- registeredModelId
allOf:
- $ref: "#/components/schemas/BaseResourceCreate"
Expand All @@ -1054,6 +1063,11 @@ components:
registeredModelId:
description: ID of the `RegisteredModel` to which this version belongs.
type: string
name:
description: |-
The client provided name of the model's version. It must be unique among all the ModelVersions of the same
type within a Model Registry instance and cannot be changed once set.
type: string
ModelVersionUpdate:
description: Represents a ModelVersion belonging to a RegisteredModel.
allOf:
Expand Down
258 changes: 129 additions & 129 deletions clients/python/poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion clients/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ sphinx-autobuild = ">=2021.3.14,<2025.0.0"
pytest = ">=7.4.2,<9.0.0"
coverage = { extras = ["toml"], version = "^7.3.2" }
pytest-cov = ">=4.1,<6.0"
ruff = "^0.5.2"
ruff = ">=0.5.2,<0.7.0"
mypy = "^1.7.0"
pytest-asyncio = "^0.23.7"
requests = "^2.32.2"
Expand Down
3 changes: 2 additions & 1 deletion clients/python/src/model_registry/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
from dataclasses import dataclass
from typing import TypeVar, cast

from typing_extensions import overload

from mr_openapi import (
ApiClient,
Configuration,
Expand All @@ -15,7 +17,6 @@
from mr_openapi import (
exceptions as mr_exceptions,
)
from typing_extensions import overload

from ._utils import required_args
from .types import (
Expand Down
3 changes: 2 additions & 1 deletion clients/python/src/model_registry/types/artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
from abc import ABC, abstractmethod
from typing import Any, TypeVar

from typing_extensions import override

from mr_openapi import (
Artifact as ArtifactBaseModel,
)
Expand All @@ -29,7 +31,6 @@
from mr_openapi import (
ModelArtifact as ModelArtifactBaseModel,
)
from typing_extensions import override

from .base import BaseResourceModel

Expand Down
3 changes: 2 additions & 1 deletion clients/python/src/model_registry/types/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
from collections.abc import Sequence
from typing import Any, Union, get_args

from mr_openapi.models.metadata_value import MetadataValue
from pydantic import BaseModel, ConfigDict

from mr_openapi.models.metadata_value import MetadataValue

SupportedTypes = Union[bool, int, float, str]


Expand Down
3 changes: 2 additions & 1 deletion clients/python/src/model_registry/types/contexts.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

from __future__ import annotations

from typing_extensions import override

from mr_openapi import (
ModelVersion as ModelVersionBaseModel,
)
Expand All @@ -25,7 +27,6 @@
from mr_openapi import (
RegisteredModel as RegisteredModelBaseModel,
)
from typing_extensions import override

from .base import BaseResourceModel

Expand Down
25 changes: 12 additions & 13 deletions clients/python/src/mr_openapi/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,20 +309,20 @@ def sanitize_for_serialization(self, obj):
"""
if obj is None:
return None
elif isinstance(obj, Enum):
if isinstance(obj, Enum):
return obj.value
elif isinstance(obj, SecretStr):
if isinstance(obj, SecretStr):
return obj.get_secret_value()
elif isinstance(obj, self.PRIMITIVE_TYPES):
if isinstance(obj, self.PRIMITIVE_TYPES):
return obj
elif isinstance(obj, list):
if isinstance(obj, list):
return [self.sanitize_for_serialization(sub_obj) for sub_obj in obj]
elif isinstance(obj, tuple):
if isinstance(obj, tuple):
return tuple(self.sanitize_for_serialization(sub_obj) for sub_obj in obj)
elif isinstance(obj, (datetime.datetime, datetime.date)):
if isinstance(obj, (datetime.datetime, datetime.date)):
return obj.isoformat()

elif isinstance(obj, dict):
if isinstance(obj, dict):
obj_dict = obj
else:
# Convert model obj to dict except
Expand Down Expand Up @@ -386,16 +386,15 @@ def __deserialize(self, data, klass):

if klass in self.PRIMITIVE_TYPES:
return self.__deserialize_primitive(data, klass)
elif klass == object:
if klass == object:
return self.__deserialize_object(data)
elif klass == datetime.date:
if klass == datetime.date:
return self.__deserialize_date(data)
elif klass == datetime.datetime:
if klass == datetime.datetime:
return self.__deserialize_datetime(data)
elif issubclass(klass, Enum):
if issubclass(klass, Enum):
return self.__deserialize_enum(data, klass)
else:
return self.__deserialize_model(data, klass)
return self.__deserialize_model(data, klass)

def parameters_to_tuples(self, params, collection_formats):
"""Get parameters as list of tuples, formatting collections.
Expand Down
3 changes: 1 addition & 2 deletions clients/python/src/mr_openapi/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,7 @@ def get_api_key_with_prefix(self, identifier, alias=None):
prefix = self.api_key_prefix.get(identifier)
if prefix:
return f"{prefix} {key}"
else:
return key
return key
return None

def auth_settings(self):
Expand Down
18 changes: 7 additions & 11 deletions clients/python/src/mr_openapi/models/artifact.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,13 @@ def actual_instance_must_validate_oneof(cls, v):
"Multiple matches found when setting `actual_instance` in Artifact with oneOf schemas: DocArtifact, ModelArtifact. Details: "
+ ", ".join(error_messages)
)
elif match == 0:
if match == 0:
# no match
raise ValueError(
"No match found when setting `actual_instance` in Artifact with oneOf schemas: DocArtifact, ModelArtifact. Details: "
+ ", ".join(error_messages)
)
else:
return v
return v

@classmethod
def from_dict(cls, obj: str | dict[str, Any]) -> Self:
Expand Down Expand Up @@ -143,14 +142,13 @@ def from_json(cls, json_str: str) -> Self:
"Multiple matches found when deserializing the JSON string into Artifact with oneOf schemas: DocArtifact, ModelArtifact. Details: "
+ ", ".join(error_messages)
)
elif match == 0:
if match == 0:
# no match
raise ValueError(
"No match found when deserializing the JSON string into Artifact with oneOf schemas: DocArtifact, ModelArtifact. Details: "
+ ", ".join(error_messages)
)
else:
return instance
return instance

def to_json(self) -> str:
"""Returns the JSON representation of the actual instance."""
Expand All @@ -159,8 +157,7 @@ def to_json(self) -> str:

if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
return self.actual_instance.to_json()
else:
return json.dumps(self.actual_instance)
return json.dumps(self.actual_instance)

def to_dict(self) -> dict[str, Any] | DocArtifact | ModelArtifact | None:
"""Returns the dict representation of the actual instance."""
Expand All @@ -169,9 +166,8 @@ def to_dict(self) -> dict[str, Any] | DocArtifact | ModelArtifact | None:

if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
return self.actual_instance.to_dict()
else:
# primitive type
return self.actual_instance
# primitive type
return self.actual_instance

def to_str(self) -> str:
"""Returns the string representation of the actual instance."""
Expand Down
18 changes: 7 additions & 11 deletions clients/python/src/mr_openapi/models/metadata_value.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,13 @@ def actual_instance_must_validate_oneof(cls, v):
"Multiple matches found when setting `actual_instance` in MetadataValue with oneOf schemas: MetadataBoolValue, MetadataDoubleValue, MetadataIntValue, MetadataProtoValue, MetadataStringValue, MetadataStructValue. Details: "
+ ", ".join(error_messages)
)
elif match == 0:
if match == 0:
# no match
raise ValueError(
"No match found when setting `actual_instance` in MetadataValue with oneOf schemas: MetadataBoolValue, MetadataDoubleValue, MetadataIntValue, MetadataProtoValue, MetadataStringValue, MetadataStructValue. Details: "
+ ", ".join(error_messages)
)
else:
return v
return v

@classmethod
def from_dict(cls, obj: str | dict[str, Any]) -> Self:
Expand Down Expand Up @@ -231,14 +230,13 @@ def from_json(cls, json_str: str) -> Self:
"Multiple matches found when deserializing the JSON string into MetadataValue with oneOf schemas: MetadataBoolValue, MetadataDoubleValue, MetadataIntValue, MetadataProtoValue, MetadataStringValue, MetadataStructValue. Details: "
+ ", ".join(error_messages)
)
elif match == 0:
if match == 0:
# no match
raise ValueError(
"No match found when deserializing the JSON string into MetadataValue with oneOf schemas: MetadataBoolValue, MetadataDoubleValue, MetadataIntValue, MetadataProtoValue, MetadataStringValue, MetadataStructValue. Details: "
+ ", ".join(error_messages)
)
else:
return instance
return instance

def to_json(self) -> str:
"""Returns the JSON representation of the actual instance."""
Expand All @@ -247,8 +245,7 @@ def to_json(self) -> str:

if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
return self.actual_instance.to_json()
else:
return json.dumps(self.actual_instance)
return json.dumps(self.actual_instance)

def to_dict(
self,
Expand All @@ -268,9 +265,8 @@ def to_dict(

if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
return self.actual_instance.to_dict()
else:
# primitive type
return self.actual_instance
# primitive type
return self.actual_instance

def to_str(self) -> str:
"""Returns the string representation of the actual instance."""
Expand Down
5 changes: 2 additions & 3 deletions clients/python/src/mr_openapi/models/model_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ class ModelVersion(BaseModel):
description="The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance.",
alias="externalId",
)
name: StrictStr | None = Field(
default=None,
description="The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set.",
name: StrictStr = Field(
description="The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set."
)
state: ModelVersionState | None = None
author: StrictStr | None = Field(default=None, description="Name of the author.")
Expand Down
5 changes: 2 additions & 3 deletions clients/python/src/mr_openapi/models/model_version_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ class ModelVersionCreate(BaseModel):
description="The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance.",
alias="externalId",
)
name: StrictStr | None = Field(
default=None,
description="The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set.",
name: StrictStr = Field(
description="The client provided name of the model's version. It must be unique among all the ModelVersions of the same type within a Model Registry instance and cannot be changed once set."
)
state: ModelVersionState | None = None
author: StrictStr | None = Field(default=None, description="Name of the author.")
Expand Down
5 changes: 2 additions & 3 deletions clients/python/src/mr_openapi/models/registered_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ class RegisteredModel(BaseModel):
description="The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance.",
alias="externalId",
)
name: StrictStr | None = Field(
default=None,
description="The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set.",
name: StrictStr = Field(
description="The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set."
)
id: StrictStr | None = Field(
default=None, description="Output only. The unique server generated id of the resource."
Expand Down
Loading
Loading