|
6 | 6 | import json |
7 | 7 | import logging |
8 | 8 | from pathlib import Path |
9 | | -from typing import Union, Optional |
| 9 | +from typing import Optional, Union |
| 10 | + |
10 | 11 | from pygments import highlight |
11 | 12 | from pygments.formatters import HtmlFormatter |
12 | 13 | from pygments.lexers import PythonLexer |
|
27 | 28 | ) |
28 | 29 | from .seed import ( |
29 | 30 | DatastoreSeedDatasetReference, |
| 31 | + IndexRange, |
30 | 32 | LocalSeedDatasetReference, |
| 33 | + PartitionBlock, |
31 | 34 | SamplingStrategy, |
32 | 35 | SeedConfig, |
33 | 36 | SeedDatasetReference, |
34 | | - IndexRange, |
35 | | - PartitionBlock, |
36 | 37 | ) |
37 | 38 | from .utils.constants import DEFAULT_REPR_HTML_STYLE, REPR_HTML_TEMPLATE |
38 | 39 | from .utils.info import DataDesignerInfo |
@@ -115,7 +116,11 @@ def from_config(cls, config: dict | str | Path | BuilderConfig) -> Self: |
115 | 116 | datastore_settings=builder_config.datastore_settings, |
116 | 117 | ) |
117 | 118 | builder.set_seed_datastore_settings(builder_config.datastore_settings) |
118 | | - builder.with_seed_dataset(seed_dataset_reference, sampling_strategy=config.seed_config.sampling_strategy, selection_strategy=config.seed_config.selection_strategy) |
| 119 | + builder.with_seed_dataset( |
| 120 | + seed_dataset_reference, |
| 121 | + sampling_strategy=config.seed_config.sampling_strategy, |
| 122 | + selection_strategy=config.seed_config.selection_strategy, |
| 123 | + ) |
119 | 124 |
|
120 | 125 | return builder |
121 | 126 |
|
@@ -511,7 +516,11 @@ def with_seed_dataset( |
511 | 516 | Returns: |
512 | 517 | The current Data Designer config builder instance. |
513 | 518 | """ |
514 | | - self._seed_config = SeedConfig(dataset=dataset_reference.dataset, sampling_strategy=sampling_strategy, selection_strategy=selection_strategy) |
| 519 | + self._seed_config = SeedConfig( |
| 520 | + dataset=dataset_reference.dataset, |
| 521 | + sampling_strategy=sampling_strategy, |
| 522 | + selection_strategy=selection_strategy, |
| 523 | + ) |
515 | 524 | self.set_seed_datastore_settings( |
516 | 525 | dataset_reference.datastore_settings if hasattr(dataset_reference, "datastore_settings") else None |
517 | 526 | ) |
|
0 commit comments