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

Add paddle-server ROCK rocraft #20

Merged
merged 9 commits into from
Feb 23, 2024
Merged

Add paddle-server ROCK rocraft #20

merged 9 commits into from
Feb 23, 2024

Conversation

misohu
Copy link
Member

@misohu misohu commented Feb 13, 2024

Steps to test

cd paddle 
rockcraft clean && rockcraft pack --verbosity=trace
sudo skopeo --insecure-policy copy oci-archive:paddle-server_0.11.0_amd64.rock docker-daemon:charmedkubeflow/paddle-server:0.11.0
docker run charmedkubeflow/paddle-server:0.11.0

There should be an output with deprecation warnings like this

2024-02-13T09:37:06.255Z [pebble] Started daemon.
2024-02-13T09:37:06.261Z [pebble] POST /v1/services 5.266914ms 202
2024-02-13T09:37:06.261Z [pebble] Started default services with change 1.
2024-02-13T09:37:06.265Z [pebble] Service "paddle-server" starting: python3.10 -m paddleserver [ args ]
2024-02-13T09:37:07.581Z [paddle-server] /usr/local/lib/python3.10/dist-packages/pkg_resources/__init__.py:121: DeprecationWarning: pkg_resources is deprecated as an API
2024-02-13T09:37:07.581Z [paddle-server]   warnings.warn("pkg_resources is deprecated as an API", DeprecationWarning)
2024-02-13T09:37:07.602Z [paddle-server] /usr/local/lib/python3.10/dist-packages/pkg_resources/__init__.py:2870: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google')`.
2024-02-13T09:37:07.602Z [paddle-server] Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
2024-02-13T09:37:07.602Z [paddle-server]   declare_namespace(pkg)
2024-02-13T09:37:07.603Z [paddle-server] /usr/local/lib/python3.10/dist-packages/pkg_resources/__init__.py:2870: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google.cloud')`.
2024-02-13T09:37:07.603Z [paddle-server] Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
2024-02-13T09:37:07.603Z [paddle-server]   declare_namespace(pkg)
2024-02-13T09:37:07.603Z [paddle-server] /usr/local/lib/python3.10/dist-packages/pkg_resources/__init__.py:2349: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google')`.
2024-02-13T09:37:07.603Z [paddle-server] Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
2024-02-13T09:37:07.603Z [paddle-server]   declare_namespace(parent)
2024-02-13T09:37:07.603Z [paddle-server] /usr/local/lib/python3.10/dist-packages/pkg_resources/__init__.py:2870: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google.logging')`.
2024-02-13T09:37:07.603Z [paddle-server] Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
2024-02-13T09:37:07.603Z [paddle-server]   declare_namespace(pkg)
2024-02-13T09:37:07.861Z [paddle-server] /usr/local/lib/python3.10/dist-packages/paddle/profiler/profiler_statistic.py:1402: DeprecationWarning: invalid escape sequence '\('
2024-02-13T09:37:07.861Z [paddle-server]   kernel_name_pattern = re.compile('(.+?)(<.*>)(\(.*\))')
2024-02-13T09:37:08.293Z [paddle-server] /usr/local/lib/python3.10/dist-packages/paddle/tensor/random.py:31: DeprecationWarning: invalid escape sequence '\e'
2024-02-13T09:37:08.293Z [paddle-server]   """
2024-02-13T09:37:08.482Z [paddle-server] /usr/local/lib/python3.10/dist-packages/paddle/distributed/parallel.py:87: SyntaxWarning: "is" with a literal. Did you mean "=="?
2024-02-13T09:37:08.482Z [paddle-server]   ) or backend is 'xccl':
2024-02-13T09:37:08.849Z [paddle-server] /usr/local/lib/python3.10/dist-packages/paddle/fluid/contrib/slim/quantization/post_training_quantization.py:438: SyntaxWarning: "is" with a literal. Did you mean "=="?
2024-02-13T09:37:08.849Z [paddle-server]   if self._algo is 'min_max':
2024-02-13T09:37:09.101Z [paddle-server] /usr/local/lib/python3.10/dist-packages/paddle/incubate/nn/layer/fused_linear.py:20: DeprecationWarning: invalid escape sequence '\_'
2024-02-13T09:37:09.101Z [paddle-server]   """
2024-02-13T09:37:09.164Z [paddle-server] /usr/local/lib/python3.10/dist-packages/paddle/distributed/fleet/meta_parallel/sharding/group_sharded_optimizer_stage2.py:208: DeprecationWarning: invalid escape sequence '\.'
2024-02-13T09:37:09.164Z [paddle-server]   "The param name passed to the optimizer doesn't follow .+_[0-9]+\..+ patter, "
2024-02-13T09:37:09.204Z [paddle-server] /usr/local/lib/python3.10/dist-packages/paddle/dataset/common.py:38: DeprecationWarning: invalid escape sequence '\T'
2024-02-13T09:37:09.204Z [paddle-server]   """
2024-02-13T09:37:09.357Z [paddle-server] /usr/local/lib/python3.10/dist-packages/paddle/sparse/unary.py:555: DeprecationWarning: invalid escape sequence '\p'
2024-02-13T09:37:09.357Z [paddle-server]   """
2024-02-13T09:37:09.357Z [paddle-server] /usr/local/lib/python3.10/dist-packages/paddle/sparse/unary.py:588: DeprecationWarning: invalid escape sequence '\p'
2024-02-13T09:37:09.357Z [paddle-server]   """
2024-02-13T09:37:09.362Z [paddle-server] /usr/local/lib/python3.10/dist-packages/paddle/sparse/nn/functional/transformer.py:29: DeprecationWarning: invalid escape sequence '\s'
2024-02-13T09:37:09.362Z [paddle-server]   """
2024-02-13T09:37:09.362Z [paddle-server] /usr/local/lib/python3.10/dist-packages/paddle/sparse/nn/functional/activation.py:64: DeprecationWarning: invalid escape sequence '\e'
2024-02-13T09:37:09.362Z [paddle-server]   """
2024-02-13T09:37:09.362Z [paddle-server] /usr/local/lib/python3.10/dist-packages/paddle/sparse/nn/functional/activation.py:149: DeprecationWarning: invalid escape sequence '\_'
2024-02-13T09:37:09.362Z [paddle-server]   """
2024-02-13T09:37:14.459Z [paddle-server] /usr/local/lib/python3.10/dist-packages/google/rpc/__init__.py:20: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google.rpc')`.
2024-02-13T09:37:14.459Z [paddle-server] Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
2024-02-13T09:37:14.459Z [paddle-server]   pkg_resources.declare_namespace(__name__)
2024-02-13T09:37:14.459Z [paddle-server] /usr/local/lib/python3.10/dist-packages/pkg_resources/__init__.py:2349: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google')`.
2024-02-13T09:37:14.459Z [paddle-server] Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
2024-02-13T09:37:14.459Z [paddle-server]   declare_namespace(parent)
2024-02-13T09:37:14.528Z [paddle-server] usage: __main__.py [-h] [--http_port HTTP_PORT] [--grpc_port GRPC_PORT]
2024-02-13T09:37:14.528Z [paddle-server]                    [--workers WORKERS] [--max_threads MAX_THREADS]
2024-02-13T09:37:14.528Z [paddle-server]                    [--max_asyncio_workers MAX_ASYNCIO_WORKERS]
2024-02-13T09:37:14.528Z [paddle-server]                    [--enable_grpc ENABLE_GRPC]
2024-02-13T09:37:14.528Z [paddle-server]                    [--enable_docs_url ENABLE_DOCS_URL]
2024-02-13T09:37:14.528Z [paddle-server]                    [--enable_latency_logging ENABLE_LATENCY_LOGGING]
2024-02-13T09:37:14.528Z [paddle-server]                    [--configure_logging CONFIGURE_LOGGING]
2024-02-13T09:37:14.528Z [paddle-server]                    [--log_config_file LOG_CONFIG_FILE]
2024-02-13T09:37:14.528Z [paddle-server]                    [--access_log_format ACCESS_LOG_FORMAT] --model_dir
2024-02-13T09:37:14.528Z [paddle-server]                    MODEL_DIR [--model_name MODEL_NAME]
2024-02-13T09:37:14.528Z [paddle-server] __main__.py: error: the following arguments are required: --model_dir

