Skip to content

Commit

Permalink
Merge pull request #226 from InnopolisUni/stratify
Browse files Browse the repository at this point in the history
Stratify
  • Loading branch information
BarzaH authored Aug 14, 2024
2 parents 8fc36fa + 96002bc commit 3000124
Show file tree
Hide file tree
Showing 4,210 changed files with 41,814 additions and 62 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 2 additions & 0 deletions config/datasets/classification/classification_mnist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ test:
infer:
source: https://api.blackhole.ai.innopolis.university/public-datasets/mnist/infer.zip
target: ./data/mnist/infer

stratify: True
Empty file.
17 changes: 17 additions & 0 deletions config/experiments/empty_template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# @package _global_
defaults:
- override /models:
- override /datasets:
- override /optimizers:
- override /augmentations_train:
- override /augmentations_val:
- override /augmentations_test:
- override /losses:

project:
task:
random_seed:
stop_param:
epochs:
weights_freq:
batch_size:
20 changes: 20 additions & 0 deletions config/experiments/example_image_classification_resnet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# @package _global_
defaults:
- override /models: classification/resnet.yaml
- override /datasets: classification/classification_mnist.yaml
- override /augmentations_train: none #classification.yaml
- override /augmentations_val: none
- override /augmentations_test: none
- override /losses: log_loss.yaml
- override /optimizers: adam
- override /schedulers:

project: "mnist_classification"
task: "image-classification"
random_seed: 42
batch_size: 128
epochs: 5
accelerator: "gpu"
devices: 2
num_workers: 1
weights_freq: 7
10 changes: 10 additions & 0 deletions config/experiments/example_image_detection_yolo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# @package _global_
batch_size: 2
defaults:
- override /models: detection/yolov5
- override /datasets: detection/detection_rotten_fruits
epochs: 3
project: rotten_fruits
random_seed: 43
task: image-detection
weights_freq: 1
17 changes: 17 additions & 0 deletions config/experiments/example_image_segmentation_unet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# @package _global_
defaults:
- override /models: semantic-segmentation/unet
- override /datasets: semantic-segmentation/segmentation_brain.yaml
- override /augmentations_train: none #segmentation_stroke.yaml
- override /augmentations_val: none
- override /augmentations_test: none
- override /losses: segmentation_losses.yaml
models:
in_channels: 1
project: "segmentation"
task: "image-segmentation-complexing"
random_seed: 42
stop_param: 10
epochs: 300
weights_freq: 1
batch_size: 10
8 changes: 8 additions & 0 deletions config/experiments/example_table_classification_sklearn.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# @package _global_
defaults:
- override /models: classification/lung_description_decision.yaml
- override /datasets: classification/lung_description_decision_datamodule.yaml
- override /callbacks: lung_description_decision

project: "lung_description_decision"
task: "table-classification"
10 changes: 10 additions & 0 deletions config/experiments/example_table_clustering_kmeans.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# @package _global_
defaults:
- override /models: clustering/kmeans
- override /datasets: clustering/clustering_credit_cards
- override /callbacks: clustering


project: "credit_cards"
task: "table-clustering"
random_seed: 42
10 changes: 10 additions & 0 deletions config/experiments/example_table_regression_catboost.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# @package _global_
defaults:
- override /models: regression/catboost_regression
- override /datasets: qm9
- override /callbacks: regression


project: "qm9"
task: "qsar-regression"
random_seed: 42
37 changes: 16 additions & 21 deletions dui/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,28 @@
from dash.long_callback import DiskcacheLongCallbackManager
import diskcache

cache = diskcache.Cache("./cache")
long_callback_manager = DiskcacheLongCallbackManager(cache)

app = dash.Dash(__name__,
long_callback_manager=long_callback_manager,
use_pages=True,
external_stylesheets=[dbc.themes.BOOTSTRAP, dbc.icons.BOOTSTRAP, "dui.css"],
external_scripts=["dui.js",
"https://code.jquery.com/jquery-3.3.1.slim.min.js",
"https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js",
"https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"]) # initialising dash app
dash.register_page(__name__, path_template="/")


def layout():
lout = dbc.Container([

lout = dbc.Container([
dbc.Row([dbc.Col([html.H4("Experiment Configurator", style={"height": 40})]),
dbc.Col([html.Div(html.Img(src=dash.get_asset_url('_innofw_.svg'), style={"height": 40, "width": 60}),
className="self-align-right")]),
html.Span(className="border-bottom")],

style={"margin-top": 10, "margin-bottom": 10, "margin-right": 5}),

dash.page_container])
return lout


if __name__ == '__main__':
cache = diskcache.Cache("./cache")
long_callback_manager = DiskcacheLongCallbackManager(cache)

app = dash.Dash(__name__,
long_callback_manager=long_callback_manager,
use_pages=True,
external_stylesheets=["bootstrap.min.css",
("icons/", "font/bootstrap-icons.css"),
"dui.css",],
external_scripts=["jquery-3.3.1.slim.min.js",
"popper.min.js",
"bootstrap.min.js",
"dui.js"]) # initialising dash app

dash.register_page("inintial", path_template="/", layout=lout)
app.run_server()
7 changes: 7 additions & 0 deletions dui/assets/bootstrap.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dui/assets/bootstrap.min.css.map

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions dui/assets/bootstrap.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dui/assets/bootstrap.min.js.map

Large diffs are not rendered by default.

52 changes: 52 additions & 0 deletions dui/assets/dui.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.row{
width: 100%;
}

.self-align-right{
justify-content: right;
display: grid;
Expand Down Expand Up @@ -38,3 +42,51 @@
border: 1px solid #888;
width: 70%; /* Could be more or less, depending on screen size */
}

/* Tooltip container */
.tooltip {
position: relative;
display: inline-block;
opacity: 1;
z-index: 0;
}

/* Tooltip text */
.tooltiptext {
visibility: hidden;
width: 180px;
background-color: #555;
color: #fff;
text-align: center;
padding: 5px 0;
border-radius: 6px;

/* Position the tooltip text */
position: absolute;
z-index: 1;
bottom: 125%;
left: 50%;
margin-left: -60px;

/* Fade in tooltip */
opacity: 0;
transition: opacity 0.3s;
}

/* Tooltip arrow */
.tooltip .tooltiptext::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: #555 transparent transparent transparent;
}

/* Show the tooltip text when you mouse over the tooltip container */
.tooltip:hover .tooltiptext {
visibility: visible;
opacity: 1;
}
Loading

0 comments on commit 3000124

Please sign in to comment.