Files
Mahdi KhashanandGitHub 19db2d47d4 [feature] move manifest image references to ghcr (#2529)
* move to ghcr

Signed-off-by: mahdikhashan <[email protected]>

* move images to ghcr

Signed-off-by: mahdikhashan <[email protected]>

* manifests

Signed-off-by: mahdikhashan <[email protected]>

* change registry in all path

Signed-off-by: mahdikhashan <[email protected]>

* update script

Signed-off-by: mahdikhashan <[email protected]>

* fix

Signed-off-by: mahdikhashan <[email protected]>

* fix

Signed-off-by: mahdikhashan <[email protected]>

* slight fix

Signed-off-by: mahdikhashan <[email protected]>

---------

Signed-off-by: mahdikhashan <[email protected]>
Signed-off-by: Mahdi Khashan <[email protected]>
2025-03-24 17:11:50 +00:00

151 lines
4.4 KiB
YAML

---
# This CPU example aims to show all the possible operations
# is not very likely to get good result due to the extensive search space
# In practice, setting up a limited search space with more common operations is more likely to get better performance.
# For example, Efficient Neural Architecture Search via Parameter Sharing (https://arxiv.org/abs/1802.03268)
# uses only 6 operations, 3x3/5x5 convolution, 3x3/5x5 separable_convolution and 3x3 max_pooling/avg_pooling.
# It uses only 1 layer of CNN and 1 train epoch to show CPU support and it has very bad results.
# In practice, if you increase number of layers, training process on CPU will take more time.
apiVersion: kubeflow.org/v1beta1
kind: Experiment
metadata:
namespace: kubeflow
name: enas-cpu
spec:
parallelTrialCount: 2
maxTrialCount: 3
maxFailedTrialCount: 2
objective:
type: maximize
goal: 0.99
objectiveMetricName: Validation-Accuracy
algorithm:
algorithmName: enas
nasConfig:
graphConfig:
numLayers: 1
inputSizes:
- 32
- 32
- 3
outputSizes:
- 10
operations:
- operationType: convolution
parameters:
- name: filter_size
parameterType: categorical
feasibleSpace:
list:
- "3"
- "5"
- "7"
- name: num_filter
parameterType: categorical
feasibleSpace:
list:
- "32"
- "48"
- "64"
- "96"
- "128"
- name: stride
parameterType: categorical
feasibleSpace:
list:
- "1"
- "2"
- operationType: separable_convolution
parameters:
- name: filter_size
parameterType: categorical
feasibleSpace:
list:
- "3"
- "5"
- "7"
- name: num_filter
parameterType: categorical
feasibleSpace:
list:
- "32"
- "48"
- "64"
- "96"
- "128"
- name: stride
parameterType: categorical
feasibleSpace:
list:
- "1"
- "2"
- name: depth_multiplier
parameterType: categorical
feasibleSpace:
list:
- "1"
- "2"
- operationType: depthwise_convolution
parameters:
- name: filter_size
parameterType: categorical
feasibleSpace:
list:
- "3"
- "5"
- "7"
- name: stride
parameterType: categorical
feasibleSpace:
list:
- "1"
- "2"
- name: depth_multiplier
parameterType: categorical
feasibleSpace:
list:
- "1"
- "2"
- operationType: reduction
parameters:
- name: reduction_type
parameterType: categorical
feasibleSpace:
list:
- max_pooling
- avg_pooling
- name: pool_size
parameterType: int
feasibleSpace:
min: "2"
max: "3"
step: "1"
trialTemplate:
primaryContainerName: training-container
trialParameters:
- name: neuralNetworkArchitecture
description: NN architecture contains operations ID on each NN layer and skip connections between layers
reference: architecture
- name: neuralNetworkConfig
description: Configuration contains NN number of layers, input and output sizes, description what each operation ID means
reference: nn_config
trialSpec:
apiVersion: batch/v1
kind: Job
spec:
template:
spec:
containers:
- name: training-container
image: ghcr.io/kubeflow/katib/enas-cnn-cifar10-cpu:latest
command:
- python3
- -u
- RunTrial.py
- --num_epochs=1
- --architecture="${trialParameters.neuralNetworkArchitecture}"
- --nn_config="${trialParameters.neuralNetworkConfig}"
restartPolicy: Never