Skip to content

Conversation

lampajr
Copy link

@lampajr lampajr commented Dec 14, 2023

While using ml-metadata I noticed that there is no way to startup the server using sqlite configuration through flags, the only way I found (as stated by the documentation) was to use the config_file file option pointing to a pb file like:

connection_config {
  sqlite {
    filename_uri: '/tmp/test_db'
    connection_mode: READWRITE_OPENCREATE
  }
}

With this pull request I am proposing to introduce the possibility to startup the grpc server with sqlite config using cmdline flags, similarly to what is currently supported for mysql and postgresql.

Given this, the previous configuration could be replaced by cmdline flags as follow:

docker run -p ${MLMD_GRPC_PORT}:${MLMD_GRPC_PORT} --entrypoint /bin/metadata_store_server "${MLMD_DOCKER_IMAGE}" \
--grpc_port=${MLMD_GRPC_PORT} \
--metadata_source_config_type="sqlite" \
--sqlite_config_filename_uri=/tmp/test_db \
--sqlite_config_connection_mode=READWRITE_OPENCREATE

Technical addition

This PR proposes to add a:

  • New metadata_source_config_type named sqlite
  • Two flags that are considered only if metadata_source_config_type==sqlite:
    • --sqlite_config_filename_uri: required, specifies the sqlite db uri.
    • --sqlite_config_connection_mode: optional, specifies the sqlite connection mode. Default is READWRITE_OPENCREATE

Signed-off-by: Andrea Lamparelli <a.lamparelli95@gmail.com>
@lampajr lampajr force-pushed the sqlite_as_cmdline_args branch from a9c3d39 to ec5bb0a Compare December 14, 2023 13:26
@antisaling
Copy link

antisaling commented Dec 18, 2023

Co-authored-by: Isabella Basso <isabellabdoamaral@gmail.com>
@lampajr
Copy link
Author

lampajr commented Dec 18, 2023

@lampajr
Copy link
Author

lampajr commented Jan 30, 2024

Hey @XinranTang, is there any chance to get this in?

@lampajr
Copy link
Author

lampajr commented Apr 25, 2024

Hey @XinranTang, is there any chance to get this in?

Any news?

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