minor fixes and changes

This commit is contained in:
Joseph Hopfmüller
2024-11-29 15:49:10 +01:00
parent b156b9ceaf
commit ff32aefd52
3 changed files with 22 additions and 19 deletions

View File

@@ -19,7 +19,7 @@ import time
from matplotlib import pyplot as plt # noqa: F401
import numpy as np
import path_fix
import add_pypho # noqa: F401
import pypho
default_config = f"""
@@ -497,18 +497,18 @@ def plot_eye_diagram(
if __name__ == "__main__":
path_fix.show_log()
add_pypho.show_log()
config = get_config()
length_ranges = [1000, 10000]
length_scales = [1, 2, 3, 4, 5, 6, 7, 8, 9]
# length_ranges = [1000, 10000]
# length_scales = [1, 2, 3, 4, 5, 6, 7, 8, 9]
lengths = [
length_scale * length_range
for length_range in length_ranges
for length_scale in length_scales
]
lengths.append(max(length_ranges)*10)
# lengths = [
# length_scale * length_range
# for length_range in length_ranges
# for length_scale in length_scales
# ]
# lengths.append(max(length_ranges)*10)
# length_loop(config, lengths)

View File

@@ -39,7 +39,7 @@ class PytorchSettings:
summary_dir: str = ".runs"
write_every: int = 10
head_symbols: int = 40
eye_symbols: int = 1000
eye_symbols: int = 400
# model settings
@@ -48,8 +48,11 @@ class ModelSettings:
output_dim: int = 2
n_hidden_layers: tuple | int = 3
n_hidden_nodes: tuple | int = 8
model_activation_func: tuple = "ModReLU"
model_activation_func: tuple | str = "ModReLU"
overrides: dict = field(default_factory=dict)
dropout_prob: float | None = None
model_layer_function: str | None = None
model_layer_parametrizations: list= field(default_factory=list)
@dataclass

View File

@@ -20,7 +20,7 @@ def _optional_suggest(
type: str,
log: bool = False,
step: int | float | None = None,
add_user: bool = False,
add_user: bool = True,
force: bool = False,
multiply: float | int = 1,
set_new: bool = True,
@@ -96,7 +96,7 @@ def suggest_categorical_optional(
trial: trial.Trial,
name: str,
choices_or_value: tuple[Any] | list[Any] | Any,
add_user: bool = False,
add_user: bool = True,
force: bool = False,
set_new: bool = True,
):
@@ -129,7 +129,7 @@ def suggest_int_optional(
range_or_value: tuple[int] | list[int] | int,
step: int = 1,
log: bool = False,
add_user: bool = False,
add_user: bool = True,
force: bool = False,
multiply: int = 1,
set_new: bool = True,
@@ -174,7 +174,7 @@ def suggest_float_optional(
range_or_value: tuple[float] | list[float] | float,
step: float | None = None,
log: bool = False,
add_user: bool = False,
add_user: bool = True,
force: bool = False,
multiply: float = 1,
set_new: bool = True,
@@ -222,7 +222,7 @@ def suggest_categorical_optional_wrapper(
self: trial.Trial,
name: str,
choices_or_value: tuple[Any] | list[Any] | Any,
add_user: bool = False,
add_user: bool = True,
force: bool = False,
set_new: bool = True,
):
@@ -253,7 +253,7 @@ def suggest_int_optional_wrapper(
range_or_value: tuple[int] | list[int] | int,
step: int = 1,
log: bool = False,
add_user: bool = False,
add_user: bool = True,
force: bool = False,
multiply: int = 1,
set_new: bool = True,
@@ -295,7 +295,7 @@ def suggest_float_optional_wrapper(
range_or_value: tuple[float] | list[float] | float,
step: float | None = None,
log: bool = False,
add_user: bool = False,
add_user: bool = True,
force: bool = False,
multiply: float = 1,
set_new: bool = True,