Skip to content

Commit

Permalink
fix(datasets) Fix sorting in __all__ (#3655)
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-narozniak authored Jun 20, 2024
1 parent 0a16d99 commit 1b72baf
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 13 deletions.
5 changes: 3 additions & 2 deletions datasets/flwr_datasets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@

__all__ = [
"FederatedDataset",
"partitioner",
"metrics",
"visualization",
"partitioner",
"preprocessor",
"utils",
"visualization",
]


__version__ = _package_version
12 changes: 6 additions & 6 deletions datasets/flwr_datasets/partitioner/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
from .square_partitioner import SquarePartitioner

__all__ = [
"DirichletPartitioner",
"ExponentialPartitioner",
"IidPartitioner",
"Partitioner",
"InnerDirichletPartitioner",
"LinearPartitioner",
"NaturalIdPartitioner",
"DirichletPartitioner",
"Partitioner",
"ShardPartitioner",
"SizePartitioner",
"LinearPartitioner",
"InnerDirichletPartitioner",
"SquarePartitioner",
"ShardPartitioner",
"ExponentialPartitioner",
]
2 changes: 1 addition & 1 deletion datasets/flwr_datasets/preprocessor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from .preprocessor import Preprocessor

__all__ = [
"Divider",
"Merger",
"Preprocessor",
"Divider",
]
2 changes: 1 addition & 1 deletion datasets/flwr_datasets/visualization/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
from .label_distribution import plot_label_distributions

__all__ = [
"plot_label_distributions",
"plot_comparison_label_distribution",
"plot_label_distributions",
]
1 change: 0 additions & 1 deletion datasets/flwr_datasets/visualization/bar_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ def _plot_bar(
plot_kwargs: Optional[Dict[str, Any]],
legend_kwargs: Optional[Dict[str, Any]],
) -> Axes:

if axis is None:
if figsize is None:
figsize = _initialize_figsize(
Expand Down
2 changes: 0 additions & 2 deletions datasets/flwr_datasets/visualization/heatmap_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ def _plot_heatmap(
plot_kwargs: Optional[Dict[str, Any]],
legend_kwargs: Optional[Dict[str, Any]],
) -> Axes:

if axis is None:
if figsize is None:
figsize = _initialize_figsize(
Expand Down Expand Up @@ -92,7 +91,6 @@ def _initialize_figsize(
num_partitions: int,
num_labels: int,
) -> Tuple[float, float]:

figsize = (0.0, 0.0)
if partition_id_axis == "x":
figsize = (3 * np.sqrt(num_partitions), np.sqrt(num_labels))
Expand Down

0 comments on commit 1b72baf

Please sign in to comment.