Skip to content

Commit

Permalink
Scan instead of load
Browse files Browse the repository at this point in the history
  • Loading branch information
yngve-sk committed Dec 5, 2024
1 parent a26e843 commit dd87b9c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/ert/storage/migration/to9.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,15 @@ def _migrate_response_configs_wrt_finalized_keys(path: Path) -> None:

for real_dir in real_dirs:
if (real_dir / f"{response_type}.parquet").exists():
df = polars.read_parquet(
df = polars.scan_parquet(
real_dir / f"{response_type}.parquet"
)
response_keys = df["response_key"].unique().to_list()
response_keys = (
df.select("response_key")

Check failure on line 39 in src/ert/storage/migration/to9.py

View workflow job for this annotation

GitHub Actions / type-checking (3.12)

"DataFrame" has no attribute "to_list"
.unique()
.collect()
.to_list()
)
config["has_finalized_keys"] = True
config["keys"] = sorted(response_keys)
break
Expand Down

0 comments on commit dd87b9c

Please sign in to comment.