Skip to content

Commit

Permalink
suggestions from review
Browse files Browse the repository at this point in the history
  • Loading branch information
ravinkohli committed Aug 12, 2022
1 parent a7934b8 commit b3d969c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 3 additions & 0 deletions autoPyTorch/constants.py
Expand Up @@ -78,3 +78,6 @@

# To avoid that we get a sequence that is too long to be fed to a network
MAX_WINDOW_SIZE_BASE = 500

# AutoPyTorch optionally allows network inference or metrics calculation for the following datasets
OPTIONAL_INFERENCE_CHOICES = ('test',)
6 changes: 2 additions & 4 deletions autoPyTorch/utils/results_manager.py
Expand Up @@ -12,6 +12,7 @@
from smac.tae import StatusType
from smac.utils.io.traj_logging import TrajEntry

from autoPyTorch.constants import OPTIONAL_INFERENCE_CHOICES
from autoPyTorch.pipeline.components.training.metrics.base import autoPyTorchMetric


Expand All @@ -28,9 +29,6 @@
]


OPTIONAL_INFERENCE_CHOICES = ('test',)


def cost2metric(cost: float, metric: autoPyTorchMetric) -> float:
"""
Revert cost metric evaluated in SMAC to the original metric.
Expand Down Expand Up @@ -434,7 +432,7 @@ def _check_null_in_optional_inference_choices(
self
) -> None:
"""
Checks if the data is missing for each optional inference choice and
Checks if the data is missing or if all the runs failed for each optional inference choice and
sets the scores for that inference choice to all None.
"""
for inference_choice in OPTIONAL_INFERENCE_CHOICES:
Expand Down
3 changes: 2 additions & 1 deletion autoPyTorch/utils/results_visualizer.py
Expand Up @@ -6,7 +6,8 @@

import numpy as np

from autoPyTorch.utils.results_manager import MetricResults, OPTIONAL_INFERENCE_CHOICES
from autoPyTorch.constants import OPTIONAL_INFERENCE_CHOICES
from autoPyTorch.utils.results_manager import MetricResults


plt.rcParams["font.family"] = "Times New Roman"
Expand Down

0 comments on commit b3d969c

Please sign in to comment.