This commit is contained in:
zgolebiewska 2024-06-09 22:02:57 +02:00
parent e5af4f2f39
commit 5786c55311
7 changed files with 76 additions and 1 deletions

View File

@ -0,0 +1,33 @@
name: Train and Evaluate Model
on:
workflow_dispatch:
inputs:
epochs:
description: 'Number of epochs'
required: true
default: 100
jobs:
train_and_evaluate:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pandas scikit-learn tensorflow sacred pymongo
- name: Train and evaluate model
run: |
python model.py with epochs=${{ github.event.inputs.epochs }}
env:
MONGO_URL: ${{ secrets.MONGO_URL }}

View File

@ -0,0 +1,13 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="PyUnresolvedReferencesInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredIdentifiers">
<list>
<option value="app.obj_list" />
<option value="image_slicer" />
</list>
</option>
</inspection_tool>
</profile>
</component>

View File

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

8
.idea/ium_464906.iml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

8
.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/ium_464906.iml" filepath="$PROJECT_DIR$/.idea/ium_464906.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@ -5,10 +5,11 @@ import pandas as pd
from sklearn.preprocessing import LabelEncoder, StandardScaler from sklearn.preprocessing import LabelEncoder, StandardScaler
from sklearn.model_selection import train_test_split from sklearn.model_selection import train_test_split
import json import json
import os
ex = Experiment("s464906_experiment") ex = Experiment("s464906_experiment")
mongo_url = "mongodb://admin:IUM_2021@tzietkiewicz.vm.wmi.amu.edu.pl:27017" mongo_url = os.getenv("MONGO_URL", "mongodb://admin:IUM_2021@tzietkiewicz.vm.wmi.amu.edu.pl:27017")
ex.observers.append(MongoObserver(url=mongo_url, db_name='sacred')) ex.observers.append(MongoObserver(url=mongo_url, db_name='sacred'))
ex.observers.append(FileStorageObserver('logs')) ex.observers.append(FileStorageObserver('logs'))