當前位置: 首頁>>代碼示例>>Python>>正文


Python pycrayon.CrayonClient方法代碼示例

本文整理匯總了Python中pycrayon.CrayonClient方法的典型用法代碼示例。如果您正苦於以下問題:Python pycrayon.CrayonClient方法的具體用法?Python pycrayon.CrayonClient怎麽用?Python pycrayon.CrayonClient使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在pycrayon的用法示例。


在下文中一共展示了pycrayon.CrayonClient方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: main

# 需要導入模塊: import pycrayon [as 別名]
# 或者: from pycrayon import CrayonClient [as 別名]
def main():
    """ Opens the crayon client and removes the specified experiment."""
    crayon_client = CrayonClient("localhost")
    crayon_client.remove_experiment(sys.argv[1]) 
開發者ID:lil-lab,項目名稱:atis,代碼行數:6,代碼來源:remove_experiment.py

示例2: main

# 需要導入模塊: import pycrayon [as 別名]
# 或者: from pycrayon import CrayonClient [as 別名]
def main():
    """ Asks users whether they want to delete all experiments and then deletes."""
    crayon_client = pycrayon.CrayonClient("localhost")

    choice = raw_input("Are you sure? ")
    if choice == 'y':
        crayon_client.remove_all_experiments()
    else:
        print("Not deleting") 
開發者ID:lil-lab,項目名稱:atis,代碼行數:11,代碼來源:delete_all_experiments.py

示例3: __init__

# 需要導入模塊: import pycrayon [as 別名]
# 或者: from pycrayon import CrayonClient [as 別名]
def __init__(self, name, runs_distributed, runs_cluster, chief_handle, path_log_storage=None,
                 crayon_server_address="localhost"):
        self._name = name
        self._path_log_storage = path_log_storage
        if path_log_storage is not None:
            create_dir_if_not_exist(path_log_storage)

        self._chief_handle = chief_handle
        self._crayon = CrayonClient(hostname=crayon_server_address)
        self._experiments = {}
        self.clear()
        self._custom_logs = {}  # dict of exps containing dict of graph names containing lists of {step: val, } dicts

        self._ray = MaybeRay(runs_distributed=runs_distributed, runs_cluster=runs_cluster) 
開發者ID:EricSteinberger,項目名稱:PokerRL,代碼行數:16,代碼來源:CrayonWrapper.py

示例4: test_init

# 需要導入模塊: import pycrayon [as 別名]
# 或者: from pycrayon import CrayonClient [as 別名]
def test_init(self):
        CrayonClient(port=self.test_server_port) 
開發者ID:torrvision,項目名稱:crayon,代碼行數:4,代碼來源:test_crayon.py

示例5: test_init_wrong_localhost

# 需要導入模塊: import pycrayon [as 別名]
# 或者: from pycrayon import CrayonClient [as 別名]
def test_init_wrong_localhost(self):
        self.assertRaises(ValueError, CrayonClient, "not_open",
                          self.test_server_port) 
開發者ID:torrvision,項目名稱:crayon,代碼行數:5,代碼來源:test_crayon.py

示例6: test_init_wrong_port

# 需要導入模塊: import pycrayon [as 別名]
# 或者: from pycrayon import CrayonClient [as 別名]
def test_init_wrong_port(self):
        self.assertRaises(ValueError, CrayonClient, "localhost", 123412341234) 
開發者ID:torrvision,項目名稱:crayon,代碼行數:4,代碼來源:test_crayon.py

示例7: test_init_xp_empty

# 需要導入模塊: import pycrayon [as 別名]
# 或者: from pycrayon import CrayonClient [as 別名]
def test_init_xp_empty(self):
        cc = CrayonClient(port=self.test_server_port)
        self.assertRaises(ValueError, cc.create_experiment, "") 
開發者ID:torrvision,項目名稱:crayon,代碼行數:5,代碼來源:test_crayon.py

示例8: test_open_experiment

