Compare commits
6 Commits
evaluation
...
main
Author | SHA1 | Date | |
---|---|---|---|
|
c825535123 | ||
|
d0731feeba | ||
|
fa547c0b8b | ||
|
248ef29471 | ||
|
57def16f1a | ||
|
32a592f78d |
3
.dvc/.gitignore
vendored
Normal file
3
.dvc/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
/config.local
|
||||||
|
/tmp
|
||||||
|
/cache
|
4
.dvc/config
Normal file
4
.dvc/config
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
[core]
|
||||||
|
remote = ium_ssh_remote
|
||||||
|
['remote "ium_ssh_remote"']
|
||||||
|
url = ssh://ium-sftp@tzietkiewicz.vm.wmi.amu.edu.pl
|
3
.dvcignore
Normal file
3
.dvcignore
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Add patterns of files dvc should ignore, which could improve
|
||||||
|
# the performance. Learn more at
|
||||||
|
# https://dvc.org/doc/user-guide/dvcignore
|
77
Jenkinsfile
vendored
77
Jenkinsfile
vendored
@ -1,62 +1,37 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent {
|
agent any
|
||||||
dockerfile true
|
|
||||||
|
parameters {
|
||||||
|
string(name: 'CUTOFF', defaultValue: '100', description: 'Ilość wierszy do odcięcia')
|
||||||
|
string(name: 'KAGGLE_USERNAME', defaultValue: '', description: 'Kaggle username')
|
||||||
|
password(name: 'KAGGLE_KEY', defaultValue: '', description: 'Kaggle API key')
|
||||||
}
|
}
|
||||||
|
|
||||||
triggers {
|
|
||||||
upstream(upstreamProjects: 's464937-training/training', threshold: hudson.model.Result.SUCCESS)
|
|
||||||
}
|
|
||||||
|
|
||||||
parameters {
|
|
||||||
buildSelector(defaultSelector: lastSuccessful(), description: 'Which build to use for copying artifacts', name: 'BUILD_SELECTOR')
|
|
||||||
gitParameter branchFilter: 'origin/(.*)', defaultValue: 'training', name: 'BRANCH', type: 'PT_BRANCH'
|
|
||||||
}
|
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Clone Repository') {
|
stage('Clone repo') {
|
||||||
steps {
|
steps {
|
||||||
git branch: 'evaluation', url: "https://git.wmi.amu.edu.pl/s464937/ium_464937"
|
git branch: "main", url: "https://git.wmi.amu.edu.pl/s464937/ium_464937"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Copy Dataset Artifacts') {
|
|
||||||
steps {
|
|
||||||
copyArtifacts filter: 'data/dev.csv,data/test.csv,data/train.csv', projectName: 'z-s464937-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('Copy Training Artifacts') {
|
|
||||||
steps {
|
|
||||||
copyArtifacts filter: 'powerlifting_model.h5', projectName: 's464937-training/' + params.BRANCH, selector: buildParameter('BUILD_SELECTOR')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('Copy Evaluation Artifacts') {
|
|
||||||
steps {
|
|
||||||
copyArtifacts filter: 'metrics.txt', projectName: 's464937-evaluation/evaluation', selector: buildParameter('BUILD_SELECTOR'), optional: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage("Run predictions") {
|
|
||||||
steps {
|
|
||||||
sh "chmod +x ./predict.py"
|
|
||||||
sh "python3 ./predict.py"
|
|
||||||
archiveArtifacts artifacts: 'powerlifting_test_predictions.csv', onlyIfSuccessful: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('Run metrics') {
|
|
||||||
steps {
|
|
||||||
sh 'chmod +x ./metrics.py'
|
|
||||||
sh "python3 ./metrics.py ${currentBuild.number}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('Run plot') {
|
stage('Download and preprocess') {
|
||||||
steps {
|
environment {
|
||||||
sh 'chmod +x ./plot.py'
|
KAGGLE_USERNAME = "szymonbartanowicz"
|
||||||
sh 'python3 ./plot.py'
|
KAGGLE_KEY = "4692239eb65f20ec79f9a59ef30e67eb"
|
||||||
}
|
}
|
||||||
|
steps {
|
||||||
|
withEnv([
|
||||||
|
"KAGGLE_USERNAME=${env.KAGGLE_USERNAME}",
|
||||||
|
"KAGGLE_KEY=${env.KAGGLE_KEY}"
|
||||||
|
]) {
|
||||||
|
sh "bash ./script1.sh ${params.CUTOFF}"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
stage('Archive Artifacts') {
|
stage('Archive') {
|
||||||
steps {
|
steps {
|
||||||
archiveArtifacts artifacts: '*', onlyIfSuccessful: true
|
archiveArtifacts artifacts: 'data/*', onlyIfSuccessful: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
5
dvc.yaml
Normal file
5
dvc.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
stages:
|
||||||
|
train:
|
||||||
|
cmd: python train.py --epochs=10
|
||||||
|
predict:
|
||||||
|
cmd: python predict.py
|
192
environment.yml
Normal file
192
environment.yml
Normal file
@ -0,0 +1,192 @@
|
|||||||
|
name: ium
|
||||||
|
channels:
|
||||||
|
- anaconda
|
||||||
|
- conda-forge
|
||||||
|
- defaults
|
||||||
|
dependencies:
|
||||||
|
- _tflow_select=2.2.0=eigen
|
||||||
|
- abseil-cpp=20211102.0=he9d5cce_0
|
||||||
|
- absl-py=1.4.0=py311hecd8cb5_0
|
||||||
|
- aiohttp=3.9.3=py311h6c40b1e_0
|
||||||
|
- aiosignal=1.2.0=pyhd3eb1b0_0
|
||||||
|
- alembic=1.8.1=py311hecd8cb5_0
|
||||||
|
- aniso8601=9.0.1=pyhd3eb1b0_0
|
||||||
|
- arrow-cpp=11.0.0=h9980dd5_2
|
||||||
|
- astunparse=1.6.3=py_0
|
||||||
|
- attrs=23.1.0=py311hecd8cb5_0
|
||||||
|
- aws-c-common=0.4.57=hb1e8313_1
|
||||||
|
- aws-c-event-stream=0.1.6=h23ab428_5
|
||||||
|
- aws-checksums=0.1.9=hb1e8313_0
|
||||||
|
- aws-sdk-cpp=1.8.185=he271ece_0
|
||||||
|
- bcrypt=3.2.0=py311h6c40b1e_1
|
||||||
|
- blas=1.0=mkl
|
||||||
|
- blinker=1.6.2=py311hecd8cb5_0
|
||||||
|
- boost-cpp=1.77.0=hff03dee_0
|
||||||
|
- bottleneck=1.3.7=py311hb3a5e46_0
|
||||||
|
- brotli=1.0.9=h6c40b1e_8
|
||||||
|
- brotli-bin=1.0.9=h6c40b1e_8
|
||||||
|
- brotli-python=1.0.9=py311hcec6c5f_7
|
||||||
|
- bzip2=1.0.8=h6c40b1e_5
|
||||||
|
- c-ares=1.19.1=h6c40b1e_0
|
||||||
|
- ca-certificates=2024.3.11=hecd8cb5_0
|
||||||
|
- cachetools=4.2.2=pyhd3eb1b0_0
|
||||||
|
- certifi=2024.2.2=py311hecd8cb5_0
|
||||||
|
- cffi=1.16.0=py311h6c40b1e_0
|
||||||
|
- charset-normalizer=2.0.4=pyhd3eb1b0_0
|
||||||
|
- click=8.1.7=py311hecd8cb5_0
|
||||||
|
- cloudpickle=2.2.1=py311hecd8cb5_0
|
||||||
|
- contourpy=1.2.0=py311ha357a0b_0
|
||||||
|
- cryptography=41.0.3=py311ha2381d6_0
|
||||||
|
- cycler=0.11.0=pyhd3eb1b0_0
|
||||||
|
- docker-py=7.0.0=py311hecd8cb5_0
|
||||||
|
- entrypoints=0.4=py311hecd8cb5_0
|
||||||
|
- flask=2.2.5=py311hecd8cb5_0
|
||||||
|
- flatbuffers=2.0.0=h23ab428_0
|
||||||
|
- fonttools=4.51.0=py311h6c40b1e_0
|
||||||
|
- freetype=2.12.1=hd8bbffd_0
|
||||||
|
- frozenlist=1.4.0=py311h6c40b1e_0
|
||||||
|
- gast=0.4.0=pyhd3eb1b0_0
|
||||||
|
- gflags=2.2.2=hcec6c5f_1
|
||||||
|
- giflib=5.2.1=h6c40b1e_3
|
||||||
|
- gitdb=4.0.7=pyhd3eb1b0_0
|
||||||
|
- gitpython=3.1.37=py311hecd8cb5_0
|
||||||
|
- glog=0.5.0=hcec6c5f_1
|
||||||
|
- google-auth=2.22.0=py311hecd8cb5_0
|
||||||
|
- google-auth-oauthlib=0.5.2=py311hecd8cb5_0
|
||||||
|
- google-pasta=0.2.0=pyhd3eb1b0_0
|
||||||
|
- graphene=3.3=py311hecd8cb5_0
|
||||||
|
- graphql-core=3.2.3=py311hecd8cb5_1
|
||||||
|
- graphql-relay=3.2.0=py311hecd8cb5_0
|
||||||
|
- greenlet=3.0.1=py311hcec6c5f_0
|
||||||
|
- grpc-cpp=1.48.2=h3afe56f_0
|
||||||
|
- grpcio=1.48.2=py311h3afe56f_0
|
||||||
|
- gunicorn=21.2.0=py311hecd8cb5_0
|
||||||
|
- h5py=3.9.0=py311hdb7e403_0
|
||||||
|
- hdf5=1.12.1=h2b2ad87_2
|
||||||
|
- icu=68.1=h23ab428_0
|
||||||
|
- idna=3.4=py311hecd8cb5_0
|
||||||
|
- importlib-metadata=7.0.1=py311hecd8cb5_0
|
||||||
|
- intel-openmp=2021.4.0=hecd8cb5_3538
|
||||||
|
- itsdangerous=2.0.1=pyhd3eb1b0_0
|
||||||
|
- jinja2=3.1.3=py311hecd8cb5_0
|
||||||
|
- joblib=1.2.0=py311hecd8cb5_0
|
||||||
|
- jpeg=9e=h6c40b1e_1
|
||||||
|
- keras=2.12.0=py311_0
|
||||||
|
- keras-preprocessing=1.1.2=pyhd3eb1b0_0
|
||||||
|
- kiwisolver=1.4.4=py311hcec6c5f_0
|
||||||
|
- krb5=1.20.1=hdba6334_1
|
||||||
|
- lcms2=2.12=hf1fd2bf_0
|
||||||
|
- lerc=3.0=he9d5cce_0
|
||||||
|
- libbrotlicommon=1.0.9=h6c40b1e_8
|
||||||
|
- libbrotlidec=1.0.9=h6c40b1e_8
|
||||||
|
- libbrotlienc=1.0.9=h6c40b1e_8
|
||||||
|
- libcurl=8.2.1=ha585b31_0
|
||||||
|
- libcxx=14.0.6=h9765a3e_0
|
||||||
|
- libdeflate=1.17=hb664fd8_1
|
||||||
|
- libedit=3.1.20230828=h6c40b1e_0
|
||||||
|
- libev=4.33=h9ed2024_1
|
||||||
|
- libevent=2.1.12=h0a4fc7d_0
|
||||||
|
- libffi=3.4.4=hecd8cb5_0
|
||||||
|
- libgfortran=5.0.0=11_3_0_hecd8cb5_28
|
||||||
|
- libgfortran5=11.3.0=h9dfd629_28
|
||||||
|
- libnghttp2=1.52.0=h1c88b7d_1
|
||||||
|
- libpng=1.6.39=h6c40b1e_0
|
||||||
|
- libprotobuf=3.20.3=hfff2838_0
|
||||||
|
- libsodium=1.0.18=h1de35cc_0
|
||||||
|
- libssh2=1.10.0=hdb2fb19_2
|
||||||
|
- libthrift=0.15.0=h48f73ad_2
|
||||||
|
- libtiff=4.5.1=hcec6c5f_0
|
||||||
|
- libwebp-base=1.3.2=h6c40b1e_0
|
||||||
|
- llvm-openmp=14.0.6=h0dcd299_0
|
||||||
|
- lz4-c=1.9.4=hcec6c5f_1
|
||||||
|
- mako=1.2.3=py311hecd8cb5_0
|
||||||
|
- markdown=3.4.1=py311hecd8cb5_0
|
||||||
|
- markupsafe=2.1.3=py311h6c40b1e_0
|
||||||
|
- matplotlib=3.8.4=py311hecd8cb5_0
|
||||||
|
- matplotlib-base=3.8.4=py311h41a4f6b_0
|
||||||
|
- mkl=2021.4.0=hecd8cb5_637
|
||||||
|
- mkl-service=2.4.0=py311h6c40b1e_0
|
||||||
|
- mkl_fft=1.3.1=py311hbc8bb1e_0
|
||||||
|
- mkl_random=1.2.2=py311hc5848a5_0
|
||||||
|
- mlflow=2.12.2=h6eed73b_0
|
||||||
|
- mlflow-skinny=2.12.2=py311h6eed73b_0
|
||||||
|
- mlflow-ui=2.12.2=py311h6eed73b_0
|
||||||
|
- multidict=6.0.4=py311h6c40b1e_0
|
||||||
|
- ncurses=6.4=hcec6c5f_0
|
||||||
|
- numexpr=2.8.4=py311h72c71eb_0
|
||||||
|
- numpy=1.23.5=py311h72c71eb_0
|
||||||
|
- numpy-base=1.23.5=py311h0e1ec55_0
|
||||||
|
- oauthlib=3.2.2=py311hecd8cb5_0
|
||||||
|
- openjpeg=2.4.0=h66ea3da_0
|
||||||
|
- openssl=1.1.1w=hca72f7f_0
|
||||||
|
- opt_einsum=3.3.0=pyhd3eb1b0_1
|
||||||
|
- orc=1.7.4=h995b336_1
|
||||||
|
- packaging=23.2=py311hecd8cb5_0
|
||||||
|
- pandas=2.2.1=py311hdb55bb0_0
|
||||||
|
- paramiko=2.8.1=pyhd3eb1b0_0
|
||||||
|
- pillow=10.3.0=py311h6c40b1e_0
|
||||||
|
- pip=23.3.1=py311hecd8cb5_0
|
||||||
|
- platformdirs=3.10.0=py311hecd8cb5_0
|
||||||
|
- pooch=1.7.0=py311hecd8cb5_0
|
||||||
|
- prometheus_client=0.14.1=py311hecd8cb5_0
|
||||||
|
- prometheus_flask_exporter=0.22.4=py311hecd8cb5_0
|
||||||
|
- protobuf=3.20.3=py311hcec6c5f_0
|
||||||
|
- pyarrow=11.0.0=py311hf41f4e6_1
|
||||||
|
- pyasn1=0.4.8=pyhd3eb1b0_0
|
||||||
|
- pyasn1-modules=0.2.8=py_0
|
||||||
|
- pycparser=2.21=pyhd3eb1b0_0
|
||||||
|
- pyjwt=2.4.0=py311hecd8cb5_0
|
||||||
|
- pynacl=1.5.0=py311h6c40b1e_0
|
||||||
|
- pyopenssl=23.2.0=py311hecd8cb5_0
|
||||||
|
- pyparsing=3.0.9=py311hecd8cb5_0
|
||||||
|
- pysocks=1.7.1=py311hecd8cb5_0
|
||||||
|
- python=3.11.5=h1fd4e5f_0
|
||||||
|
- python-dateutil=2.8.2=pyhd3eb1b0_0
|
||||||
|
- python-flatbuffers=2.0=pyhd3eb1b0_0
|
||||||
|
- python-tzdata=2023.3=pyhd3eb1b0_0
|
||||||
|
- python_abi=3.11=2_cp311
|
||||||
|
- pytz=2023.3.post1=py311hecd8cb5_0
|
||||||
|
- pyyaml=6.0.1=py311h6c40b1e_0
|
||||||
|
- querystring_parser=1.2.4=py311hecd8cb5_0
|
||||||
|
- re2=2022.04.01=he9d5cce_0
|
||||||
|
- readline=8.2=hca72f7f_0
|
||||||
|
- requests=2.31.0=py311hecd8cb5_1
|
||||||
|
- requests-oauthlib=1.3.0=py_0
|
||||||
|
- rsa=4.7.2=pyhd3eb1b0_1
|
||||||
|
- scikit-learn=1.2.2=py311hcec6c5f_1
|
||||||
|
- scipy=1.10.1=py311hb23b6d4_0
|
||||||
|
- setuptools=68.2.2=py311hecd8cb5_0
|
||||||
|
- six=1.16.0=pyhd3eb1b0_1
|
||||||
|
- smmap=4.0.0=pyhd3eb1b0_0
|
||||||
|
- snappy=1.1.10=hcec6c5f_1
|
||||||
|
- sqlalchemy=2.0.25=py311h6c40b1e_0
|
||||||
|
- sqlite=3.41.2=h6c40b1e_0
|
||||||
|
- sqlparse=0.4.4=py311hecd8cb5_0
|
||||||
|
- tbb=2021.8.0=ha357a0b_0
|
||||||
|
- tensorboard=2.12.1=py311_0
|
||||||
|
- tensorboard-data-server=0.7.0=py311h7242b5c_0
|
||||||
|
- tensorboard-plugin-wit=1.6.0=py_0
|
||||||
|
- tensorflow=2.12.0=eigen_py311h4c7017d_0
|
||||||
|
- tensorflow-base=2.12.0=eigen_py311hbf87084_0
|
||||||
|
- tensorflow-estimator=2.12.0=py311_0
|
||||||
|
- termcolor=2.1.0=py311hecd8cb5_0
|
||||||
|
- threadpoolctl=2.2.0=pyh0d69192_0
|
||||||
|
- tk=8.6.12=h5d9f67b_0
|
||||||
|
- tornado=6.3.3=py311h6c40b1e_0
|
||||||
|
- typing-extensions=4.9.0=py311hecd8cb5_1
|
||||||
|
- typing_extensions=4.9.0=py311hecd8cb5_1
|
||||||
|
- tzdata=2024a=h04d1e81_0
|
||||||
|
- unicodedata2=15.1.0=py311h6c40b1e_0
|
||||||
|
- urllib3=1.26.18=py311hecd8cb5_0
|
||||||
|
- utf8proc=2.6.1=h6c40b1e_1
|
||||||
|
- websocket-client=1.8.0=py311hecd8cb5_0
|
||||||
|
- werkzeug=2.3.8=py311hecd8cb5_0
|
||||||
|
- wheel=0.35.1=pyhd3eb1b0_0
|
||||||
|
- wrapt=1.14.1=py311h6c40b1e_0
|
||||||
|
- xz=5.4.6=h6c40b1e_0
|
||||||
|
- yaml=0.2.5=haf1e3a3_0
|
||||||
|
- yarl=1.9.3=py311h6c40b1e_0
|
||||||
|
- zipp=3.17.0=py311hecd8cb5_0
|
||||||
|
- zlib=1.2.13=h4dc903c_0
|
||||||
|
- zstd=1.5.5=hc035e20_2
|
||||||
|
prefix: /opt/anaconda3/envs/ium
|
14
metrics.py
14
metrics.py
@ -1,14 +0,0 @@
|
|||||||
import pandas as pd
|
|
||||||
from sklearn.metrics import accuracy_score, precision_recall_fscore_support, mean_squared_error
|
|
||||||
from math import sqrt
|
|
||||||
import sys
|
|
||||||
|
|
||||||
data = pd.read_csv('powerlifting_test_predictions.csv')
|
|
||||||
y_pred = data['predicted_TotalKg']
|
|
||||||
y_test = data['actual_TotalKg']
|
|
||||||
|
|
||||||
build_number = sys.argv[1]
|
|
||||||
rmse = sqrt(mean_squared_error(y_test, y_pred))
|
|
||||||
|
|
||||||
with open(r"metrics.txt", "a") as f:
|
|
||||||
f.write(f"{build_number},{rmse}\n")
|
|
7
mlflow/MLproject
Normal file
7
mlflow/MLproject
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
name: MLflow_s464937
|
||||||
|
conda_env: conda.yaml
|
||||||
|
entry_points:
|
||||||
|
main:
|
||||||
|
parameters:
|
||||||
|
epochs: { type: int, default: 20 }
|
||||||
|
command: 'python mlflow_model.py {epochs}'
|
12
mlflow/conda.yaml
Normal file
12
mlflow/conda.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
name: MLflow_s464937
|
||||||
|
channels:
|
||||||
|
- defaults
|
||||||
|
dependencies:
|
||||||
|
- python=3.11
|
||||||
|
- pip
|
||||||
|
- pip:
|
||||||
|
- wheel
|
||||||
|
- mlflow
|
||||||
|
- tensorflow
|
||||||
|
- pandas
|
||||||
|
- scikit-learn
|
79
mlflow/mlflow_model.py
Normal file
79
mlflow/mlflow_model.py
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
import sys
|
||||||
|
import pandas as pd
|
||||||
|
from sklearn.model_selection import train_test_split
|
||||||
|
from sklearn.preprocessing import StandardScaler, OneHotEncoder
|
||||||
|
from sklearn.compose import ColumnTransformer
|
||||||
|
from sklearn.pipeline import Pipeline
|
||||||
|
from tensorflow.keras.models import Sequential
|
||||||
|
from tensorflow.keras.layers import Dense
|
||||||
|
import tensorflow as tf
|
||||||
|
from sklearn.metrics import accuracy_score, precision_recall_fscore_support, mean_squared_error
|
||||||
|
from math import sqrt
|
||||||
|
import mlflow
|
||||||
|
|
||||||
|
|
||||||
|
mlflow.set_tracking_uri("http://localhost:5000")
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
data = pd.read_csv('../openpowerlifting.csv')
|
||||||
|
data = data[['Sex', 'Age', 'BodyweightKg', 'TotalKg']].dropna()
|
||||||
|
data['Age'] = pd.to_numeric(data['Age'], errors='coerce')
|
||||||
|
data['BodyweightKg'] = pd.to_numeric(data['BodyweightKg'], errors='coerce')
|
||||||
|
data['TotalKg'] = pd.to_numeric(data['TotalKg'], errors='coerce')
|
||||||
|
features = data[['Sex', 'Age', 'BodyweightKg']]
|
||||||
|
target = data['TotalKg']
|
||||||
|
X_train, X_test, y_train, y_test = train_test_split(features, target, test_size=0.2, random_state=42)
|
||||||
|
|
||||||
|
with mlflow.start_run() as run:
|
||||||
|
preprocessor = ColumnTransformer(
|
||||||
|
transformers=[
|
||||||
|
('num', StandardScaler(), ['Age', 'BodyweightKg']),
|
||||||
|
('cat', OneHotEncoder(), ['Sex'])
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
model = Sequential([
|
||||||
|
Dense(64, activation='relu', input_dim=5),
|
||||||
|
Dense(64, activation='relu'),
|
||||||
|
Dense(1)
|
||||||
|
])
|
||||||
|
|
||||||
|
model.compile(optimizer='adam', loss='mse', metrics=['mae'])
|
||||||
|
pipeline = Pipeline(steps=[
|
||||||
|
('preprocessor', preprocessor),
|
||||||
|
('model', model)
|
||||||
|
])
|
||||||
|
|
||||||
|
X_train_excluded = X_train.iloc[1:]
|
||||||
|
y_train_excluded = y_train.iloc[1:]
|
||||||
|
pipeline.fit(X_train_excluded, y_train_excluded, model__epochs=int(sys.argv[1]), model__validation_split=0.1)
|
||||||
|
pipeline['model'].save('powerlifting_model.h5')
|
||||||
|
loaded_model = tf.keras.models.load_model('powerlifting_model.h5')
|
||||||
|
|
||||||
|
test_data = pd.read_csv('openpowerlifting.csv')
|
||||||
|
test_data = test_data[['Sex', 'Age', 'BodyweightKg', 'TotalKg']].dropna()
|
||||||
|
test_data['Age'] = pd.to_numeric(test_data['Age'], errors='coerce')
|
||||||
|
test_data['BodyweightKg'] = pd.to_numeric(test_data['BodyweightKg'], errors='coerce')
|
||||||
|
test_data['TotalKg'] = pd.to_numeric(test_data['TotalKg'], errors='coerce')
|
||||||
|
test_features = test_data[['Sex', 'Age', 'BodyweightKg']]
|
||||||
|
test_target = test_data['TotalKg']
|
||||||
|
|
||||||
|
X_test_transformed = preprocessor.transform(test_features)
|
||||||
|
predictions = loaded_model.predict(X_test_transformed)
|
||||||
|
predictions_df = pd.DataFrame(predictions, columns=['predicted_TotalKg'])
|
||||||
|
predictions_df['actual_TotalKg'] = test_target.reset_index(drop=True)
|
||||||
|
predictions_df.to_csv('powerlifting_test_predictions.csv', index=False)
|
||||||
|
|
||||||
|
data = pd.read_csv('powerlifting_test_predictions.csv')
|
||||||
|
y_pred = data['predicted_TotalKg']
|
||||||
|
y_test = data['actual_TotalKg']
|
||||||
|
rmse = sqrt(mean_squared_error(y_test, y_pred))
|
||||||
|
|
||||||
|
|
||||||
|
mlflow.log_param("epochs", int(sys.argv[1]))
|
||||||
|
mlflow.log_metric("rmse", rmse)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
6
mlflow/mlruns/0/meta.yaml
Normal file
6
mlflow/mlruns/0/meta.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
artifact_location: mlflow-artifacts:/0
|
||||||
|
creation_time: 1716052613528
|
||||||
|
experiment_id: '0'
|
||||||
|
last_update_time: 1716052613528
|
||||||
|
lifecycle_stage: active
|
||||||
|
name: Default
|
15
mlruns/0/31cdeea18bf145dfbd195bc6b8d5b080/meta.yaml
Normal file
15
mlruns/0/31cdeea18bf145dfbd195bc6b8d5b080/meta.yaml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
artifact_uri: mlflow-artifacts:/0/31cdeea18bf145dfbd195bc6b8d5b080/artifacts
|
||||||
|
end_time: 1716232849257
|
||||||
|
entry_point_name: ''
|
||||||
|
experiment_id: '0'
|
||||||
|
lifecycle_stage: active
|
||||||
|
run_id: 31cdeea18bf145dfbd195bc6b8d5b080
|
||||||
|
run_name: thundering-ant-548
|
||||||
|
run_uuid: 31cdeea18bf145dfbd195bc6b8d5b080
|
||||||
|
source_name: ''
|
||||||
|
source_type: 4
|
||||||
|
source_version: ''
|
||||||
|
start_time: 1716232828540
|
||||||
|
status: 4
|
||||||
|
tags: []
|
||||||
|
user_id: szymonbartanowicz
|
1
mlruns/0/31cdeea18bf145dfbd195bc6b8d5b080/params/epochs
Normal file
1
mlruns/0/31cdeea18bf145dfbd195bc6b8d5b080/params/epochs
Normal file
@ -0,0 +1 @@
|
|||||||
|
12
|
@ -0,0 +1 @@
|
|||||||
|
https://git.wmi.amu.edu.pl/s464937/ium_464937.git
|
@ -0,0 +1 @@
|
|||||||
|
local
|
@ -0,0 +1 @@
|
|||||||
|
main
|
@ -0,0 +1 @@
|
|||||||
|
conda
|
@ -0,0 +1 @@
|
|||||||
|
thundering-ant-548
|
@ -0,0 +1 @@
|
|||||||
|
248ef29471dcdc13631ea1693f701335a05c4801
|
@ -0,0 +1 @@
|
|||||||
|
https://git.wmi.amu.edu.pl/s464937/ium_464937.git
|
@ -0,0 +1 @@
|
|||||||
|
file:///Users/szymonbartanowicz/studia/mag_1/inzynieria_uczenia_maszynowego/ium_464937#mlflow
|
@ -0,0 +1 @@
|
|||||||
|
PROJECT
|
@ -0,0 +1 @@
|
|||||||
|
szymonbartanowicz
|
15
mlruns/0/4937350a1f5a4dfb94d8e959ebb7baff/meta.yaml
Normal file
15
mlruns/0/4937350a1f5a4dfb94d8e959ebb7baff/meta.yaml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
artifact_uri: mlflow-artifacts:/0/4937350a1f5a4dfb94d8e959ebb7baff/artifacts
|
||||||
|
end_time: 1716232283577
|
||||||
|
entry_point_name: ''
|
||||||
|
experiment_id: '0'
|
||||||
|
lifecycle_stage: active
|
||||||
|
run_id: 4937350a1f5a4dfb94d8e959ebb7baff
|
||||||
|
run_name: luminous-gnat-829
|
||||||
|
run_uuid: 4937350a1f5a4dfb94d8e959ebb7baff
|
||||||
|
source_name: ''
|
||||||
|
source_type: 4
|
||||||
|
source_version: ''
|
||||||
|
start_time: 1716232281564
|
||||||
|
status: 4
|
||||||
|
tags: []
|
||||||
|
user_id: szymonbartanowicz
|
1
mlruns/0/4937350a1f5a4dfb94d8e959ebb7baff/params/epochs
Normal file
1
mlruns/0/4937350a1f5a4dfb94d8e959ebb7baff/params/epochs
Normal file
@ -0,0 +1 @@
|
|||||||
|
12
|
@ -0,0 +1 @@
|
|||||||
|
https://git.wmi.amu.edu.pl/s464937/ium_464937.git
|
@ -0,0 +1 @@
|
|||||||
|
local
|
@ -0,0 +1 @@
|
|||||||
|
main
|
@ -0,0 +1 @@
|
|||||||
|
conda
|
@ -0,0 +1 @@
|
|||||||
|
luminous-gnat-829
|
@ -0,0 +1 @@
|
|||||||
|
248ef29471dcdc13631ea1693f701335a05c4801
|
@ -0,0 +1 @@
|
|||||||
|
https://git.wmi.amu.edu.pl/s464937/ium_464937.git
|
@ -0,0 +1 @@
|
|||||||
|
file:///Users/szymonbartanowicz/studia/mag_1/inzynieria_uczenia_maszynowego/ium_464937#mlflow
|
@ -0,0 +1 @@
|
|||||||
|
PROJECT
|
@ -0,0 +1 @@
|
|||||||
|
szymonbartanowicz
|
15
mlruns/0/57d7ab4f49254f8287e41a3d8e19dd9d/meta.yaml
Normal file
15
mlruns/0/57d7ab4f49254f8287e41a3d8e19dd9d/meta.yaml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
artifact_uri: mlflow-artifacts:/0/57d7ab4f49254f8287e41a3d8e19dd9d/artifacts
|
||||||
|
end_time: 1716232574871
|
||||||
|
entry_point_name: ''
|
||||||
|
experiment_id: '0'
|
||||||
|
lifecycle_stage: active
|
||||||
|
run_id: 57d7ab4f49254f8287e41a3d8e19dd9d
|
||||||
|
run_name: serious-bear-162
|
||||||
|
run_uuid: 57d7ab4f49254f8287e41a3d8e19dd9d
|
||||||
|
source_name: ''
|
||||||
|
source_type: 4
|
||||||
|
source_version: ''
|
||||||
|
start_time: 1716232379179
|
||||||
|
status: 4
|
||||||
|
tags: []
|
||||||
|
user_id: szymonbartanowicz
|
1
mlruns/0/57d7ab4f49254f8287e41a3d8e19dd9d/params/epochs
Normal file
1
mlruns/0/57d7ab4f49254f8287e41a3d8e19dd9d/params/epochs
Normal file
@ -0,0 +1 @@
|
|||||||
|
12
|
@ -0,0 +1 @@
|
|||||||
|
https://git.wmi.amu.edu.pl/s464937/ium_464937.git
|
@ -0,0 +1 @@
|
|||||||
|
local
|
@ -0,0 +1 @@
|
|||||||
|
main
|
@ -0,0 +1 @@
|
|||||||
|
conda
|
@ -0,0 +1 @@
|
|||||||
|
serious-bear-162
|
@ -0,0 +1 @@
|
|||||||
|
248ef29471dcdc13631ea1693f701335a05c4801
|
@ -0,0 +1 @@
|
|||||||
|
https://git.wmi.amu.edu.pl/s464937/ium_464937.git
|
@ -0,0 +1 @@
|
|||||||
|
file:///Users/szymonbartanowicz/studia/mag_1/inzynieria_uczenia_maszynowego/ium_464937#mlflow
|
@ -0,0 +1 @@
|
|||||||
|
PROJECT
|
@ -0,0 +1 @@
|
|||||||
|
szymonbartanowicz
|
15
mlruns/0/852a00be19a04756b19b2a0fdb0c6a83/meta.yaml
Normal file
15
mlruns/0/852a00be19a04756b19b2a0fdb0c6a83/meta.yaml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
artifact_uri: mlflow-artifacts:/0/852a00be19a04756b19b2a0fdb0c6a83/artifacts
|
||||||
|
end_time: null
|
||||||
|
entry_point_name: ''
|
||||||
|
experiment_id: '0'
|
||||||
|
lifecycle_stage: active
|
||||||
|
run_id: 852a00be19a04756b19b2a0fdb0c6a83
|
||||||
|
run_name: skillful-worm-708
|
||||||
|
run_uuid: 852a00be19a04756b19b2a0fdb0c6a83
|
||||||
|
source_name: ''
|
||||||
|
source_type: 4
|
||||||
|
source_version: ''
|
||||||
|
start_time: 1716053034879
|
||||||
|
status: 1
|
||||||
|
tags: []
|
||||||
|
user_id: szymonbartanowicz
|
1
mlruns/0/852a00be19a04756b19b2a0fdb0c6a83/params/epoches
Normal file
1
mlruns/0/852a00be19a04756b19b2a0fdb0c6a83/params/epoches
Normal file
@ -0,0 +1 @@
|
|||||||
|
12
|
1
mlruns/0/852a00be19a04756b19b2a0fdb0c6a83/params/epochs
Normal file
1
mlruns/0/852a00be19a04756b19b2a0fdb0c6a83/params/epochs
Normal file
@ -0,0 +1 @@
|
|||||||
|
20
|
@ -0,0 +1 @@
|
|||||||
|
https://git.wmi.amu.edu.pl/s464937/ium_464937.git
|
@ -0,0 +1 @@
|
|||||||
|
main
|
@ -0,0 +1 @@
|
|||||||
|
conda
|
@ -0,0 +1 @@
|
|||||||
|
skillful-worm-708
|
@ -0,0 +1 @@
|
|||||||
|
57def16f1aff244cfe1e2bc1042a97b64459753e
|
@ -0,0 +1 @@
|
|||||||
|
https://git.wmi.amu.edu.pl/s464937/ium_464937.git
|
@ -0,0 +1 @@
|
|||||||
|
file:///Users/szymonbartanowicz/studia/mag_1/inzynieria_uczenia_maszynowego/ium_464937#mlflow
|
@ -0,0 +1 @@
|
|||||||
|
PROJECT
|
@ -0,0 +1 @@
|
|||||||
|
szymonbartanowicz
|
15
mlruns/0/a7bad8d56b5a476193134123f3175c00/meta.yaml
Normal file
15
mlruns/0/a7bad8d56b5a476193134123f3175c00/meta.yaml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
artifact_uri: mlflow-artifacts:/0/a7bad8d56b5a476193134123f3175c00/artifacts
|
||||||
|
end_time: 1716053941729
|
||||||
|
entry_point_name: ''
|
||||||
|
experiment_id: '0'
|
||||||
|
lifecycle_stage: active
|
||||||
|
run_id: a7bad8d56b5a476193134123f3175c00
|
||||||
|
run_name: brawny-stag-513
|
||||||
|
run_uuid: a7bad8d56b5a476193134123f3175c00
|
||||||
|
source_name: ''
|
||||||
|
source_type: 4
|
||||||
|
source_version: ''
|
||||||
|
start_time: 1716053939145
|
||||||
|
status: 4
|
||||||
|
tags: []
|
||||||
|
user_id: szymonbartanowicz
|
1
mlruns/0/a7bad8d56b5a476193134123f3175c00/params/epoches
Normal file
1
mlruns/0/a7bad8d56b5a476193134123f3175c00/params/epoches
Normal file
@ -0,0 +1 @@
|
|||||||
|
12
|
1
mlruns/0/a7bad8d56b5a476193134123f3175c00/params/epochs
Normal file
1
mlruns/0/a7bad8d56b5a476193134123f3175c00/params/epochs
Normal file
@ -0,0 +1 @@
|
|||||||
|
20
|
@ -0,0 +1 @@
|
|||||||
|
https://git.wmi.amu.edu.pl/s464937/ium_464937.git
|
@ -0,0 +1 @@
|
|||||||
|
local
|
@ -0,0 +1 @@
|
|||||||
|
main
|
@ -0,0 +1 @@
|
|||||||
|
conda
|
@ -0,0 +1 @@
|
|||||||
|
brawny-stag-513
|
@ -0,0 +1 @@
|
|||||||
|
57def16f1aff244cfe1e2bc1042a97b64459753e
|
@ -0,0 +1 @@
|
|||||||
|
https://git.wmi.amu.edu.pl/s464937/ium_464937.git
|
@ -0,0 +1 @@
|
|||||||
|
file:///Users/szymonbartanowicz/studia/mag_1/inzynieria_uczenia_maszynowego/ium_464937#mlflow
|
@ -0,0 +1 @@
|
|||||||
|
PROJECT
|
@ -0,0 +1 @@
|
|||||||
|
szymonbartanowicz
|
15
mlruns/0/b7c7e490ed0f4a6d98293d275b5f67a9/meta.yaml
Normal file
15
mlruns/0/b7c7e490ed0f4a6d98293d275b5f67a9/meta.yaml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
artifact_uri: mlflow-artifacts:/0/b7c7e490ed0f4a6d98293d275b5f67a9/artifacts
|
||||||
|
end_time: 1716053969998
|
||||||
|
entry_point_name: ''
|
||||||
|
experiment_id: '0'
|
||||||
|
lifecycle_stage: active
|
||||||
|
run_id: b7c7e490ed0f4a6d98293d275b5f67a9
|
||||||
|
run_name: zealous-crow-502
|
||||||
|
run_uuid: b7c7e490ed0f4a6d98293d275b5f67a9
|
||||||
|
source_name: ''
|
||||||
|
source_type: 4
|
||||||
|
source_version: ''
|
||||||
|
start_time: 1716053967858
|
||||||
|
status: 4
|
||||||
|
tags: []
|
||||||
|
user_id: szymonbartanowicz
|
1
mlruns/0/b7c7e490ed0f4a6d98293d275b5f67a9/params/epochs
Normal file
1
mlruns/0/b7c7e490ed0f4a6d98293d275b5f67a9/params/epochs
Normal file
@ -0,0 +1 @@
|
|||||||
|
12
|
@ -0,0 +1 @@
|
|||||||
|
https://git.wmi.amu.edu.pl/s464937/ium_464937.git
|
@ -0,0 +1 @@
|
|||||||
|
local
|
@ -0,0 +1 @@
|
|||||||
|
main
|
@ -0,0 +1 @@
|
|||||||
|
conda
|
@ -0,0 +1 @@
|
|||||||
|
zealous-crow-502
|
@ -0,0 +1 @@
|
|||||||
|
57def16f1aff244cfe1e2bc1042a97b64459753e
|
@ -0,0 +1 @@
|
|||||||
|
https://git.wmi.amu.edu.pl/s464937/ium_464937.git
|
@ -0,0 +1 @@
|
|||||||
|
file:///Users/szymonbartanowicz/studia/mag_1/inzynieria_uczenia_maszynowego/ium_464937#mlflow
|
@ -0,0 +1 @@
|
|||||||
|
PROJECT
|
@ -0,0 +1 @@
|
|||||||
|
szymonbartanowicz
|
15
mlruns/0/bdf097416e4644638d2e80c33627e82b/meta.yaml
Normal file
15
mlruns/0/bdf097416e4644638d2e80c33627e82b/meta.yaml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
artifact_uri: mlflow-artifacts:/0/bdf097416e4644638d2e80c33627e82b/artifacts
|
||||||
|
end_time: 1716232202213
|
||||||
|
entry_point_name: ''
|
||||||
|
experiment_id: '0'
|
||||||
|
lifecycle_stage: active
|
||||||
|
run_id: bdf097416e4644638d2e80c33627e82b
|
||||||
|
run_name: peaceful-pug-201
|
||||||
|
run_uuid: bdf097416e4644638d2e80c33627e82b
|
||||||
|
source_name: ''
|
||||||
|
source_type: 4
|
||||||
|
source_version: ''
|
||||||
|
start_time: 1716232198565
|
||||||
|
status: 4
|
||||||
|
tags: []
|
||||||
|
user_id: szymonbartanowicz
|
1
mlruns/0/bdf097416e4644638d2e80c33627e82b/params/epochs
Normal file
1
mlruns/0/bdf097416e4644638d2e80c33627e82b/params/epochs
Normal file
@ -0,0 +1 @@
|
|||||||
|
12
|
@ -0,0 +1 @@
|
|||||||
|
https://git.wmi.amu.edu.pl/s464937/ium_464937.git
|
@ -0,0 +1 @@
|
|||||||
|
local
|
@ -0,0 +1 @@
|
|||||||
|
main
|
@ -0,0 +1 @@
|
|||||||
|
conda
|
@ -0,0 +1 @@
|
|||||||
|
peaceful-pug-201
|
@ -0,0 +1 @@
|
|||||||
|
248ef29471dcdc13631ea1693f701335a05c4801
|
@ -0,0 +1 @@
|
|||||||
|
https://git.wmi.amu.edu.pl/s464937/ium_464937.git
|
@ -0,0 +1 @@
|
|||||||
|
file:///Users/szymonbartanowicz/studia/mag_1/inzynieria_uczenia_maszynowego/ium_464937#mlflow
|
@ -0,0 +1 @@
|
|||||||
|
PROJECT
|
@ -0,0 +1 @@
|
|||||||
|
szymonbartanowicz
|
15
mlruns/0/dd9e039328564f8bb20449bd7bea8ab1/meta.yaml
Normal file
15
mlruns/0/dd9e039328564f8bb20449bd7bea8ab1/meta.yaml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
artifact_uri: mlflow-artifacts:/0/dd9e039328564f8bb20449bd7bea8ab1/artifacts
|
||||||
|
end_time: 1716053927316
|
||||||
|
entry_point_name: ''
|
||||||
|
experiment_id: '0'
|
||||||
|
lifecycle_stage: active
|
||||||
|
run_id: dd9e039328564f8bb20449bd7bea8ab1
|
||||||
|
run_name: efficient-cod-832
|
||||||
|
run_uuid: dd9e039328564f8bb20449bd7bea8ab1
|
||||||
|
source_name: ''
|
||||||
|
source_type: 4
|
||||||
|
source_version: ''
|
||||||
|
start_time: 1716053923906
|
||||||
|
status: 4
|
||||||
|
tags: []
|
||||||
|
user_id: szymonbartanowicz
|
1
mlruns/0/dd9e039328564f8bb20449bd7bea8ab1/params/epoches
Normal file
1
mlruns/0/dd9e039328564f8bb20449bd7bea8ab1/params/epoches
Normal file
@ -0,0 +1 @@
|
|||||||
|
12
|
1
mlruns/0/dd9e039328564f8bb20449bd7bea8ab1/params/epochs
Normal file
1
mlruns/0/dd9e039328564f8bb20449bd7bea8ab1/params/epochs
Normal file
@ -0,0 +1 @@
|
|||||||
|
20
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user