Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Neural MMO
neural-mmo-starter-kit
Commits
77b348b7
Commit
77b348b7
authored
Jul 01, 2021
by
Siddhartha Laghuvarapu
Browse files
Bug fixed
parent
cda66167
Changes
11
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
77b348b7
...
...
@@ -130,4 +130,4 @@ dmypy.json
#NeuralMMO repository
neuralmmo/resource/maps
resource
Dockerfile
View file @
77b348b7
...
...
@@ -3,7 +3,7 @@
# FROM aicrowd/base-images:neural-mmo-py38-torch-190
# FROM aicrowd/base-images:neural-mmo-py38-torch-180
FROM
aicrowd/base-images:neural-mmo-py38-torch-171
#
FROM aicrowd/base-images:neural-mmo-py38-torch-171
# FROM aicrowd/base-images:neural-mmo-py38
USER
root
...
...
neuralmmo/
baselines/evaluations/CompetitionRound1.npy
→
baselines/evaluations/CompetitionRound1.npy
View file @
77b348b7
File moved
neuralmmo/
baselines/models/CompetitionRound1/.is_checkpoint
→
baselines/models/CompetitionRound1/.is_checkpoint
View file @
77b348b7
File moved
baselines/models/CompetitionRound1/checkpoint
0 → 100644
View file @
77b348b7
File added
neuralmmo/
baselines/models/CompetitionRound1/checkpoint.tune_metadata
→
baselines/models/CompetitionRound1/checkpoint.tune_metadata
View file @
77b348b7
File moved
neuralmmo/
baselines/models/CompetitionRound1/training.npy
→
baselines/models/CompetitionRound1/training.npy
View file @
77b348b7
File moved
config.py
View file @
77b348b7
from
agents
import
BaselineCombatAgent
,
BaselineForageAgent
,
RandomNeuralMMOAgent
,
BaselineRandomAgent
from
agents
import
BaselineCombatAgent
,
BaselineForageAgent
,
RandomNeuralMMOAgent
,
BaselineRandomAgent
,
NeuralBaselineAgent
class
LocalEvaluationConfig
:
...
...
neuralmmo/Forge.py
View file @
77b348b7
...
...
@@ -38,7 +38,10 @@ def createPolicies(config, mapPolicy):
def
loadTrainer
(
config
):
'''Create monolithic RLlib trainer object'''
torch
.
set_num_threads
(
1
)
ray
.
init
(
local_mode
=
config
.
LOCAL_MODE
)
ray
.
init
(
local_mode
=
config
.
LOCAL_MODE
,
memory
=
2000
*
1024
*
1024
,
object_store_memory
=
200
*
1024
*
1024
,
)
#Register custom env
ray
.
tune
.
registry
.
register_env
(
"Neural_MMO"
,
...
...
@@ -88,12 +91,22 @@ def loadEvaluator(config):
def
loadModel
(
config
):
'''Load NN weights and optimizer state'''
imports
()
trainer
=
loadTrainer
(
config
)
utils
.
modelSize
(
trainer
.
defaultModel
())
if
config
.
LOAD
:
trainer
.
restore
()
return
trainer
def
imports
():
'''conditional rl imports'''
global
torch
,
ray
,
rllib
,
wrapper
,
utils
from
neural_mmo.forge.ethyr.torch
import
utils
import
torch
import
ray
from
ray
import
rllib
from
projekt
import
rllib_wrapper
as
wrapper
class
Anvil
():
'''Neural MMO CLI powered by Google Fire
...
...
@@ -120,32 +133,24 @@ class Anvil():
config
.
override
(
**
kwargs
)
self
.
config
=
config
def
imports
(
self
):
'''conditional rl imports'''
global
torch
,
ray
,
rllib
,
wrapper
,
utils
from
neural_mmo.forge.ethyr.torch
import
utils
import
torch
import
ray
from
ray
import
rllib
from
projekt
import
rllib_wrapper
as
wrapper
def
train
(
self
,
**
kwargs
):
'''Train a model starting with the current value of --MODEL'''
self
.
imports
()
imports
()
loadModel
(
self
.
config
).
train
()
def
evaluate
(
self
,
**
kwargs
):
'''Evaluate a model on --EVAL_MAPS maps'''
self
.
config
.
EVALUATE
=
True
if
not
self
.
config
.
SCRIPTED
:
self
.
imports
()
imports
()
loadEvaluator
(
self
.
config
).
evaluate
(
self
.
config
.
GENERALIZE
)
def
render
(
self
,
**
kwargs
):
'''Start a WebSocket server that autoconnects to the 3D Unity client'''
self
.
config
.
RENDER
=
True
if
not
self
.
config
.
SCRIPTED
:
self
.
imports
()
imports
()
loadEvaluator
(
self
.
config
).
render
()
def
generate
(
self
,
**
kwargs
):
...
...
neuralmmo/baselines/models/CompetitionRound1/checkpoint
deleted
100644 → 0
LFS
View file @
cda66167
File deleted
neuralmmo/projekt/config.py
View file @
77b348b7
...
...
@@ -80,7 +80,7 @@ class SmallMaps(config.SmallMaps, RLlibConfig, config.AllGameSystems):
EVALUATION_HORIZON
=
1024
#Maps Path
PATH_MAPS
=
os
.
path
.
join
(
os
.
getcwd
(),
'neuralmmo/resource'
)
PATH_MAPS
=
os
.
path
.
join
(
os
.
getcwd
(),
'neuralmmo/resource
/maps
'
)
class
Debug
(
SmallMaps
,
config
.
AllGameSystems
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment