From f970648895a279285ffc1a9b352860fd7dab718a Mon Sep 17 00:00:00 2001 From: Wojciech Jarmosz Date: Sat, 15 May 2021 03:22:57 +0200 Subject: [PATCH] Fixes for lab5, lab6 --- Jenkinsfile | 3 ++- Jenkinsfile_train | 2 +- linear_regression.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6c9f70a..eb34a15 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -11,13 +11,14 @@ stages { withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}", "CUTOFF=${params.CUTOFF}" ]) { // Skrypt z lab 5 - prosta sieć neuronowa - // sh 'python3 linear_regression.py' + sh 'python3 linear_regression.py' // Wygenerowanie podziału danych sh 'python3 script.py' // Stare skrypty bashowe do podziału zbioru // sh "chmod 777 ./data_download.sh" // sh "./data_download.sh" // Zapisanie artefaktów + archiveArtifacts "results.txt" archiveArtifacts "MoviesOnStreamingPlatforms_updated.dev" archiveArtifacts "MoviesOnStreamingPlatforms_updated.test" archiveArtifacts "MoviesOnStreamingPlatforms_updated.train" diff --git a/Jenkinsfile_train b/Jenkinsfile_train index b429afd..42000a2 100644 --- a/Jenkinsfile_train +++ b/Jenkinsfile_train @@ -5,7 +5,7 @@ pipeline { parameters { gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'BRANCH', type: 'PT_BRANCH' string(name: 'epochs', description: 'epochs number', defaultValue: '100') - string(name: 'verbose', description: 'verbose number' defaultValue: '0') + string(name: 'verbose', description: 'verbose number', defaultValue: '0') buildSelector(defaultSelector: lastSuccessful(), description: 'Use latest build', name: 'BUILD_SELECTOR') } stages { diff --git a/linear_regression.py b/linear_regression.py index 2b6ed6f..06671d5 100644 --- a/linear_regression.py +++ b/linear_regression.py @@ -46,6 +46,6 @@ else: results = model.predict(test_X) # Zapis danych do pliku -with open("results.txt", 'w') as file: +with open("results_lab5.txt", 'w') as file: for result in results: file.writelines(str(result[0]) + "\n") \ No newline at end of file