iteration parameter
This commit is contained in:
parent
dcb52af614
commit
76a6537844
@ -2,12 +2,19 @@ pipeline {
|
|||||||
agent {
|
agent {
|
||||||
dockerfile true
|
dockerfile true
|
||||||
}
|
}
|
||||||
|
parameters {
|
||||||
|
string(
|
||||||
|
defaultValue: '2',
|
||||||
|
description: 'learning iterations',
|
||||||
|
name: 'epoch'
|
||||||
|
)
|
||||||
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Stage 1') {
|
stage('Stage 1') {
|
||||||
steps {
|
steps {
|
||||||
copyArtifacts filter: 'data.csv', fingerprintArtifacts: true, projectName: 's444386-create-dataset', selector: lastSuccessful()
|
copyArtifacts filter: 'data.csv', fingerprintArtifacts: true, projectName: 's444386-create-dataset', selector: lastSuccessful()
|
||||||
sh 'chmod u+x ./biblioteki_dl.py'
|
sh 'chmod u+x ./biblioteki_dl.py'
|
||||||
sh 'python3 biblioteki_dl.py'
|
sh 'python3 biblioteki_dl.py $epoch'
|
||||||
sh 'tar -czf model.tar.gz model/'
|
sh 'tar -czf model.tar.gz model/'
|
||||||
archiveArtifacts 'model.tar.gz'
|
archiveArtifacts 'model.tar.gz'
|
||||||
archiveArtifacts 'xtest.csv'
|
archiveArtifacts 'xtest.csv'
|
||||||
|
@ -4,10 +4,13 @@ import pandas as pd
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
import csv
|
import csv
|
||||||
from sklearn.model_selection import train_test_split
|
from sklearn.model_selection import train_test_split
|
||||||
|
import sys
|
||||||
|
|
||||||
# os.system("kaggle datasets download -d tamber/steam-video-games")
|
# os.system("kaggle datasets download -d tamber/steam-video-games")
|
||||||
# os.system("unzip -o steam-video-games.zip")
|
# os.system("unzip -o steam-video-games.zip")
|
||||||
|
|
||||||
|
epoch = int(sys.argv[1])
|
||||||
|
|
||||||
steam=pd.read_csv('data.csv',usecols=[0,1,2,3],names=['userId','game','behavior','hoursPlayed'])
|
steam=pd.read_csv('data.csv',usecols=[0,1,2,3],names=['userId','game','behavior','hoursPlayed'])
|
||||||
steam.isnull().values.any()
|
steam.isnull().values.any()
|
||||||
steam['userId'] = steam.userId.astype(str)
|
steam['userId'] = steam.userId.astype(str)
|
||||||
@ -109,7 +112,7 @@ y_test = np.array(y_test).astype(np.float32)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
model.fit(x_train, y_train, epochs=2)
|
model.fit(x_train, y_train, epochs=epoch)
|
||||||
model.evaluate(x_test, y_test)
|
model.evaluate(x_test, y_test)
|
||||||
prediction = model.predict(x_test)
|
prediction = model.predict(x_test)
|
||||||
classes_x=np.argmax(prediction,axis=1)
|
classes_x=np.argmax(prediction,axis=1)
|
||||||
|
Loading…
Reference in New Issue
Block a user