allenai / allenai/tango

How do I get nice formatted terminal logs when using hydra instead of tango's jsonnet configs

未關閉
#487 4 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
question
主要語言
Python
星號
572
分支
55
PR 合併指標
30 天內沒有已合併 PR

描述

I have been trying to use [Hydra](https://hydra.cc/docs/intro/) for config management (more flexible command line interface) and therefore create step graphs and register runs & workspaces programmatically as follows:

```python
@hydra.main(version_base=None,config_path="./exp_configs", config_name="some_exp_name")
def main(cfg):
workspace = Workspace.from_url(cfg.tango_workspace)
step_graph = create_step_graph(cfg)
run = workspace.register_run(StepGraph.ordered_steps(step_graph),name=cfg.run_name)
executor = Executor(workspace=workspace,parallelism=None)
output = executor.execute_step_graph(step_graph)

if __name__=='__main__':
main()
```

I execute this script with the usual `python -m filename`

Two questions:
- Is this the right way to do tango runs when NOT using tango's jsonnet configs or is there a better way?
- When I run experiments like this, I do not get the nicely color-coded and formatted terminal output that I get with `tango run config.jsonnet`. Is there a way to achieve that in this particular setup?

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。