epochs parameter
Some checks failed
s434765-training/pipeline/head There was a failure building this commit

This commit is contained in:
Karolina Oparczyk 2021-05-17 21:36:02 +02:00
parent 2286b2b5f2
commit acbeaf5638
3 changed files with 11 additions and 8 deletions

View File

@ -5,7 +5,11 @@ node {
parameters([
buildSelector(defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'BUILD_SELECTOR')
name: 'BUILD_SELECTOR'),
string(defaultValue: '30',
description: 'Amount of epochs',
name: 'EPOCHS',
trim: false),
])
]
)
@ -18,24 +22,23 @@ node {
copyArtifacts fingerprintArtifacts: true, projectName: 's434765-create-dataset', selector: buildParameter("BUILD_SELECTOR")
sh '''
#!/usr/bin/env bash
chmod 777 neural_network.sh
chmod 777 neural_network.sh ${params.KAGGLE_USERNAME}
./neural_network.sh | tee output.txt
'''
archiveArtifacts 'output.txt'
archiveArtifacts 'model/**/*.*'
}
emailext body: 'Successful build',
emailext body: 's434765',
subject: "Successful build",
to: "26ab8f35.uam.onmicrosoft.com@emea.teams.ms"
}
}
catch (e) {
emailext body: 'Failed build',
emailext body: 's434765',
subject: "Failed build",
to: "26ab8f35.uam.onmicrosoft.com@emea.teams.ms"
throw e
}
}
}

View File

@ -3,7 +3,7 @@ import numpy as np
from sklearn.metrics import mean_squared_error
from tensorflow import keras
import sys
def normalize_data(data):
return (data - np.min(data)) / (np.max(data) - np.min(data))
@ -40,7 +40,7 @@ model = keras.Sequential([
model.compile(loss='mean_absolute_error', optimizer="Adam", metrics=['mean_absolute_error'])
model.fit(X, y, epochs=30, validation_split = 0.3)
model.fit(X, y, epochs=int(sys.argv[1]), validation_split = 0.3)
data = pd.read_csv("data_dev", sep=',', error_bad_lines=False,
skip_blank_lines=True, nrows=527, names=["video_id", "last_trending_date",

View File

@ -1,2 +1,2 @@
#!/bin/bash
python3 neural_network.py
python3 neural_network.py $1