Skip to content

Commit

Permalink
update preprocess
Browse files Browse the repository at this point in the history
  • Loading branch information
Sino-Huang committed Dec 18, 2023
1 parent 911b163 commit 53ee56f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions preprocessing/notebook/stratz_api_calling.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
from tqdm.auto import tqdm
from datetime import datetime
import subprocess
from dota_banpick import utils
import shutil

# %%
url = "https://api.stratz.com/graphql"
Expand Down Expand Up @@ -437,6 +439,18 @@ def parse_graphql_output(output_dict, id_to_name_dict):
with open("../../dota_banpick/data/records/hero_lanewin_with_dict.pkl", 'wb') as f:
pickle.dump(hero_lanewin_with_dict, f, protocol=pickle.HIGHEST_PROTOCOL)

# %% [markdown]
# ## Warmup Cache Dict

# %%
utils.generate_warmup_cache(depth_limit= 1)

# %%
# save to preprocess
src_warmup_dict_fp = "../../dota_banpick/data/records/depth_limit_1_warmup_cache_dict.pkl"
dst_warmup_dict_fp = "../records/depth_limit_1_warmup_cache_dict.pkl"
shutil.copyfile(src_warmup_dict_fp, dst_warmup_dict_fp)

# %%
# run the server
subprocess.run(['bash', '/home/sukai/opt/run_banpick_website.sh'])
Expand Down

0 comments on commit 53ee56f

Please sign in to comment.