当前位置: 首页>>代码示例>>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;未经允许,请勿转载。