docker task 2 try_4

This commit is contained in:
Kamila 2022-04-03 11:59:09 +02:00
parent d90f6946f1
commit 743350919d
2 changed files with 14 additions and 2 deletions

2
Jenkinsfile vendored
View File

@ -25,10 +25,10 @@ pipeline {
stage('Get data save artifacts') {
steps {
sh 'chmod +x -R ./data_prep.sh'
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
archiveArtifacts artifacts: 'apps_train.csv, apps_test.csv, apps_validate.csv'
}
}
}

View File

@ -32,4 +32,16 @@ data["Installs"] = (data["Installs"] - min_value) / (max_value - min_value)
# splitting into sets
np.random.seed(123)
train, validate, test = np.split(data.sample(frac=1, random_state=42), [int(.6*len(data)), int(.8*len(data))])
print(f"Data shape: {data.shape}\nTrain shape: {train.shape}\nTest shape: {test.shape}\nValidation shape:{validate.shape}")
print(f"Data shape: {data.shape}\nTrain shape: {train.shape}\nTest shape: {test.shape}\nValidation shape:{validate.shape}")
f = open("apps_train.csv", "w")
f.write(train)
f.close()
f = open("apps_test.csv", "w")
f.write(test)
f.close()
f = open("apps_validate.csv", "w")
f.write(validate)
f.close()