Skip to content

Instantly share code, notes, and snippets.

@junjie-landing
Last active August 11, 2021 06:43
Show Gist options
  • Save junjie-landing/45345af5de62823548cd019bbe74226f to your computer and use it in GitHub Desktop.
Save junjie-landing/45345af5de62823548cd019bbe74226f to your computer and use it in GitHub Desktop.
service DataAug {
/**
* Create a pipelnie for current project
*/
CreatePipelineRes createPipeline(CreatePipelineReq req)
throw (
1: AlreadyExistsException,
2: LimitExceedsException (retryable = "true"), // Increase resiliency
),
(
errorRate = '0.05',
accept_replay = "true", // Replay production traffic for testing
anomaly_detection = 'xxx',
rest_verb = 'POST',
rest_path = '/create',
async_rpc = 'true|false',
rate_limit = '100', // To prevent abusive user, backed by counting service
)
...
}
(
rest_path = '/data_aug',
)
struct CreatePipelineReq {
1: string name,
2: string pipelineConfiig (pii='sensitive|public') // Logging scrap or CS restriction
}
service DataAug {
/**
* Create a pipelnie for current project
*/
CreatePipelineRes createPipeline(CreatePipelineReq req)
throw (
1: AlreadyExistsException,
2: LimitExceedsException,
),
/**
* Get detailed pipeline configuration for data augmentation
*/
CreatePipelineRes getPipeline(CreatePipelineReq req)
throw (
1: NotFoundException,
1: ReadLockedException,
),
}
struct CreatePipelineReq {
1: string name,
2: string pipelineConfiig
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment