Skip to content

Commit

Permalink
[webdata] stats df
Browse files Browse the repository at this point in the history
  • Loading branch information
kngwyu committed Jul 2, 2024
1 parent 823c1d8 commit 1b727fa
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions scripts/make_web_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,14 @@ def main(
write_dir: Optional[Path] = None,
length: int = 100,
) -> None:
stats_df, ldf = _make_stats_df(profile_and_rewards_path)
log_path = profile_and_rewards_path.parent.expanduser()
if write_dir is None:
write_dir = Path("saved-web-data")

stats_df, ldf = _make_stats_df(profile_and_rewards_path)
stats_df.write_parquet(write_dir / "stats.parqut", compression="snappy")

log_path = profile_and_rewards_path.parent.expanduser()

for point in starting_points:
index = point // 1024000
ldfi = ldf.filter(
Expand All @@ -125,10 +128,12 @@ def main(
index * 1024000,
)
cxy_df.write_parquet(
write_dir / f"saved_cpos-{point}.parqut", compression="snappy"
write_dir / f"saved_cpos-{point}.parqut",
compression="snappy",
)
sxy_df.write_parquet(
write_dir / f"saved_spos-{point}.parqut", compression="snappy"
write_dir / f"saved_spos-{point}.parqut",
compression="snappy",
)


Expand Down

0 comments on commit 1b727fa

Please sign in to comment.