MLmodel file
Some checks failed
s426206-training/pipeline/head There was a failure building this commit

This commit is contained in:
Jan Nowak 2021-05-23 12:59:52 +02:00
parent 0846039aa6
commit 39e30e9691
3 changed files with 8 additions and 7 deletions

1
.gitignore vendored
View File

@ -6,3 +6,4 @@ metrics.tsv
plot.png plot.png
my_runs my_runs
mlruns mlruns
my_model

View File

@ -34,11 +34,11 @@ pipeline {
sh 'rm -rf my_model' sh 'rm -rf my_model'
sh 'chmod +x dlgssdpytorch.py' sh 'chmod +x dlgssdpytorch.py'
sh 'python3 ./dlgssdpytorch.py $PARAMETRY' sh 'python3 ./dlgssdpytorch.py $PARAMETRY'
//sh 'chmod +x train_mlflow.py' sh 'chmod +x train_mlflow.py'
//sh 'chmod +x generate_MLmodel.py' //sh 'chmod +x generate_MLmodel.py'
//sh 'python3 ./generate_MLmodel.py' //sh 'python3 ./generate_MLmodel.py'
//sh 'mlflow ./train_mlflow.py' //sh 'mlflow ./train_mlflow.py'
//sh 'mlflow run .' sh 'mlflow run .'
} }
} }
} }

View File

@ -20,13 +20,13 @@ class LayerLinearRegression(nn.Module):
# Now it only takes a call to the layer to make predictions # Now it only takes a call to the layer to make predictions
return self.linear(x) return self.linear(x)
parser = argparse.ArgumentParser(description='Program do uczenia modelu')
parser.add_argument('-l', '--lr', type=float, default=1e-3, help="Współczynik uczenia (lr)", required=False)
parser.add_argument('-e', '--epochs', type=int, default=100, help="Liczba epok", required=False)
args = parser.parse_args()
if __name__ == "__main__": if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Program do uczenia modelu')
parser.add_argument('-l', '--lr', type=float, default=1e-3, help="Współczynik uczenia (lr)", required=False)
parser.add_argument('-e', '--epochs', type=int, default=100, help="Liczba epok", required=False)
args = parser.parse_args()
lr = args.lr lr = args.lr
n_epochs = args.epochs n_epochs = args.epochs
mlflow.set_experiment("s426206") mlflow.set_experiment("s426206")