Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 2 additions & 1 deletion skyllh/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import copy
import os.path
import sys
from pathlib import Path
from typing import (
Any,
)
Expand Down Expand Up @@ -51,7 +52,7 @@
},
'repository': {
# A base path of repository datasets.
'base_path': None,
'base_path': Path('~/.cache/skyllh').expanduser(),
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_BASECONFIG['repository']['base_path'] is now a Path object. Most of the codebase (and the surrounding docstrings/type hints) treat config values as plain serializable primitives (here: str | None). Keeping a Path in the config can surprise callers (e.g., string concatenation, YAML/JSON serialization) and diverges from the documented str type. Consider storing this as a string (e.g., expand ~ to a str) and only converting to Path at the call site when needed.

Suggested change
'base_path': Path('~/.cache/skyllh').expanduser(),
'base_path': str(Path('~/.cache/skyllh').expanduser()),

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

'download_from_origin': True,
},
'units': {
Expand Down
4 changes: 2 additions & 2 deletions skyllh/core/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -802,8 +802,8 @@ def __init__(
base_path : str | None
The user-defined base path of the data set.
Usually, this is the path of the location of the data directory.
If set to ``None`` the configured repository base path
``Config['repository']['base_path']`` is used.
If set to ``None``, ``cfg['repository']['base_path']`` is used,
which defaults to ``~/.cache/skyllh``.
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The base_path parameter docstring now refers to cfg['repository']['base_path'], but cfg is not a documented parameter of Dataset.__init__ (it’s only passed implicitly via **kwargs to HasConfig). This makes the docstring harder to follow and introduces an undefined name in the parameter docs. Consider rephrasing to reference the dataset’s config (self.cfg['repository']['base_path']) or the Config setting in general, without relying on an undocumented cfg symbol.

Suggested change
If set to ``None``, ``cfg['repository']['base_path']`` is used,
which defaults to ``~/.cache/skyllh``.
If set to ``None``, the dataset configuration's repository base
path setting is used, which defaults to ``~/.cache/skyllh``.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

sub_path_fmt : str | None
The user-defined format of the sub path of the data set.
If set to ``None``, the ``default_sub_path_fmt`` will be used.
Expand Down
3 changes: 2 additions & 1 deletion skyllh/datasets/i3/PublicData_10y_ps.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ def create_dataset_collection(
base_path : str | None
The base path of the data files. The actual path of a data file is
assumed to be of the structure <base_path>/<sub_path>/<file_name>.
If None, use the default path ``cfg['repository']['base_path']``.
If ``None``, ``cfg['repository']['base_path']`` is used, which
defaults to ``~/.cache/skyllh``.
sub_path_fmt : str | None
The sub path format of the data files of the public data sample.
If None, use the default sub path format
Expand Down
3 changes: 2 additions & 1 deletion skyllh/datasets/i3/PublicData_10y_ps_wMC.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ def create_dataset_collection(
base_path : str | None
The base path of the data files. The actual path of a data file is
assumed to be of the structure <base_path>/<sub_path>/<file_name>.
If None, use the default path ``cfg['repository']['base_path']``.
If ``None``, ``cfg['repository']['base_path']`` is used, which
defaults to ``~/.cache/skyllh``.
sub_path_fmt : str | None
The sub path format of the data files of the public data sample.
If None, use the default sub path format
Expand Down
3 changes: 2 additions & 1 deletion skyllh/datasets/i3/PublicData_14y_ps.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ def create_dataset_collection(
base_path : str | None
The base path of the data files. The actual path of a data file is
assumed to be of the structure <base_path>/<sub_path>/<file_name>.
If None, use the default path ``cfg['repository']['base_path']``.
If ``None``, ``cfg['repository']['base_path']`` is used, which
defaults to ``~/.cache/skyllh``.
sub_path_fmt : str | None
The sub path format of the data files of the public data sample.
If None, use the default sub path format
Expand Down
3 changes: 2 additions & 1 deletion skyllh/datasets/i3/TestData.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ def create_dataset_collection(
base_path : str | None
The base path of the data files. The actual path of a data file is
assumed to be of the structure <base_path>/<sub_path>/<file_name>.
If None, use the default path ``cfg['repository']['base_path']``.
If ``None``, ``cfg['repository']['base_path']`` is used, which
defaults to ``~/.cache/skyllh``.
sub_path_fmt : str | None
The sub path format of the data files of the public data sample.
If None, use the default sub path format
Expand Down