removed the use of environment variable to set ND4J classpath for python
@@ -20,7 +20,7 @@ class Singleton(type):
class KeanuContext(metaclass=Singleton):
def __init__(self):
stderr = self.__stderr_with_redirect_disabled_for_jupyter()
- classpath = self.__build_classpath()
+ classpath = os.path.join(PATH, "keanu-python-all.jar")
logging.getLogger("keanu").debug("Initiating Py4J gateway with classpath %s" % classpath)
@@ -35,13 +35,6 @@ class KeanuContext(metaclass=Singleton):
self.__jvm_view = self._gateway.new_jvm_view()
- def __build_classpath(self):
- keanu_path = os.path.join(PATH, "keanu-python-all.jar")
- nd4j_path = os.environ.get(ND4J_CLASSPATH_ENVIRONMENT_VARIABLE)
- if nd4j_path is None:
- raise EnvironmentError("Please set the environment variable %s to point to the ND4J jar files" % ND4J_CLASSPATH_ENVIRONMENT_VARIABLE)
- return ":".join([keanu_path, nd4j_path + "/*"])
-
def __stderr_with_redirect_disabled_for_jupyter(self):
try:
sys.stderr.fileno()
