generated from ai-systems/task_flow_ds_base
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from ai-systems/feat/from_splits
Feat/from splits
- Loading branch information
Showing
16 changed files
with
473 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
1 | ||
0 | ||
1 | ||
1 | ||
1 | ||
1 | ||
0 | ||
1 | ||
1 | ||
1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .probe_from_dataloaders import probe_from_dataloaders |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import click | ||
import prefect | ||
from dynaconf import settings | ||
from loguru import logger | ||
from prefect import Flow | ||
from prefect.engine.flow_runner import FlowRunner | ||
from probe_ably.core.tasks.probing import TrainProbingTask | ||
from probe_ably.core.tasks.metric_task import ProcessMetricTask | ||
|
||
INPUT_FILE = "./tests/sample_files/test_input/multi_task_multi_model_with_control.json" | ||
train_probing_task = TrainProbingTask() | ||
process_metric_task = ProcessMetricTask() | ||
|
||
def probe_from_dataloaders(config_dict, prepared_data): | ||
with Flow("Running Probe") as flow1: | ||
train_results = train_probing_task(prepared_data, config_dict["probing_setup"]) | ||
processed_results = process_metric_task( | ||
train_results, config_dict["probing_setup"] | ||
) | ||
FlowRunner(flow=flow1).run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
from .abstract_model import AbstractModel | ||
from .linear import LinearModel | ||
from .mlp import MLPModel | ||
from .mlp import MLPModel | ||
from .model_params import ModelParams |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
from typing import Dict | ||
|
||
class ModelParams(): | ||
def __init__(self)->Dict: | ||
self.default_params = { | ||
"probe_ably.core.models.linear.LinearModel": { | ||
"params": [ | ||
{ | ||
"name": "dropout", | ||
"type": "float_range", | ||
"options": [0.0, 0.51] | ||
}, | ||
{ | ||
"name": "alpha", | ||
"type": "function", | ||
"function_location": "probe_ably.core.utils.param_functions.nuclear_norm_alpha_generation", | ||
"options": [-10.0, 3] | ||
}] | ||
}, | ||
"probe_ably.core.models.mlp.MLPModel": { | ||
"params": [ | ||
{ | ||
"name": "hidden_size", | ||
"type": "function", | ||
"step": 0.01, | ||
"function_location": "probe_ably.core.utils.param_functions.hidden_size_generation", | ||
"options": [ | ||
2, | ||
5 | ||
] | ||
}, | ||
{ | ||
"name": "n_layers", | ||
"type": "int_range", | ||
"options": [ | ||
1, | ||
2 | ||
] | ||
}, | ||
{ | ||
"name": "dropout", | ||
"type": "float_range", | ||
"options": [ | ||
0.0, | ||
0.5 | ||
] | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.