# 需要導入模塊: import pycrayon [as 別名]
# 或者: from pycrayon import CrayonClient [as 別名]
def test_open_experiment(self):
        cc = CrayonClient(port=self.test_server_port)
        foo = cc.create_experiment("foo")
        foo.add_scalar_value("bar", 1, step=2, wall_time=0)
        foo = cc.open_experiment("foo")
        foo.add_scalar_value("bar", 3, wall_time=1)
        self.assertEqual(foo.get_scalar_values("bar"),
                         [[0.0, 2, 1.0], [1.0, 3, 3.0]]) 
開發者ID:torrvision,項目名稱:crayon,代碼行數:10,代碼來源:test_crayon.py

示例9: test_add_scalar_value

# 需要導入模塊: import pycrayon [as 別名]
# 或者: from pycrayon import CrayonClient [as 別名]
def test_add_scalar_value(self):
        cc = CrayonClient(port=self.test_server_port)
        foo = cc.create_experiment("foo")
        foo.add_scalar_value("bar", 2, wall_time=time.clock(), step=1) 
開發者ID:torrvision,項目名稱:crayon,代碼行數:6,代碼來源:test_crayon.py

示例10: test_add_scalar_less_data

# 需要導入模塊: import pycrayon [as 別名]
# 或者: from pycrayon import CrayonClient [as 別名]
def test_add_scalar_less_data(self):
        cc = CrayonClient(port=self.test_server_port)
        foo = cc.create_experiment("foo")
        foo.add_scalar_value("bar", 2)

    # TODO These should really be tested singularly... 
開發者ID:torrvision,項目名稱:crayon,代碼行數:8,代碼來源:test_crayon.py

示例11: test_add_scalar_wrong_data

# 需要導入模塊: import pycrayon [as 別名]
# 或者: from pycrayon import CrayonClient [as 別名]
def test_add_scalar_wrong_data(self):
        cc = CrayonClient(port=self.test_server_port)
        foo = cc.create_experiment("foo")
        self.assertRaises(ValueError, foo.add_scalar_value,
                          "bar", "lol") 
開發者ID:torrvision,項目名稱:crayon,代碼行數:7,代碼來源:test_crayon.py

示例12: test_add_scalar_wrong_variable

# 需要導入模塊: import pycrayon [as 別名]
# 或者: from pycrayon import CrayonClient [as 別名]
def test_add_scalar_wrong_variable(self):
        cc = CrayonClient(port=self.test_server_port)
        foo = cc.create_experiment("foo")
        self.assertRaises(ValueError, foo.add_scalar_value,
                          "", 2) 
開發者ID:torrvision,項目名稱:crayon,代碼行數:7,代碼來源:test_crayon.py

示例13: test_add_scalar_dict

# 需要導入模塊: import pycrayon [as 別名]
# 或者: from pycrayon import CrayonClient [as 別名]
def test_add_scalar_dict(self):
        cc = CrayonClient(port=self.test_server_port)
        foo = cc.create_experiment("foo")
        data = {"fizz": 3, "buzz": 5}
        foo.add_scalar_dict(data, wall_time=0, step=5)
        data = {"fizz": 6, "buzz": 10}
        foo.add_scalar_dict(data) 
開發者ID:torrvision,項目名稱:crayon,代碼行數:9,代碼來源:test_crayon.py

示例14: test_get_scalar_values_no_data

# 需要導入模塊: import pycrayon [as 別名]
# 或者: from pycrayon import CrayonClient [as 別名]
def test_get_scalar_values_no_data(self):
        cc = CrayonClient(port=self.test_server_port)
        foo = cc.create_experiment("foo")
        self.assertRaises(ValueError, foo.get_scalar_values, "bar") 
開發者ID:torrvision,項目名稱:crayon,代碼行數:6,代碼來源:test_crayon.py

示例15: test_get_scalar_values_one_datum

# 需要導入模塊: import pycrayon [as 別名]
# 或者: from pycrayon import CrayonClient [as 別名]
def test_get_scalar_values_one_datum(self):
        cc = CrayonClient(port=self.test_server_port)
        foo = cc.create_experiment("foo")
        foo.add_scalar_value("bar", 0, wall_time=0, step=0)
        self.assertEqual(foo.get_scalar_values("bar"), [[0.0, 0, 0.0]]) 
開發者ID:torrvision,項目名稱:crayon,代碼行數:7,代碼來源:test_crayon.py


注:本文中的pycrayon.CrayonClient方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。