Skip to content

๐Ÿ’ป CLI Reference

Quick start with CMF Clientยค

Common Metadata Framework (CMF) has the following components:

  • Metadata Library: exposes APIs for tracking pipeline metadata and provides endpoints to query stored metadata.
  • CMF Client: handles metadata exchange with the CMF Server, pushes and pulls artifacts from the artifact repository, and syncs code to and from GitHub.
  • CMF Server: interacts with all the remote clients and is responsible for merging the metadata transferred by the CMF Client and manage the consolidated metadata.
  • Central Artifact Repositories: host the code and data.

This tutorial walks you through the process of setting up the CMF Client.

Prerequisitesยค

Before proceeding with the setup, ensure the following components are up and running:

Make sure there are no errors during their startup, as CMF Client depends on both of these components.

Setup a CMF Clientยค

CMF Client is a command-line tool that facilitates metadata collaboration between different teams or two team members. It allows users to pull or push metadata from or to the CMF Server.

Follow the below-mentioned steps for the end-to-end setup of CMF Client:-

Configuration

  1. Create working directory mkdir <workdir>
  2. Execute cmf init to configure the Data Version Control (DVC) remote directory, Git remote URL, CMF server, and Neo4j. Follow the cmf init for more details.

How to effectively use CMF Client?ยค

Let's assume we are tracking the metadata for a pipeline named Test-env with a MinIO S3 bucket as the artifact repository and a CMF Server.

Create a folder

mkdir example-folder

Initialize cmfยค

CMF initialization is the first and foremost step to use CMF Client commands. This command completes the initialization process in one step, making the CMF Client user-friendly. Execute cmf init in the example-folder directory created in the above step.

cmf init minioS3 --url s3://dvc-art --endpoint-url http://x.x.x.x:9000 --access-key-id minioadmin --secret-key minioadmin --git-remote-url https://github.com/user/experiment-repo.git --cmf-server-url http://x.x.x.x:80  --neo4j-user neo4j --neo4j-password password --neo4j-uri bolt://localhost:7687

Here, "dvc-art" is provided as an example bucket name. However, users can change it as needed. If the user chooses to change it, they will need to update the Dockerfile for minioS3 accordingly.

Check cmf init minioS3 for more details.

Check status of CMF initialization (Optional)

cmf init show
Check cmf init show for more details.

Track metadata using CMFLib

Use Sample projects as a reference to create a new project to track metadata for ML pipelines.

More information is available inside Getting Started Tutorial.

Before pushing artifacts or metadata, ensure that the CMF Server and minioS3 are up and running.

Push artifacts

Push artifacts in the artifact repo initialized in the Initialize cmf step.

cmf artifact push -p 'Test-env'
Check cmf artifact push for more details.

Push metadata to CMF Server

cmf metadata push -p 'Test-env'
Check cmf metadata push for more details.

CMF Client with collaborative developmentยค

In the case of collaborative development, in addition to the above commands, users can follow the commands below to pull metadata and artifacts from a common CMF Server and a central artifact repository.

Pull metadata from the server

Execute cmf metadata pull command in the example_folder.

cmf metadata pull -p 'Test-env'
Check cmf metadata pull for more details.

Pull artifacts from the central artifact repo

Execute cmf artifact pull command in the example_folder.

cmf artifact pull -p 'Test-env'
Check cmf artifact pull page for more details.

Flow Chart for cmfยค

Flow chart for cmf CMF Client is a command-line tool that facilitates metadata collaboration between different teams or two team members. It allows users to pull/push metadata from or to the CMF Server with similar functionalities for artifact repositories and other commands.

````