IUM_11
This commit is contained in:
parent
e5af4f2f39
commit
5786c55311
33
.github/workflows/train_and_evaluate.yml
vendored
Normal file
33
.github/workflows/train_and_evaluate.yml
vendored
Normal 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 }}
|
13
.idea/inspectionProfiles/Project_Default.xml
Normal file
13
.idea/inspectionProfiles/Project_Default.xml
Normal 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>
|
6
.idea/inspectionProfiles/profiles_settings.xml
Normal file
6
.idea/inspectionProfiles/profiles_settings.xml
Normal 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
8
.idea/ium_464906.iml
Normal 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
8
.idea/modules.xml
Normal 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
6
.idea/vcs.xml
Normal 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>
|
3
model.py
3
model.py
@ -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'))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user