-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add API-related part for incrementallearning job
1.add crd and crd sample for incrementallearning job 2.add incrementallearningjob_types.go, and update register.go 3.update zz_generated.deepcopy.go and client dir
- Loading branch information
Showing
18 changed files
with
1,291 additions
and
5 deletions.
There are no files selected for viewing
67 changes: 67 additions & 0 deletions
67
build/crd-samples/neptune/incrementallearningjob_v1alpha1.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
apiVersion: neptune.io/v1alpha1 | ||
kind: IncrementalLearningJob | ||
metadata: | ||
name: helmet-detection-demo | ||
spec: | ||
initialModel: | ||
name: "initial-model" | ||
dataset: | ||
name: "incremental-dataset" | ||
trainProb: 0.8 | ||
trainSpec: | ||
workerSpec: | ||
scriptDir: "/code_il" | ||
scriptBootFile: "train.py" | ||
frameworkType: "tensorflow" | ||
frameworkVersion: "1.15" | ||
parameters: | ||
- key: "batch_size" | ||
value: "32" | ||
- key: "learning_rate" | ||
value: "0.001" | ||
- key: "max_epochs" | ||
value: "100" | ||
|
||
trigger: | ||
checkPeriodSeconds: 60 | ||
timer: | ||
start: 02:00 | ||
end: 04:00 | ||
condition: | ||
operator: ">" | ||
threshold: 500 | ||
metric: num_of_samples | ||
evalSpec: | ||
workerSpec: | ||
scriptDir: "/code_il" | ||
scriptBootFile: "eval.py" | ||
frameworkType: "tensorflow" | ||
frameworkVersion: "1.15" | ||
parameters: | ||
- key: "input_shape" | ||
value: "352,640" | ||
- key: "class_names" | ||
value: "helmet,helmet-on,person,helmet-off" | ||
|
||
deploySpec: | ||
model: | ||
name: "inference-model" | ||
trigger: | ||
condition: | ||
operator: ">" | ||
threshold: 0.1 | ||
metric: precision_delta | ||
nodeName: "edge0" | ||
hardExampleMining: | ||
name: "IBT" | ||
workerSpec: | ||
scriptDir: "/code_il" | ||
scriptBootFile: "eval.py" | ||
frameworkType: "tensorflow" | ||
frameworkVersion: "1.15" | ||
parameters: | ||
- key: "nms_threshold" | ||
value: "0.6" | ||
|
||
nodeName: "cloud0" | ||
outputDir: "/output" |
285 changes: 285 additions & 0 deletions
285
build/crds/neptune/incrementallearningjob_v1alpha1.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,285 @@ | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: incrementallearningjobs.neptune.io | ||
spec: | ||
group: neptune.io | ||
names: | ||
kind: IncrementalLearningJob | ||
plural: incrementallearningjobs | ||
shortNames: | ||
- il | ||
scope: Namespaced | ||
versions: | ||
- name: v1alpha1 | ||
subresources: | ||
# status enables the status subresource. | ||
status: {} | ||
served: true | ||
storage: true | ||
schema: | ||
openAPIV3Schema: | ||
type: object | ||
properties: | ||
spec: | ||
type: object | ||
required: | ||
- dataset | ||
- nodeName | ||
- outputDir | ||
- initialModel | ||
- trainSpec | ||
properties: | ||
dataset: | ||
type: object | ||
required: | ||
- name | ||
- trainProb | ||
properties: | ||
name: | ||
type: string | ||
trainProb: | ||
type: number | ||
nodeName: | ||
type: string | ||
outputDir: | ||
type: string | ||
initialModel: | ||
type: object | ||
required: | ||
- name | ||
properties: | ||
name: | ||
type: string | ||
trainSpec: | ||
type: object | ||
required: | ||
- workerSpec | ||
- trigger | ||
properties: | ||
workerSpec: | ||
type: object | ||
required: | ||
- scriptDir | ||
- scriptBootFile | ||
- frameworkType | ||
- frameworkVersion | ||
properties: | ||
scriptDir: | ||
type: string | ||
scriptBootFile: | ||
type: string | ||
frameworkType: | ||
type: string | ||
frameworkVersion: | ||
type: string | ||
parameters: | ||
type: array | ||
items: | ||
type: object | ||
required: | ||
- key | ||
- value | ||
properties: | ||
key: | ||
type: string | ||
value: | ||
type: string | ||
trigger: | ||
type: object | ||
properties: | ||
checkPeriodSeconds: | ||
type: integer | ||
timer: | ||
type: object | ||
required: | ||
- start | ||
- end | ||
properties: | ||
start: | ||
type: string | ||
end: | ||
type: string | ||
condition: | ||
type: object | ||
required: | ||
- operator | ||
- threshold | ||
- metric | ||
properties: | ||
operator: | ||
type: string | ||
enum: [">=",">","=","==","<=","<","ge","gt","eq","le","lt"] | ||
threshold: | ||
type: number | ||
metric: | ||
type: string | ||
evalSpec: | ||
type: object | ||
required: | ||
- workerSpec | ||
properties: | ||
workerSpec: | ||
type: object | ||
required: | ||
- scriptDir | ||
- scriptBootFile | ||
- frameworkType | ||
- frameworkVersion | ||
properties: | ||
scriptDir: | ||
type: string | ||
scriptBootFile: | ||
type: string | ||
frameworkType: | ||
type: string | ||
frameworkVersion: | ||
type: string | ||
parameters: | ||
type: array | ||
items: | ||
type: object | ||
required: | ||
- key | ||
- value | ||
properties: | ||
key: | ||
type: string | ||
value: | ||
type: string | ||
deploySpec: | ||
type: object | ||
required: | ||
- model | ||
- trigger | ||
- nodeName | ||
- workerSpec | ||
- hardExampleMining | ||
properties: | ||
model: | ||
type: object | ||
required: | ||
- name | ||
properties: | ||
name: | ||
type: string | ||
nodeName: | ||
type: string | ||
hardExampleMining: | ||
type: object | ||
required: | ||
- name | ||
properties: | ||
name: | ||
type: string | ||
workerSpec: | ||
type: object | ||
required: | ||
- scriptDir | ||
- scriptBootFile | ||
- frameworkType | ||
- frameworkVersion | ||
properties: | ||
scriptDir: | ||
type: string | ||
scriptBootFile: | ||
type: string | ||
frameworkType: | ||
type: string | ||
frameworkVersion: | ||
type: string | ||
parameters: | ||
type: array | ||
items: | ||
type: object | ||
required: | ||
- key | ||
- value | ||
properties: | ||
key: | ||
type: string | ||
value: | ||
type: string | ||
|
||
trigger: | ||
type: object | ||
properties: | ||
checkPeriodSeconds: | ||
type: integer | ||
timer: | ||
type: object | ||
required: | ||
- start | ||
- end | ||
properties: | ||
start: | ||
type: string | ||
end: | ||
type: string | ||
condition: | ||
type: object | ||
required: | ||
- operator | ||
- threshold | ||
- metric | ||
properties: | ||
operator: | ||
type: string | ||
enum: [">=",">","=","==","<=","<","ge","gt","eq","le","lt"] | ||
threshold: | ||
type: number | ||
metric: | ||
type: string | ||
|
||
status: | ||
type: object | ||
properties: | ||
conditions: | ||
type: array | ||
items: | ||
type: object | ||
properties: | ||
type: | ||
type: string | ||
status: | ||
type: string | ||
lastHeartbeatTime: | ||
type: string | ||
format: date-time | ||
lastTransitionTime: | ||
type: string | ||
format: date-time | ||
reason: | ||
type: string | ||
message: | ||
type: string | ||
data: | ||
type: string | ||
stage: | ||
type: string | ||
startTime: | ||
type: string | ||
format: date-time | ||
completionTime: | ||
type: string | ||
format: date-time | ||
active: | ||
type: integer | ||
succeeded: | ||
type: integer | ||
failed: | ||
type: integer | ||
|
||
|
||
additionalPrinterColumns: | ||
- name: stage | ||
type: string | ||
description: The status of the incremental job | ||
jsonPath: ".status.conditions[-1].stage" | ||
- name: status | ||
type: string | ||
description: The status of the incremental job | ||
jsonPath: ".status.conditions[-1].type" | ||
- name: Age | ||
type: date | ||
jsonPath: .metadata.creationTimestamp |
Oops, something went wrong.