#2442: Fix config file path to be OS independent.
This commit is contained in:
@@ -21,24 +21,14 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Import packages and read config file."
|
||||
"Set up training data."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Set up training data."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import multiprocessing as mp\n",
|
||||
"mp.get_all_start_methods()"
|
||||
"Import packages and read config file."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -61,12 +51,17 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"\n",
|
||||
"EPISODE_LEN = 128\n",
|
||||
"NUM_EPISODES = 10\n",
|
||||
"NO_STEPS = EPISODE_LEN * NUM_EPISODES\n",
|
||||
"BATCH_SIZE = 32\n",
|
||||
"LEARNING_RATE = 3e-4\n"
|
||||
"from primaite.config.load import data_manipulation_config_path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"with open(data_manipulation_config_path(), 'r') as f:\n",
|
||||
" cfg = yaml.safe_load(f)"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -76,8 +71,11 @@
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"\n",
|
||||
"with open(\"c:/projects/primaite/src/primaite/config/_package_data/data_manipulation.yaml\", \"r\") as f:\n",
|
||||
" cfg = yaml.safe_load(f)\n"
|
||||
"EPISODE_LEN = 128\n",
|
||||
"NUM_EPISODES = 10\n",
|
||||
"NO_STEPS = EPISODE_LEN * NUM_EPISODES\n",
|
||||
"BATCH_SIZE = 32\n",
|
||||
"LEARNING_RATE = 3e-4\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -116,11 +114,8 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"\n",
|
||||
"\n",
|
||||
"n_procs = 4\n",
|
||||
"train_env = SubprocVecEnv([make_env(i + n_procs) for i in range(n_procs)])\n",
|
||||
"print(train_env)\n"
|
||||
"n_procs = 2\n",
|
||||
"train_env = SubprocVecEnv([make_env(i + n_procs) for i in range(n_procs)])\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -140,7 +135,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.10.11"
|
||||
"version": "3.10.12"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
||||
Reference in New Issue
Block a user