Give the UC2 config load function a meaningful name

This commit is contained in:
Marek Wolan
2024-03-04 19:43:51 +00:00
parent 1e8dfa40cf
commit a222a8c58f
11 changed files with 21 additions and 21 deletions

View File

@@ -371,7 +371,7 @@
"outputs": [],
"source": [
"# Imports\n",
"from primaite.config.load import example_config_path\n",
"from primaite.config.load import data_manipulation_config_path\n",
"from primaite.session.environment import PrimaiteGymEnv\n",
"from primaite.game.game import PrimaiteGame\n",
"import yaml\n",
@@ -394,7 +394,7 @@
"outputs": [],
"source": [
"# create the env\n",
"with open(example_config_path(), 'r') as f:\n",
"with open(data_manipulation_config_path(), 'r') as f:\n",
" cfg = yaml.safe_load(f)\n",
" # set success probability to 1.0 to avoid rerunning cells.\n",
" cfg['simulation']['network']['nodes'][8]['applications'][0]['options']['data_manipulation_p_of_success'] = 1.0\n",

View File

@@ -16,7 +16,7 @@
"source": [
"from primaite.game.game import PrimaiteGame\n",
"import yaml\n",
"from primaite.config.load import example_config_path\n",
"from primaite.config.load import data_manipulation_config_path\n",
"\n",
"from primaite.session.environment import PrimaiteRayEnv\n",
"from ray.rllib.algorithms import ppo\n",
@@ -26,7 +26,7 @@
"\n",
"# If you get an error saying this config file doesn't exist, you may need to run `primaite setup` in your command line\n",
"# to copy the files to your user data path.\n",
"with open(example_config_path(), 'r') as f:\n",
"with open(data_manipulation_config_path(), 'r') as f:\n",
" cfg = yaml.safe_load(f)\n",
"\n",
"ray.init(local_mode=True)\n"

View File

@@ -17,7 +17,7 @@
"metadata": {},
"outputs": [],
"source": [
"from primaite.config.load import example_config_path"
"from primaite.config.load import data_manipulation_config_path"
]
},
{
@@ -26,7 +26,7 @@
"metadata": {},
"outputs": [],
"source": [
"with open(example_config_path(), 'r') as f:\n",
"with open(data_manipulation_config_path(), 'r') as f:\n",
" cfg = yaml.safe_load(f)\n"
]
},