Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MineRL update #350

Open
wants to merge 170 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 63 commits
Commits
Show all changes
170 commits
Select commit Hold shift + click to select a range
fc4f7b8
commit 52fd99889c5f428aab30b2f26765dc40128b00a1
MadcowD Jul 9, 2020
73ac6b8
Merge remote-tracking branch 'openai/master' into dev
MadcowD Jul 11, 2020
97456b5
Using gthub actions CI.
MadcowD Jul 11, 2020
bf57359
Adding new build
MadcowD Jul 11, 2020
0122132
Add ajava dep
MadcowD Jul 11, 2020
a0d95d3
Get the python version
MadcowD Jul 11, 2020
378d06c
Removing python 2
MadcowD Jul 11, 2020
fba67d9
Adding apt dependencies for linux builds.
MadcowD Jul 11, 2020
be18635
Java path
MadcowD Jul 11, 2020
a5cf079
Only installing the jdk
MadcowD Jul 11, 2020
e5cd8d4
Switching to yum
MadcowD Jul 11, 2020
d217b7f
Adding JDK back for windows
MadcowD Jul 11, 2020
cd56a36
Java home
MadcowD Jul 11, 2020
10e4be0
Removing other builds
MadcowD Jul 11, 2020
b13ed07
Dir name
MadcowD Jul 11, 2020
d92ee11
Adding gradlew scoping.
MadcowD Jul 11, 2020
5e72fa7
Adding new jdk path?
MadcowD Jul 11, 2020
0c065b8
Switching to headless?
MadcowD Jul 11, 2020
1f2cb98
Swiching java versions back with a sad note against RHEL
MadcowD Jul 11, 2020
179bea4
Adding fix for dist utils failure.
MadcowD Jul 12, 2020
47b9418
libxranr
MadcowD Jul 12, 2020
b3191f4
.
MadcowD Jul 12, 2020
f41f7f8
.
MadcowD Jul 12, 2020
e848fad
.
MadcowD Jul 12, 2020
3f4247c
.
MadcowD Jul 12, 2020
dc954a3
More x11 deps.
MadcowD Jul 12, 2020
0361063
Lib xcuros?
MadcowD Jul 12, 2020
6a58686
Reading more about PEP 535
MadcowD Jul 12, 2020
8cffa4f
.
MadcowD Jul 12, 2020
e03adf8
.
MadcowD Jul 12, 2020
a10c85b
.
MadcowD Jul 12, 2020
2016bb5
Attempting to add LD_LIBRARY_PATH
MadcowD Jul 12, 2020
df9bb49
removing java
MadcowD Jul 12, 2020
aa9248f
.
MadcowD Jul 12, 2020
aa259a4
z
MadcowD Jul 12, 2020
88d67c8
test of default
MadcowD Jul 12, 2020
6c08dc5
wf
MadcowD Jul 12, 2020
b00db27
easier days
MadcowD Jul 12, 2020
02083f2
.
MadcowD Jul 12, 2020
8fc08a1
a
MadcowD Jul 12, 2020
c406485
az
MadcowD Jul 12, 2020
4d2010b
.
MadcowD Jul 12, 2020
c902704
Removing redundant installs
MadcowD Jul 12, 2020
4ff2a61
Adding java dependency to the white list of audit wheel.
MadcowD Jul 12, 2020
b35f3ba
Moving the json update to the repiar wheel command
MadcowD Jul 13, 2020
46826db
Using the correct pip?
MadcowD Jul 13, 2020
f27cbe2
Attempting to truly update the policy
MadcowD Jul 13, 2020
828864c
Switching to manylinux 2014
MadcowD Jul 13, 2020
647cbea
Fixing a syntax error.
MadcowD Jul 13, 2020
6cbc0ee
Parallelizing build
MadcowD Jul 13, 2020
a2d062d
Even faster builds.
MadcowD Jul 13, 2020
d85f7cc
.
MadcowD Jul 13, 2020
522ae0b
Test
MadcowD Jul 13, 2020
244e98c
z
MadcowD Jul 13, 2020
c227bfd
New platform instructions
MadcowD Jul 13, 2020
4b6d176
.
MadcowD Jul 13, 2020
6f3b06d
.
MadcowD Jul 13, 2020
fb83306
.
MadcowD Jul 13, 2020
5600a4b
Stopping sdist build
MadcowD Jul 13, 2020
3cf0ab3
Adding workflow dispatch.
MadcowD Jul 13, 2020
0c4b397
Attempting to trigger.
MadcowD Jul 13, 2020
7173840
Fixing pver issue!
MadcowD Jul 13, 2020
d1a779e
.
MadcowD Jul 13, 2020
9328c56
New trigger
MadcowD Jul 13, 2020
706e965
Trigger
MadcowD Jul 13, 2020
e9394e2
.
MadcowD Jul 13, 2020
ff768a7
Update
MadcowD Jul 13, 2020
944eadc
Adding sdist
MadcowD Jul 13, 2020
21f2c93
Testing.
MadcowD Jul 20, 2020
2eb07f2
Updating.
MadcowD Jul 20, 2020
88acfc0
Fixing the build pipeline & merging MC_usptream and unified spaces.
MadcowD Jul 23, 2020
3e608b4
Fixing build directory for shadowjar.
MadcowD Jul 23, 2020
2883b16
Doing test build deploy.
MadcowD Jul 23, 2020
c1c6599
.
MadcowD Jul 23, 2020
11f8761
.
MadcowD Jul 23, 2020
6f9cf70
.
MadcowD Jul 23, 2020
acdc0e8
fast gs stuff
MadcowD Jul 23, 2020
fa75d49
Catching bug
MadcowD Jul 23, 2020
5a52053
Something is wrong
MadcowD Jul 23, 2020
6e54f42
Fixing this.
MadcowD Jul 23, 2020
590d2fd
.
MadcowD Jul 23, 2020
e2c720a
removing submodule
MadcowD Jul 23, 2020
2a97c2d
fixe
MadcowD Jul 23, 2020
aa34866
Cleaning for sure :)
MadcowD Jul 23, 2020
73f62cb
Speeding up travis.
MadcowD Jul 23, 2020
6a17aeb
local install
MadcowD Jul 23, 2020
12eb20c
Removing useless module.
MadcowD Jul 23, 2020
c3f72b1
Making comopatible with python 3.5
MadcowD Jul 23, 2020
59fc021
Removing irrelevent tests.
MadcowD Jul 23, 2020
2531e36
Updating the data version, and moving relfection compoenents.
MadcowD Jul 27, 2020
9c6b348
Merging changes from @brandonhoughton for life-stats
MadcowD Jul 27, 2020
8d7e6a9
Handlerized pov, info, etc. Removed fullstats
MadcowD Jul 28, 2020
5850a11
Switching to using action handlers.
MadcowD Jul 28, 2020
648797a
Fixing classpath
MadcowD Jul 28, 2020
48c6e19
Reorganizing handlers, switching to XML templating. Finishing action …
MadcowD Jul 31, 2020
ef58e5d
Began adding templating for observations and added an agent_start sec…
MadcowD Jul 31, 2020
fa40751
Finishing observable implementations.
MadcowD Aug 3, 2020
0e77d72
Adding imports for observations.
MadcowD Aug 3, 2020
7273a2a
Implemented all currently used handlers in python -_-
MadcowD Aug 4, 2020
7b8b1d1
Fully comitting.
MadcowD Aug 5, 2020
c5e9491
Deleting those things
brandonhoughton Aug 5, 2020
260d7a6
Adding fixed reward handlers.
MadcowD Aug 11, 2020
45f68c2
Merge branch 'wguss/unification' of github.com:minerllabs/minerl into…
MadcowD Aug 11, 2020
2ca3e90
Update gradlew wrapper to work in modern IDEs
brandonhoughton Aug 11, 2020
27e03bc
Add setup script for intellij
brandonhoughton Aug 11, 2020
4e2c403
update setup script for intellij
brandonhoughton Aug 11, 2020
698c95f
Updaing options.txt with malmo config options
brandonhoughton Aug 11, 2020
8a04742
Templating successfully complete for treechop!
MadcowD Aug 12, 2020
0935c22
Merge branch 'wguss/unification' of github.com:minerllabs/minerl into…
MadcowD Aug 12, 2020
4fbffda
Add abstract method stubs to enable importing of envs
brandonhoughton Aug 12, 2020
a0219d6
Fixin treechop.xml
MadcowD Aug 12, 2020
61786b1
Merge branch 'wguss/unification' of github.com:minerllabs/minerl into…
MadcowD Aug 12, 2020
31f859c
Adding sorting to the translation handler.
MadcowD Aug 12, 2020
8ebcc48
Finishing the navigate spec.
MadcowD Aug 12, 2020
584c92a
Adding dense and extreme.
MadcowD Aug 12, 2020
6fe273a
Fixing misc constructor.
MadcowD Aug 12, 2020
5ea428b
Fixing wrapper.
MadcowD Aug 12, 2020
eb43735
Unit tests are now running!
MadcowD Aug 12, 2020
5657695
XML templating
MadcowD Aug 12, 2020
00ca6d5
.
MadcowD Aug 12, 2020
e238e8e
Add abstract method stubs for server decorators
brandonhoughton Aug 12, 2020
667fe40
Adding abstract method.
MadcowD Aug 12, 2020
64101e7
Merge branch 'wguss/unification' of github.com:minerllabs/minerl into…
MadcowD Aug 12, 2020
b65dc28
Breaking up the sections
MadcowD Aug 12, 2020
7a8c206
Switching templating to str based (for exact template checking)
MadcowD Aug 13, 2020
4ec7162
Updating the fake env.
MadcowD Aug 13, 2020
053f40d
Fixing POV
MadcowD Aug 13, 2020
90bd572
Fixing pause implementation hogging the commands.
MadcowD Aug 13, 2020
089f647
Added mission.xml.j2 to the manifest
MadcowD Aug 13, 2020
f9068a6
y
MadcowD Aug 13, 2020
2bd6750
a
MadcowD Aug 13, 2020
c2af353
a
MadcowD Aug 13, 2020
c28c6a2
Pushing changes to Mindcraft codebase
brandonhoughton Aug 13, 2020
74b1bd7
Regression tests.
MadcowD Aug 14, 2020
c159bd7
Regressio ntest
MadcowD Aug 14, 2020
26c3fc8
Merge branch 'wguss/unification' of github.com:minerllabs/minerl into…
MadcowD Aug 14, 2020
8068ff4
Dropping inflection. Adding reset Reverting generate. Fixing foc. Bum…
MadcowD Aug 15, 2020
a08eb56
All unit tests are passing!
MadcowD Aug 15, 2020
6cbf3b2
XML regression
MadcowD Aug 15, 2020
34ac230
Regression tests passed!
MadcowD Aug 15, 2020
9c804d0
Push for github
MadcowD Aug 15, 2020
f6eb0c9
Fix treechop regression.
MadcowD Aug 15, 2020
d3f080f
.
MadcowD Aug 15, 2020
743c3e0
.
MadcowD Aug 15, 2020
94a7ee3
Fixing gradle build!
MadcowD Aug 15, 2020
3cdcfe4
Removing junk jenkins file
MadcowD Aug 16, 2020
d9163b9
Glenn unification multiagent support (#375)
glennpow Aug 18, 2020
91e7c49
Adding a make function.
MadcowD Aug 18, 2020
ee60f08
Merge branch 'wguss/unification' of github.com:minerllabs/minerl into…
MadcowD Aug 18, 2020
7e426da
Finishing make mehtod.
MadcowD Aug 18, 2020
3d9bd75
Gwetting multiagent to run.
MadcowD Aug 18, 2020
d59bd23
Fixing error at end of process watcher.
MadcowD Aug 20, 2020
b484657
Rewriting the syncmanager state machine.
MadcowD Aug 25, 2020
95ed0bd
Updated the mixin!
MadcowD Aug 25, 2020
0de72ea
Attempting to remove callback so that this will run.
MadcowD Aug 25, 2020
57f6b45
Episodes running!
MadcowD Aug 25, 2020
4821b24
Multiagent?
MadcowD Aug 26, 2020
a66e18f
Multiagent is working.~
MadcowD Aug 26, 2020
089934e
Removing print statements and adding todos for render.
MadcowD Aug 26, 2020
3e45819
Rewrote env and added multiagent viewers
MadcowD Sep 1, 2020
936824d
Adding a launch utility
MadcowD Sep 1, 2020
c47152a
Supporting truncating instance lists.
MadcowD Sep 1, 2020
b8b109a
Privitized env specs & made fake env (#380)
MadcowD Sep 2, 2020
dc388b1
Made a fake env integration tests. Closes #380
MadcowD Sep 2, 2020
a9722e6
Closes #390. Added environment monitors (for the info dicitonary) and…
MadcowD Sep 2, 2020
74befee
Removing achievments and structures (#397)
MadcowD Sep 2, 2020
50597f4
Adding multiagent rendering!
MadcowD Sep 2, 2020
f90e9f4
Fixed the environments to return proper info indexing.
MadcowD Sep 3, 2020
87e6137
Bug fixes
MadcowD Sep 3, 2020
a327028
Update Mindcraft code to integrate new MineRL refactor
brandonhoughton Sep 8, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
steps:
- label: build minerl
env:
MINERL_DATA_ROOT: /tmp/minerl-data
JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
command:
- add-apt-repository -y ppa:openjdk-r/ppa
- apt-get -y update
- apt-get -y install openjdk-8-jdk
- export PATH=$$JAVA_HOME/bin:$$PATH
- java -version
- ./download_minerl_data.sh
- ./test_build_deploy.sh

timeout_in_minutes: 15
agents:
queue: rl-cpu-v4
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PYTHONPATH=.:$PYTHONPATH
139 changes: 139 additions & 0 deletions .github/workflows/wheels3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
name: Build wheels 3

on: [push] #, pull_request]

# todo: Support windows
# todo: make new docker image which includes java
# todo: get s3 upload to work.
# todo: support sdist!

jobs:
build_wheels_linux:
name: ${{ matrix.os }} ${{ matrix.pver }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04] #, windows-latest, macos-latest]
pver: ["cp35*x86_64", "cp36*x86_64", "cp37*x86_64", "cp38*x86_64"] # Todo add 39.
env:
# build using the manylinux2014 image
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
CIBW_BUILD: "${{ matrix.pver }}"
CIBW_SKIP: cp27-* pp27-*
CIBW_BEFORE_BUILD_LINUX: |
yum install -y \
java-1.8.0-openjdk-devel
# Why the fuck is there no headless-devel package like on debian!

# Add the Java dependencies to the
echo "$(/opt/python/cp37-cp37m/bin/pip show auditwheel | grep "Location:" | cut -d ':' -f2)/auditwheel/policy/policy.json" | xargs \
python -c "import sys; import json; import os; fname = sys.argv[1]; fread = open(fname, 'r'); obj = json.load(fread); fread.close(); print(obj[-1]); [o['lib_whitelist'].extend('libXcursor.so.1, libXfixes.so.3, libXi.so.6, libXrandr.so.2, libXtst.so.6, libXxf86vm.so.1, libawt.so, libawt_xawt.so, libjava.so, libjawt.so, libjvm.so, libncurses.so.5, libtinfo.so.5, libverify.so'.split(', ')) for o in obj]; print(obj[-1]['lib_whitelist']); fwrite = open(fname, 'w'); json.dump(obj, fwrite); fwrite.close(); fread = open(fname, 'r'); print(json.load(fread)[-1])"


CIBW_REPAIR_WHEEL_COMMAND_LINUX: "auditwheel -v repair -w {dest_dir} {wheel}"
CIBW_BEFORE_BUILD: pip install .

steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'

- name: Declare some variables
id: vars
shell: bash
run: |
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"

- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.7'

- uses: actions/setup-java@v1.3.0 # This is for MacOS and Windows
with:
java-version: '8' # The JDK version to make available on the path.
java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk
architecture: x64 # (x64 or x86) - defaults to x64

# TODO Run testing here! (Or we could run it in a different workflow.)


- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==1.5.2


- name: Build wheels
run: |
python -m cibuildwheel --output-dir wheelhouse

- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl

- uses: shallwefootball/s3-upload-action@master
with:
aws_key_id: ${{ secrets.AWS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
aws_bucket: ${{ secrets.AWS_MINERL_BUCKET }}
source_dir: './wheelhouse'
destination_dir: builds/${{ steps.vars.outputs.branch }}/${{ steps.vars.outputs.sha_short }}/

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'


- name: Declare some variables
id: vars
shell: bash
run: |
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"

- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.7'

- name: Build sdist
run: python setup.py sdist

- uses: actions/upload-artifact@v2
with:
path: dist/*.tar.gz

- uses: shallwefootball/s3-upload-action@master
with:
aws_key_id: ${{ secrets.AWS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
aws_bucket: ${{ secrets.AWS_MINERL_BUCKET }}
source_dir: './wheelhouse'
destination_dir: builds/${{ steps.vars.outputs.branch }}/${{ steps.vars.outputs.sha_short }}/



# # upload_pypi:
# # needs: [build_wheels, build_sdist]
# # runs-on: ubuntu-latest
# # # upload to PyPI on every tag starting with 'v'
# # # if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
# # # alternatively, to publish when a GitHub Release is created, use the following rule:
# # if: github.event_name == 'release' && github.event.action == 'published'
# # steps:
# # - uses: actions/download-artifact@v2
# # with:
# # name: artifact
# # path: dist

# # - uses: pypa/gh-action-pypi-publish@master
# # with:
# # user: __token__
# # password: ${{ secrets.pypi_password }}
# # To test: repository_url: https://test.pypi.org/legacy/
52 changes: 52 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down Expand Up @@ -236,3 +237,54 @@ minerl_data/pipeline/tests_data/


t/
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

# C extensions
*.so

venv/*
*logs*

# Distribution / packaging
.Python
build/
_build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
build/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# IDE files
.idea/
.vscode

*.DS_store
*.iml
*Minecraft.ipr
*Minecraft.iws

*/logs/

tests/logs/
.vscode/settings.json
*/performance


# Jenkins
jenkins_home/

#eclipse
Malmo/Minecraft/*.launch
*minerl_watchers/
10 changes: 9 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
recursive-include projectname *.py
include README
include requirements.txt
include LICENSE
include LICENSE
recursive-include minerl/env/Malmo/Minecraft/build/libs *.jar
recursive-include minerl/env/Malmo/Minecraft/run/gradle/caches/minecraft *
recursive-include minerl/env/Malmo/Minecraft/run/gradle/native *
recursive-include minerl/env/Malmo/Schemas *
recursive-include minerl/env/missions *.xml
include minerl/env/Malmo/Minecraft/launchClient.sh
include minerl/env/Malmo/Minecraft/options.txt
include minerl/core/mc_constants.json
17 changes: 17 additions & 0 deletions Malmo/Minecraft/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Minecraft_</name>
<comment>Project Minecraft_ created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
</projectDescription>
1 change: 0 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@

from docutils.parsers.rst import Directive


class ExecDirective(Directive):
"""Execute the specified python code and insert the output into the document"""
has_content = True
Expand Down
105 changes: 0 additions & 105 deletions docs/source/environments/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ environment!
:end-before: inclusion-marker-do-not-remove

Basic Environments
=======================================
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

THIS SHOULD NOT BE MERGED!


.. warning::

The following basic environments are NOT part of the 2020 MineRL Competition! Feel free to use them for exploration
but agents may only be trained on `MineRL competition environments`_!

.. exec::

Expand Down Expand Up @@ -132,104 +126,5 @@ Basic Environments
print_actions_for_id(i)

Competition Environments
=======================================

.. exec::

def print_actions_for_id(id):
import minerl
import gym
import json

def print_json(arg):
import json
arg = {":ref:`{} <{}>`".format(k,k): arg[k] for k in arg}
json_obj = json.dumps(arg, sort_keys=True, indent=8,
default=lambda o: str(o))
json_obj= json_obj[:-1] + " })"

print('.. parsed-literal:: \n\n Dict(%s\n\n\n' % json_obj)

def prep_space(space):
import gym
if isinstance(space, gym.spaces.Dict):
dct = {}
for k in space.spaces:
dct[k] = prep_space(space.spaces[k])
return dct
else:
return space



envspec = gym.spec(id)


print("______________")
print("{}".format(id))
print("______________")

if 'docstr' in envspec._kwargs:
print(envspec._kwargs['docstr'])



action_space = prep_space(envspec._kwargs['action_space'])
state_space = prep_space(envspec._kwargs['observation_space'])

print(".......")
print("Observation Space")
print(".......")
print_json(state_space)


print(".......")
print("Action Space")
print(".......")
print_json(action_space)

print(".......")
print("Usage")
print(".......")


usage_str = '''.. code-block:: python

import gym
import minerl

# Run a random agent through the environment
env = gym.make("{}") # A {} env

obs = env.reset()
done = False

while not done:
# Take a no-op through the environment.
obs, rew, done, _ = env.step(env.action_space.noop())
# Do something

######################################

# Sample some data from the dataset!
data = minerl.data.make("{}")

# Iterate through a single epoch using sequences of at most 32 steps
for obs, rew, done, act in data.seq_iter(num_epochs=1, batch_size=32):
# Do something
'''.format(id,id,id)
print(usage_str)


ids = ['MineRLTreechopVectorObf-v0',
'MineRLNavigateVectorObf-v0',
'MineRLNavigateExtremeVectorObf-v0',
'MineRLNavigateDenseVectorObf-v0',
'MineRLNavigateExtremeDenseVectorObf-v0',
'MineRLObtainDiamondVectorObf-v0',
'MineRLObtainDiamondDenseVectorObf-v0',
'MineRLObtainIronPickaxeVectorObf-v0',
'MineRLObtainIronPickaxeDenseVectorObf-v0',]

for i in ids:
print_actions_for_id(i)
4 changes: 2 additions & 2 deletions minerl/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def make(environment=None , data_dir=None, num_workers=4, worker_batch_size=32,
# Ensure path is setup
if data_dir is None and 'MINERL_DATA_ROOT' in os.environ:
data_dir = os.environ['MINERL_DATA_ROOT']
elif data_dir is not None and not os.path.exists(data_dir):
if data_dir is not None and not os.path.exists(data_dir):
if force_download:
print("Provided data directory does not exist: ", data_dir)
data_dir = download(data_dir)
Expand All @@ -38,7 +38,7 @@ def make(environment=None , data_dir=None, num_workers=4, worker_batch_size=32,
raise ValueError("No data_dir provided and $MINERL_DATA_ROOT undefined."
"Specify force_download=True to download default dataset")


assert data_dir is not None, "data_dir is not provided, and download has failed"
minerl.data.version.assert_version(data_dir)

d = DataPipeline(
Expand Down
Loading