mirror of
https://github.com/microsoft/autogen.git
synced 2026-02-17 12:22:45 -05:00
log_file_name in tune.run() (#681)
* log_file_name in tune.run() * use_ray validates log_file_name * assert no ray_args when not use_ray * import os and use os.path
This commit is contained in:
@@ -22,6 +22,7 @@ def test_config_constraint():
|
||||
metric="metric",
|
||||
mode="max",
|
||||
num_samples=100,
|
||||
log_file_name="logs/config_constraint.log",
|
||||
)
|
||||
|
||||
assert analysis.best_config["x"] > analysis.best_config["y"]
|
||||
|
||||
@@ -295,7 +295,7 @@ def test_searcher():
|
||||
print(searcher.suggest("t1"))
|
||||
from flaml import tune
|
||||
|
||||
tune.run(lambda x: 1, config={}, use_ray=use_ray)
|
||||
tune.run(lambda x: 1, config={}, use_ray=use_ray, log_file_name="logs/searcher.log")
|
||||
|
||||
|
||||
def test_no_optuna():
|
||||
|
||||
@@ -47,6 +47,8 @@ def test_nested_run():
|
||||
mode="min",
|
||||
num_samples=5,
|
||||
local_dir="logs",
|
||||
log_file_name="logs/nested.log",
|
||||
verbose=3,
|
||||
)
|
||||
print(analysis.best_result)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user