kubeflow-common-v0.1.0

module
v0.0.0-...-b024c55 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2021 License: Apache-2.0

README

common

Build Status Go Report Card

This repo contains the libraries for writing a custom job operators such as tf-operator and pytorch-operator. To write a custom operator, user need to do following three steps

 testJobController := TestJobController {
    ...
 }
  • Instantiate a JobController struct object and pass in the custom controller written in step 1 as a parameter
jobController := JobController {
    Controller: testJobController,
    Config:     v1.JobControllerConfiguration{EnableGangScheduling: false},
    Recorder:   recorder,
}
    reconcile(...) {
    	// Your main reconcile loop. 
    	...
    	jobController.ReconcileJobs(...)
    	...
    }

Note that this repo is still under construction, API compatibility is not guaranteed at this point.

API Reference

The API fies are located under job_controller/api/v1:

  • constants.go: the constants such as label keys.
  • interface.go: the interfaces to be implemented by custom controllers.
  • controller.go: the main JobController that contains the ReconcileJobs API method to be invoked by user. This is the entrypoint of the JobController logic. The rest of code under job_controller/ folder contains the core logic for the JobController to work, such as creating and managing worker pods, services etc.

Directories

Path Synopsis
client
clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
clientset/versioned/typed/test_job/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
clientset/versioned/typed/test_job/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
api/v1
Package v1 is the v1 version of the API.
Package v1 is the v1 version of the API.
test_job
v1
Package v1 is the v1 version of the API.
Package v1 is the v1 version of the API.
test_util
v1
Package util provides various helper routines.
Package util provides various helper routines.
train
Package that various helper routines for training.
Package that various helper routines for training.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL