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

Added artexplainer rock and tests #102

Merged
merged 3 commits into from
Jan 15, 2025
Merged

Added artexplainer rock and tests #102

merged 3 commits into from
Jan 15, 2025

Conversation

BON4
Copy link
Contributor

@BON4 BON4 commented Dec 18, 2024

Description


  • Add rockcraft.yaml
  • Add tests
  • Add tox.ini

This is re-open request for #92 .

Logs from tests

juju status after all tests are passed:

Model     Controller          Cloud/Region        Version  SLA          Timestamp
kubeflow  microk8s-localhost  microk8s/localhost  3.6.1    unsupported  09:54:41+02:00

App                      Version                Status   Scale  Charm                    Channel          Rev  Address         Exposed  Message
grafana-agent-k8s        0.40.4                 blocked      1  grafana-agent-k8s        latest/stable     80  10.152.183.195  no       Missing ['grafana-cloud-config']|['logging-consumer'] for logging-provider; ['grafana-cloud-config']|['send-remote-wr...
istio-ingressgateway                            active       1  istio-gateway            1.16/stable     1005  10.152.183.88   no       
istio-pilot                                     active       1  istio-pilot              1.16/stable      662  10.152.183.138  no       
knative-operator                                active       1  knative-operator         latest/edge      542  10.152.183.55   no       
knative-serving                                 active       1  knative-serving          latest/edge      572  10.152.183.61   no       
kserve-controller                               blocked      1  kserve-controller                           0  10.152.183.92   no       Cannot parse a config-defined images list from config '{' - thisconfig input will be ignored.
metacontroller-operator                         active       1  metacontroller-operator  latest/edge      401  10.152.183.56   no       
minio                    res:oci-image@1755999  active       1  minio                    ckf-1.7/stable   214  10.152.183.225  no       
resource-dispatcher                             active       1  resource-dispatcher      latest/edge      236  10.152.183.90   no       

Unit                        Workload  Agent  Address       Ports          Message
grafana-agent-k8s/0*        blocked   idle   10.1.142.145                 Missing ['grafana-cloud-config']|['logging-consumer'] for logging-provider; ['grafana-cloud-config']|['send-remote-wr...
istio-ingressgateway/0*     active    idle   10.1.142.186                 
istio-pilot/0*              active    idle   10.1.142.174                 
knative-operator/0*         active    idle   10.1.142.189                 
knative-serving/0*          active    idle   10.1.142.136                 
kserve-controller/0*        blocked   idle   10.1.142.179                 Cannot parse a config-defined images list from config '{' - thisconfig input will be ignored.
metacontroller-operator/0*  active    idle   10.1.142.134                 
minio/0*                    active    idle   10.1.142.178  9000-9001/TCP  
resource-dispatcher/0*      active    idle   10.1.142.139                 

Logs of passed integration tests tox -vve integration -- --model kubeflow --keep-models (only last included due to PR message maximum length):

---------------------------------------------------------------------------------------------- live log teardown -----------------------------------------------------------------------------------------------
INFO     pytest_operator.plugin:plugin.py:903 Model status:

Model     Controller          Cloud/Region        Version  SLA          Timestamp
kubeflow  microk8s-localhost  microk8s/localhost  3.6.1    unsupported  09:45:54+02:00

App                      Version                Status   Scale  Charm                    Channel          Rev  Address         Exposed  Message
grafana-agent-k8s        0.40.4                 blocked      1  grafana-agent-k8s        latest/stable     80  10.152.183.195  no       Missing ['grafana-cloud-config']|['logging-consumer'] for logging-provider; ['grafana-cloud-config']|['send-remote-wr...
istio-ingressgateway                            active       1  istio-gateway            1.16/stable     1005  10.152.183.88   no       
istio-pilot                                     active       1  istio-pilot              1.16/stable      662  10.152.183.138  no       
knative-operator                                active       1  knative-operator         latest/edge      542  10.152.183.55   no       
knative-serving                                 active       1  knative-serving          latest/edge      572  10.152.183.61   no       
kserve-controller                               blocked      1  kserve-controller                           0  10.152.183.92   no       Cannot parse a config-defined images list from config '{' - thisconfig input will be ignored.
metacontroller-operator                         active       1  metacontroller-operator  latest/edge      401  10.152.183.56   no       
minio                    res:oci-image@1755999  active       1  minio                    ckf-1.7/stable   214  10.152.183.225  no       
resource-dispatcher                             active       1  resource-dispatcher      latest/edge      236  10.152.183.90   no       

Unit                        Workload  Agent  Address       Ports          Message
grafana-agent-k8s/0*        blocked   idle   10.1.142.145                 Missing ['grafana-cloud-config']|['logging-consumer'] for logging-provider; ['grafana-cloud-config']|['send-remote-wr...
istio-ingressgateway/0*     active    idle   10.1.142.186                 
istio-pilot/0*              active    idle   10.1.142.174                 
knative-operator/0*         active    idle   10.1.142.189                 
knative-serving/0*          active    idle   10.1.142.136                 
kserve-controller/0*        blocked   idle   10.1.142.179                 Cannot parse a config-defined images list from config '{' - thisconfig input will be ignored.
metacontroller-operator/0*  active    idle   10.1.142.134                 
minio/0*                    active    idle   10.1.142.178  9000-9001/TCP  
resource-dispatcher/0*      active    idle   10.1.142.139                 

INFO     pytest_operator.plugin:plugin.py:909 Juju error logs:

unit-kserve-controller-0: 09:28:31 ERROR unit.kserve-controller/0.juju-log Failed to handle <InstallEvent via KServeControllerCharm/on/install[1]> with error: Please relate to istio-pilot:gateway-info
unit-kserve-controller-0: 09:40:44 ERROR unit.kserve-controller/0.juju-log object-storage:6: Failed to handle <RelationChangedEvent via KServeControllerCharm/on/object_storage_relation_changed[151]> with error: Waiting for object-storage relation data
unit-kserve-controller-0: 09:45:37 ERROR unit.kserve-controller/0.juju-log Failed to handle <ConfigChangedEvent via KServeControllerCharm/on/config_changed[206]> with error: Cannot parse a config-defined images list from config '{' - thisconfig input will be ignored.

INFO     pytest_operator.plugin:plugin.py:991 Forgetting model main...
INFO     httpx:_client.py:1038 HTTP Request: DELETE https://127.0.0.1:16443/api/v1/namespaces/test-namespace-resource-dispatcher "HTTP/1.1 200 OK"


======================================================================================= 18 passed in 1284.53s (0:21:24) ========================================================================================
integration: 1305623 I exit 0 (1285.63 seconds) /home/yurchenko/kserve-operators/charms/kserve-controller> pytest -v --tb native --ignore=/home/yurchenko/kserve-operators/charms/kserve-controller/tests/unit --log-cli-level=INFO -s --model kubeflow --keep-models pid=2919676 [tox/execute/api.py:286]
  integration: OK (1305.43=setup[19.80]+cmd[1285.63] seconds)
  congratulations :) (1305.50 seconds)

@BON4 BON4 marked this pull request as ready for review December 18, 2024 16:35
@BON4 BON4 changed the title added artexplainer rock and tests Added artexplainer rock and tests Dec 18, 2024
Copy link
Contributor

@DnPlas DnPlas left a comment

Choose a reason for hiding this comment

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

Thanks @BON4 !

The tests are not passing due to a residue from an old pattern, other than that lgtm.
I tested this PR by:

  1. Building the rock -> passed
  2. Looking for the required files -> passed

@BON4 BON4 requested a review from DnPlas January 8, 2025 08:14
Copy link
Contributor

@DnPlas DnPlas left a comment

Choose a reason for hiding this comment

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

Thanks @BON4 !

I did a last build and check on the binary file, and it works:

docker run --rm -ti --entrypoint /bin/bash artexp:0.1
_daemon_@99347261a6e3:/$ python -m artserver
/usr/local/lib/python3.10/dist-packages/art/estimators/certification/__init__.py:30: UserWarning: PyTorch not found. Not importing DeepZ or Interval Bound Propagation functionality
  warnings.warn("PyTorch not found. Not importing DeepZ or Interval Bound Propagation functionality")
2025-01-10 13:42:56.341 8 kserve INFO [model_server.py:register_model():384] Registering model: model
2025-01-10 13:42:56.341 8 kserve INFO [model_server.py:start():254] Setting max asyncio worker threads as 12
2025-01-10 13:42:56.342 8 kserve INFO [model_server.py:serve():260] Starting uvicorn with 1 workers
2025-01-10 13:42:56.475 uvicorn.error INFO:     Started server process [8]
2025-01-10 13:42:56.475 uvicorn.error INFO:     Waiting for application startup.
2025-01-10 13:42:56.513 8 kserve INFO [server.py:start():63] Starting gRPC server on [::]:8081
2025-01-10 13:42:56.514 uvicorn.error INFO:     Application startup complete.
2025-01-10 13:42:56.515 uvicorn.error INFO:     Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)

@DnPlas DnPlas merged commit a6741d4 into canonical:main Jan 15, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants