-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
revert previous changes + better README
- Loading branch information
Showing
13 changed files
with
7,810 additions
and
804 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
from gym.envs.registration import register | ||
|
||
|
||
register( | ||
id='JSSEnv-v1', | ||
entry_point='JSSEnv.envs:JssEnv', | ||
id="jss-v1", | ||
entry_point="JSSEnv.envs:JssEnv", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from JSSEnv.envs.JssEnv import JssEnv | ||
from JSSEnv.envs.jss_env import JssEnv |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
import numpy as np | ||
|
||
|
||
def assign_env_config(self, kwargs): | ||
for key, value in kwargs.items(): | ||
setattr(self, key, value) | ||
if hasattr(self, 'env_config'): | ||
# print(self.env_config) | ||
if hasattr(self, "env_config"): | ||
for key, value in self.env_config.items(): | ||
# Check types based on default settings | ||
if hasattr(self, key): | ||
if type(getattr(self,key)) == np.ndarray: | ||
if type(getattr(self, key)) == np.ndarray: | ||
setattr(self, key, value) | ||
else: | ||
setattr(self, key, | ||
type(getattr(self, key))(value)) | ||
setattr(self, key, type(getattr(self, key))(value)) | ||
else: | ||
setattr(self, key, value) | ||
|
||
|
||
|
||
# Get Ray to work with gym registry | ||
def create_env(config, *args, **kwargs): | ||
if type(config) == dict: | ||
env_name = config['env'] | ||
else: | ||
env_name = config | ||
if env_name == 'JSSEnv-v1': | ||
from JSSEnv.envs.JssEnv import JssEnv as env | ||
else: | ||
raise NotImplementedError('Environment {} not recognized.'.format(env_name)) | ||
return env | ||
if type(config) == dict: | ||
env_name = config["env"] | ||
else: | ||
env_name = config | ||
if env_name == "jss-v1": | ||
from JSSEnv.envs.jss_env import JssEnv as env | ||
else: | ||
raise NotImplementedError("Environment {} not recognized.".format(env_name)) | ||
return env |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,31 @@ | ||
from setuptools import setup, find_packages | ||
import sys | ||
import os | ||
|
||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'JSSEnv')) | ||
from JSSEnv.version import VERSION | ||
|
||
setup(name='JSSEnv', | ||
version=VERSION, | ||
author="Pierre Tassel", | ||
author_email="[email protected]", | ||
description="An optimized OpenAi gym's environment to simulate the Job-Shop Scheduling problem.", | ||
url="https://github.com/prosysscience/JSSEnv", | ||
packages=find_packages(), | ||
classifiers=[ | ||
"Programming Language :: Python :: 3", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
], | ||
python_requires='>=3.6', | ||
install_requires=['gym', 'pandas', 'numpy', 'plotly', 'imageio', 'psutil', 'requests', 'kaleido', 'pytest', | ||
'codecov'], | ||
include_package_data=True, | ||
zip_safe=False | ||
) | ||
setup( | ||
name="JSSEnv", | ||
version="1.0.2", | ||
author="Pierre Tassel", | ||
author_email="[email protected]", | ||
description="An optimized OpenAi gym's environment to simulate the Job-Shop Scheduling problem.", | ||
url="https://github.com/prosysscience/JSSEnv", | ||
packages=find_packages(), | ||
classifiers=[ | ||
"Programming Language :: Python :: 3", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
], | ||
python_requires=">=3.6", | ||
install_requires=[ | ||
"gym", | ||
"pandas", | ||
"numpy", | ||
"plotly", | ||
"imageio", | ||
"psutil", | ||
"requests", | ||
"kaleido", | ||
"pytest", | ||
"codecov", | ||
], | ||
include_package_data=True, | ||
zip_safe=False, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import JSSEnv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.