Language Clients

pachctl is the command-line tool you use to interact with a HPE Machine Learning Data Management cluster in your terminal. However, external applications might need to interact with HPE Machine Learning Data Management directly through our APIs.

In this case, HPE Machine Learning Data Management offers language specific SDKs in Go and Python.

Go Client

The HPE Machine Learning Data Management team officially supports the Go client. It implements most of the functionalities provided with the pachctl CLI tool.

Generate And Serve The godocs Locally

Golang’s package (godoc), installed by default by the Go installer, can generate the Go client’s documentation from the go code.

To generate the docs:

  • Set your GOPATH:

    export PATH=$(go env GOPATH)/bin:$PATH
    • In HPE Machine Learning Data Management’s root directory, start the godocs server:
    go run golang.org/x/tools/cmd/godoc -http=:6060 -goroot="<your go root directory - for example: /Users/yourusername/pachyderm>"

    See https://pkg.go.dev/golang.org/x/tools/cmd/godoc for the complete list of flags available.

  • In your favorite browser, run localhost:6060/pkg/

Warning

A compatible version of gRPC is needed when using the Go client. You can identify the compatible version by searching for the version number next to replace google.golang.org/grpc => google.golang.org/grpc in https://github.com/pachyderm/pachyderm/blob/master/go.mod then:

go get google.golang.org/grpc
cd $GOPATH/src/google.golang.org/grpc
git checkout v1.29.1

Running Go Examples

The HPE Machine Learning Data Management godocs reference (see generation instructions above) provides examples of how you can use the Go client API. You need to have a running HPE Machine Learning Data Management cluster to run these examples.

Make sure that you use your pachd_address in client.NewFromAddress("<your-pachd-address>:30650"). For example, if you are testing on minikube, run minikube ip to get this information.

See the OpenCV Example in Go for more information.

Python Clients

Pachyderm-SDK (New)

The Python client pachyderm-sdk is the new Python client for HPE Machine Learning Data Management and is officially supported by the HPE Machine Learning Data Management team.

Node Client

Our Javascript client node-pachyderm has been deprecated.

Other languages

HPE Machine Learning Data Management uses a simple protocol buffer API. Protobufs support other languages, any of which can be used to programmatically use HPE Machine Learning Data Management.

You can follow the official protobuf tutorials to get an understanding of how to compile and use the protocol buffers in your language of choice.