The output from workload service is identical to upstream container

docker run kserve/paddleserver:v0.11.1

@kimwnasptd
Copy link
Contributor

@misohu shouldn't we add also the CI automation in the repo for the ROCKs to get build/published on merge?

@ca-scribner
Copy link
Contributor

ca-scribner commented Feb 13, 2024

I am +1 to adding the CI @kimwnasptd, but adding the central files (anything in .github) should be done in a separate PR. Adding the files that are needed in this particular rock (like a tox.ini) should be done in this PR

The settings on this repo are also not correct (I see there's no branch protection, for example). I'll split it with you michal - you add the CI, I'll change the settings :D

@ca-scribner
Copy link
Contributor

this is an example of me adding the default rock CI elsewhere

then I used it in my later pr by adding the rock-specific files

paddle/rockcraft.yaml Outdated Show resolved Hide resolved
paddle/rockcraft.yaml Outdated Show resolved Hide resolved
@ca-scribner
Copy link
Contributor

Looking at the parent issue #18, it does explicitly say publish manually. But I'm with @kimwnasptd in that I think we should change it to be automatic

paddle/rockcraft.yaml Outdated Show resolved Hide resolved
paddle/rockcraft.yaml Outdated Show resolved Hide resolved
paddle/rockcraft.yaml Outdated Show resolved Hide resolved
@misohu
Copy link
Member Author

misohu commented Feb 14, 2024

Added the tests and tox file for paddle, resolved @ca-scribner comments (replied to questions) opened issue #21 for CI.

@misohu
Copy link
Member Author

misohu commented Feb 14, 2024

@ca-scribner @kimwnasptd here is PR for CI #22

@ca-scribner
Copy link
Contributor

I'll give this another review, but I'm still messing around with things in my related issue #19. I think one or two things here might be redundant (maybe rockcraft changed since last we did this?)

This change ensures that `python` is executable, the kserve/paddlserver packages
are installed the same as other packages, and adds commends to the rockcraft file.
@ca-scribner ca-scribner enabled auto-merge (squash) February 21, 2024 17:00
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.

Everything looks good, just a super small comment. Thanks!

paddleserver/dummy_pyproject.toml Show resolved Hide resolved
@ca-scribner ca-scribner merged commit a7478be into main Feb 23, 2024
7 checks passed
@ca-scribner ca-scribner deleted the KF-5325-paddle-rock branch February 23, 2024 16:08
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.

4 participants