Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tabrepo/contexts/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,12 +573,12 @@ def construct_context(
BenchmarkContext object that is able to load the data.
"""
if local_prefix_is_relative:
path_context = str(Paths.results_root / local_prefix) + os.sep
path_context = str(Paths.results_root_cache / local_prefix) + os.sep
else:
path_context = str(Path(local_prefix)) + os.sep

if local_prefix_is_relative:
data_root = Paths.data_root
data_root = Paths.data_root_cache
else:
data_root = Path(path_context).parent

Expand Down
9 changes: 2 additions & 7 deletions tabrepo/loaders/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@
class Paths:
project_root: Path = Path(__file__).parent.parent.parent
data_root: Path = project_root / 'data'
results_root: Path = data_root / 'results'
all_v3_results_root: Path = results_root / "all_v3"
bagged_results_root: Path = results_root / "bagged"
bagged_208_results_root: Path = results_root / "bagged_208"
bagged_289_results_root: Path = results_root / "bagged_289"
bagged_2023_07_25_results_root: Path = results_root / "2023_07_25"
automl_289_results_root: Path = results_root / "automl_289"
data_root_cache: Path = Path.home() / ".cache" / "tabrepo" / "data"
results_root_cache: Path = data_root_cache / "results"

@staticmethod
def abs_to_rel(path: str, relative_to: Path = project_root) -> str:
Expand Down
4 changes: 2 additions & 2 deletions tabrepo/repository/evaluation_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ def _construct_config_scorer(self,
raise ValueError(f'Invalid config_scorer_type: {config_scorer_type}')

@classmethod
def from_context(cls, version: str = None, cache: bool = False, prediction_format: str = "memmap") -> Self:
return load_repository(version=version, cache=cache, prediction_format=prediction_format)
def from_context(cls, version: str = None, cache: bool = False, load_predictions: bool = True, prediction_format: str = "memmap", use_s3: bool = True) -> Self:
return load_repository(version=version, cache=cache, load_predictions=load_predictions, prediction_format=prediction_format, use_s3=use_s3)

# TODO: 1. Cleanup results_lst_simulation_artifacts, 2. Make context work with tasks instead of datasets x folds
# TODO: Get raw data from repo method (X, y)
Expand Down
7 changes: 4 additions & 3 deletions tabrepo/utils/result_utils.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from pathlib import Path
import tabrepo
from autogluon.common.loaders import load_pd
from autogluon.common.savers import save_pd
from tabrepo.loaders import Paths

def results_path():
res = Path(tabrepo.__path__[0]).parent / "data/results/"

def results_path() -> Path:
res = Paths.results_root_cache
if not res.exists():
res.mkdir(parents=True, exist_ok=True)
return res
Expand Down