add .keras
This commit is contained in:
parent
c31134a40e
commit
78b3d759fd
@ -8,7 +8,7 @@ RUN apt install -y unzip >>/dev/null
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY ./test_eval.py ./
|
||||
COPY ./eval.py ./
|
||||
COPY ./script.sh ./
|
||||
RUN chmod +x script.sh
|
||||
|
||||
|
49
lab5/eval/Jenkinsfile
vendored
Normal file
49
lab5/eval/Jenkinsfile
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
pipeline {
|
||||
agent none
|
||||
parameters {
|
||||
buildSelector(
|
||||
defaultSelector: lastSuccessful(),
|
||||
description: 'Which build to use for copying artifacts',
|
||||
name: 'BUILD_SELECTOR')
|
||||
|
||||
string(name: 'LEARNING_RATE', defaultValue: '0.0003', description: 'learning rate')
|
||||
}
|
||||
stages {
|
||||
stage('copy files') {
|
||||
agent any
|
||||
steps {
|
||||
sh '''
|
||||
cp ./lab5/train/Dockerfile .
|
||||
cp ./lab5/train/script.sh .
|
||||
cp ./lab5/train/eval.py .
|
||||
cp ./lab5/train/requirements.txt .
|
||||
'''
|
||||
}
|
||||
}
|
||||
stage('docker') {
|
||||
agent { dockerfile true }
|
||||
stages {
|
||||
stage('copyArtifacts') {
|
||||
steps {
|
||||
copyArtifacts fingerprintArtifacts: true, projectName: 's470607-training', selector: buildParameter('BUILD_SELECTOR')
|
||||
}
|
||||
}
|
||||
stage('ls') {
|
||||
steps {
|
||||
sh '''
|
||||
chmod +x script.sh
|
||||
ls -lah
|
||||
./script.sh
|
||||
ls -lah
|
||||
'''
|
||||
}
|
||||
}
|
||||
stage('archive artifact') {
|
||||
steps {
|
||||
archiveArtifacts 'eval.csv'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -25,7 +25,8 @@ model = tf.keras.Sequential([
|
||||
])
|
||||
|
||||
model.compile(
|
||||
optimizer=tf.optimizers.Adam(lr=float(sys.argv[1])),
|
||||
loss=tf.keras.losses.BinaryCrossentropy(),
|
||||
optimizer=tf.keras.optimizers.Adam(lr=float(sys.argv[1])),
|
||||
metrics=[tf.keras.metrics.BinaryAccuracy()])
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user