- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
抱歉,又是一个真正的初学者问题:
我按照深水手册 (http://docs.h2o.ai/h2o/latest-stable/h2o-docs/booklets/DeepWaterBooklet.pdf) 中的说明下载了 H2O 深水 Docker 容器:
docker run -it --rm -p 54321:54321 -p 8080:8080 -v $PWD:/host opsh2oai/h2o-deepwater-cpu
java -jar /opt/h2o.jar
我成功启动了 H2O,并且可以在我的本地浏览器中通过 localhost:54321 使用 Flow UI 访问它。
我想做上面小册子中的 MNIST Python 示例。我将 Anaconda 和 Spyder IDE 与 Python 2.7 结合使用。
我想不是使用 init(),而是假设我必须使用 connect() 方法。无论哪种方式都不起作用,我得到超时、连接错误或 HTTP 异常,具体取决于我尝试的内容...我尝试了几个 IP(包括本地主机),例如:
from h2o.estimators.deepwater import H2ODeepWaterEstimator
# Start or connect to H2O
#h2o.init()
h2o.connect(ip="127.0.0.1", port=54321)
我的启动日志显示如下。
root@d54b0501b7c1:/# java -jar /opt/h2o.jar
08-11 08:46:32.904 172.17.0.2:54321 9 main INFO: Found XGBoost backend with library: xgboost4j
08-11 08:46:32.926 172.17.0.2:54321 9 main INFO: ----- H2O started -----
08-11 08:46:32.928 172.17.0.2:54321 9 main INFO: Build git branch: (HEAD detached at 0c917c766)
08-11 08:46:32.928 172.17.0.2:54321 9 main INFO: Build git hash: 0c917c766f28860a19ff3f110e1f405eb9f41623
08-11 08:46:32.928 172.17.0.2:54321 9 main INFO: Build git describe: jenkins-master-3971
08-11 08:46:32.928 172.17.0.2:54321 9 main INFO: Build project version: 3.13.0.356 (latest version: 3.14.0.1)
08-11 08:46:32.928 172.17.0.2:54321 9 main INFO: Build age: 12 days
08-11 08:46:32.929 172.17.0.2:54321 9 main INFO: Built by: 'jenkins'
08-11 08:46:32.929 172.17.0.2:54321 9 main INFO: Built on: '2017-07-29 13:31:58'
08-11 08:46:32.929 172.17.0.2:54321 9 main INFO: Watchdog Build git branch: (unknown)
08-11 08:46:32.929 172.17.0.2:54321 9 main INFO: Watchdog Build git hash: (unknown)
08-11 08:46:32.929 172.17.0.2:54321 9 main INFO: Watchdog Build git describe: (unknown)
08-11 08:46:32.929 172.17.0.2:54321 9 main INFO: Watchdog Build project version: (unknown)
08-11 08:46:32.930 172.17.0.2:54321 9 main INFO: Watchdog Built by: (unknown)
08-11 08:46:32.930 172.17.0.2:54321 9 main INFO: Watchdog Built on: (unknown)
08-11 08:46:32.930 172.17.0.2:54321 9 main INFO: XGBoost Build git branch: (unknown)
08-11 08:46:32.930 172.17.0.2:54321 9 main INFO: XGBoost Build git hash: (unknown)
08-11 08:46:32.930 172.17.0.2:54321 9 main INFO: XGBoost Build git describe: (unknown)
08-11 08:46:32.930 172.17.0.2:54321 9 main INFO: XGBoost Build project version: (unknown)
08-11 08:46:32.931 172.17.0.2:54321 9 main INFO: XGBoost Built by: (unknown)
08-11 08:46:32.931 172.17.0.2:54321 9 main INFO: XGBoost Built on: (unknown)
08-11 08:46:32.931 172.17.0.2:54321 9 main INFO: Processed H2O arguments: []
08-11 08:46:32.931 172.17.0.2:54321 9 main INFO: Java availableProcessors: 2
08-11 08:46:32.931 172.17.0.2:54321 9 main INFO: Java heap totalMemory: 31.0 MB
08-11 08:46:32.932 172.17.0.2:54321 9 main INFO: Java heap maxMemory: 444.5 MB
08-11 08:46:32.932 172.17.0.2:54321 9 main INFO: Java version: Java 1.8.0_131 (from Oracle Corporation)
08-11 08:46:32.932 172.17.0.2:54321 9 main INFO: JVM launch parameters: []
08-11 08:46:32.932 172.17.0.2:54321 9 main INFO: OS version: Linux 4.9.36-moby (amd64)
08-11 08:46:32.932 172.17.0.2:54321 9 main INFO: Machine physical memory: 1.95 GB
08-11 08:46:32.932 172.17.0.2:54321 9 main INFO: X-h2o-cluster-id: 1502441188713
08-11 08:46:32.933 172.17.0.2:54321 9 main INFO: User name: 'root'
08-11 08:46:32.933 172.17.0.2:54321 9 main INFO: IPv6 stack selected: false
08-11 08:46:32.933 172.17.0.2:54321 9 main INFO: Possible IP Address: eth0 (eth0), 172.17.0.2
08-11 08:46:32.933 172.17.0.2:54321 9 main INFO: Possible IP Address: lo (lo), 127.0.0.1
08-11 08:46:32.933 172.17.0.2:54321 9 main INFO: H2O node running in unencrypted mode.
08-11 08:46:32.943 172.17.0.2:54321 9 main INFO: Internal communication uses port: 54322
08-11 08:46:32.943 172.17.0.2:54321 9 main INFO: Listening for HTTP and REST traffic on http://172.17.0.2:54321/
08-11 08:46:32.945 172.17.0.2:54321 9 main INFO: H2O cloud name: 'root' on /172.17.0.2:54321, discovery address /225.53.128.226:57653
08-11 08:46:32.946 172.17.0.2:54321 9 main INFO: If you have trouble connecting, try SSH tunneling from your local machine (e.g., via port 55555):
08-11 08:46:32.946 172.17.0.2:54321 9 main INFO: 1. Open a terminal and run 'ssh -L 55555:localhost:54321 root@172.17.0.2'
08-11 08:46:32.946 172.17.0.2:54321 9 main INFO: 2. Point your browser to http://localhost:55555
08-11 08:46:32.955 172.17.0.2:54321 9 main INFO: Log dir: '/tmp/h2o-root/h2ologs'
08-11 08:46:32.957 172.17.0.2:54321 9 main INFO: Cur dir: '/'
08-11 08:46:33.072 172.17.0.2:54321 9 main INFO: HDFS subsystem successfully initialized
08-11 08:46:33.085 172.17.0.2:54321 9 main INFO: S3 subsystem successfully initialized
08-11 08:46:33.088 172.17.0.2:54321 9 main INFO: Flow dir: '/root/h2oflows'
08-11 08:46:33.142 172.17.0.2:54321 9 main INFO: Cloud of size 1 formed [/172.17.0.2:54321]
08-11 08:46:33.166 172.17.0.2:54321 9 main INFO: Registered parsers: [GUESS, ARFF, XLS, SVMLight, AVRO, PARQUET, CSV]
08-11 08:46:33.167 172.17.0.2:54321 9 main INFO: Watchdog extension initialized
08-11 08:46:33.168 172.17.0.2:54321 9 main INFO: XGBoost extension initialized
08-11 08:46:33.171 172.17.0.2:54321 9 main INFO: Registered 2 core extensions in: 341ms
08-11 08:46:33.172 172.17.0.2:54321 9 main INFO: Registered H2O core extensions: [Watchdog, XGBoost]
08-11 08:46:33.184 172.17.0.2:54321 9 main INFO: Found XGBoost backend with library: xgboost4j
08-11 08:46:33.702 172.17.0.2:54321 9 main INFO: Registered: 160 REST APIs in: 529ms
08-11 08:46:33.711 172.17.0.2:54321 9 main INFO: Registered REST API extensions: [XGBoost, Algos, AutoML, Core V3, Core V4]
08-11 08:46:34.073 172.17.0.2:54321 9 main INFO: Registered: 230 schemas in 354ms
08-11 08:46:34.073 172.17.0.2:54321 9 main INFO: H2O started in 5343ms
08-11 08:46:34.073 172.17.0.2:54321 9 main INFO:
08-11 08:46:34.075 172.17.0.2:54321 9 main INFO: Open H2O Flow in your web browser: http://172.17.0.2:54321
在我的 Mac/Docker 容器中连接到这个 H2O Deep Water Docker 容器的正确 Python 代码或缺少的配置是什么?
似乎是安全/Docker 配置问题???
h2o.connect(ip="127.0.0.1", port=54321)
Connecting to H2O server at http://127.0.0.1:54321...Traceback (most recent call last):
File "<ipython-input-12-e78edc3b0d61>", line 1, in <module>
h2o.connect(ip="127.0.0.1", port=54321)
File "/Users/kai.waehner/anaconda/lib/python2.7/site-packages/h2o/h2o.py", line 74, in connect
cluster_id=cluster_id, cookies=cookies, verbose=verbose)
File "/Users/kai.waehner/anaconda/lib/python2.7/site-packages/h2o/backend/connection.py", line 175, in open
conn._cluster = conn._test_connection(retries, messages=_msgs)
File "/Users/kai.waehner/anaconda/lib/python2.7/site-packages/h2o/backend/connection.py", line 414, in _test_connection
cld = self.request("GET /3/Cloud")
File "/Users/kai.waehner/anaconda/lib/python2.7/site-packages/h2o/backend/connection.py", line 259, in request
return self._process_response(resp, save_to)
File "/Users/kai.waehner/anaconda/lib/python2.7/site-packages/h2o/backend/connection.py", line 574, in _process_response
data = response.json(object_pairs_hook=H2OResponse)
File "/Users/kai.waehner/anaconda/lib/python2.7/site-packages/requests/models.py", line 877, in json
self.content.decode(encoding), **kwargs
File "/Users/kai.waehner/anaconda/lib/python2.7/json/__init__.py", line 352, in loads
return cls(encoding=encoding, **kw).decode(s)
File "/Users/kai.waehner/anaconda/lib/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/Users/kai.waehner/anaconda/lib/python2.7/json/decoder.py", line 380, in raw_decode
obj, end = self.scan_once(s, idx)
File "/Users/kai.waehner/anaconda/lib/python2.7/site-packages/h2o/backend/connection.py", line 691, in __new__
if schema == "CloudV3": return H2OCluster.from_kvs(keyvals)
File "/Users/kai.waehner/anaconda/lib/python2.7/site-packages/h2o/backend/cluster.py", line 47, in from_kvs
raise AttributeError("Attribute %s cannot be set on H2OCluster (= %r)" % (k, v))
AttributeError: Attribute internal_security_enabled cannot be set on H2OCluster (= False)
感谢您的帮助。
最佳答案
当您在 docker 镜像中启动 h2o 并使用 -p 54321:54321 时,h2o 将在运行 docker 的机器上的 localhost:54321 运行。然后您可以使用 h2o.init() 以正常方式连接。当 init 启动时,它会寻找正在运行的 h2o(您随后拥有)并连接到它。
关于python - 如何从 Python 连接到 H2O Deep Water Docker Image?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45631045/
在使用 requests 库中的状态代码时,我遇到了一些奇怪的事情。每个 HTTP 状态代码都有一个常量,有些具有别名(例如,包括 200 的复选标记): url = 'https://httpbin
这是我得到的代码,但我不知道这两行是什么意思: o[arr[i]] = o[arr[i]] || {}; o = o[arr[i]]; 完整代码: var GLOBAL={}; GLOBAL.name
所以这个问题的答案What is the difference between Θ(n) and O(n)? 指出“基本上,当我们说算法是 O(n) 时,它也是 O(n2)、O(n1000000)、O
这是一个快速的想法;有人会说 O(∞) 实际上是 O(1) 吗? 我的意思是它不依赖于输入大小? 所以在某种程度上它是恒定的,尽管它是无限的。 或者是唯一“正确”的表达方式 O(∞)? 最佳答案 无穷
这是真的: log(A) + log(B) = log(A * B) [0] 这也是真的吗? O(log(A)) + O(log(B)) = O(log(A * B)) [1] 据我了解 O(f
我正在解决面试练习的问题,但我似乎无法找出以下问题的时间和空间复杂度的答案: Given two sorted Linked Lists, merge them into a third list i
我了解 Big-Oh 表示法。但是我该如何解释 O(O(f(n))) 是什么意思呢?是指增长率的增长率吗? 最佳答案 x = O(n)基本上意味着 x <= kn对于一些常量 k . 因此 x = O
我正在编写一个函数,该函数需要一个对象和一个投影来了解它必须在哪个字段上工作。 我想知道是否应该使用这样的字符串: const o = { a: 'Hello There' }; funct
直觉上,我认为这三个表达式是等价的。 例如,如果一个算法在 O(nlogn) + O(n) 或 O(nlogn + n) 中运行(我很困惑),我可以假设这是一个O(nlogn) 算法? 什么是真相?
根据 O'Reilly 的 Python in a Nutshell 中的 Alex Martelli,复杂度类 O(n) + O(n) = O(n)。所以我相信。但是我很困惑。他解释说:“N 的两个
O(n^2)有什么区别和 O(n.log(n)) ? 最佳答案 n^2 的复杂性增长得更快。 关于big-o - 大 O 符号 : differences between O(n^2) and O(n
每当我收到来自 MS outlook 的电子邮件时,我都会收到此标记 & nbsp ; (没有空格)哪个显示为?在 <>. 当我将其更改为 ISO-8859-1 时,浏览器页面字符集编码为 UTF-8
我很难理解 Algorithms by S. Dasgupta, C.H. Papadimitriou, and U.V. Vazirani - page 24 中的以下陈述它们将 O(n) 的总和表
我在面试蛋糕上练习了一些问题,并在问题 2给出的解决方案使用两个单独的 for 循环(非嵌套),解决方案提供者声称他/她在 O(n) 时间内解决了它。据我了解,这将是 O(2n) 时间。是我想错了吗,
关于 Java 语法的幼稚问题。什么 T accept(ObjectVisitorEx visitor); 是什么意思? C# 的等价物是什么? 最佳答案 在 C# 中它可能是: O Accept(
假设我有一个长度为 n 的数组,我使用时间为 nlogn 的排序算法对它进行了排序。得到这个排序后的数组后,我遍历它以找到任何具有线性时间的重复元素。我的理解是,由于操作是分开发生的,所以时间是 O(
总和 O(1)+O(2)+ .... +O(n) 的计算结果是什么? 我在某处看到它的解决方案: O(n(n+1) / 2) = O(n^2) 但我对此并不满意,因为 O(1) = O(2) = co
这个问题在这里已经有了答案: 11 年前关闭。 Possible Duplicate: Plain english explanation of Big O 我想这可能是类里面教的东西,但作为一个自学
假设我有两种算法: for (int i = 0; i 2)更长的时间给定的一些n - 其中n这种情况的发生实际上取决于所涉及的算法 - 对于您的具体示例, n 2)分别时间,您可能会看到: Θ(n)
这个问题在这里已经有了答案: Example of a factorial time algorithm O( n! ) (4 个回答) 6年前关闭。 我见过表示为 O(X!) 的 big-o 示例但
我是一名优秀的程序员,十分优秀!