Skip to content

Commit

Permalink
fix:callback (#656)
Browse files Browse the repository at this point in the history
* fix:callback

* fix:crashed info

* update version
  • Loading branch information
SAKURA-CAT authored Jul 26, 2024
1 parent 29f4d35 commit 304bc54
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion swanlab/cli/commands/task/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ def search(cuid):
console.print(f"[bold]Created At:[/bold] {tm.created_at}")
tm.started_at is not None and console.print(f"[bold]Started At:[/bold] {tm.started_at}")
tm.finished_at is not None and console.print(f"[bold]Finished At:[/bold] {tm.finished_at}")
tm.msg is not None and console.print(f"[bold][red]Task Error[/red]:[/bold] \n\n{tm.msg}\n")
tm.status == 'CRASHED' and console.print(f"[bold][red]Task Error[/red]:[/bold] \n\n{tm.msg}\n")
2 changes: 1 addition & 1 deletion swanlab/data/callback_cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def _write_call_call(message):
show_button_html(experiment_url)

# task环境下,同步实验信息回调
if SwanLabEnv.RUNTIME.value == "task":
if os.environ.get(SwanLabEnv.RUNTIME.value) == "task":
cuid = os.environ["SWANLAB_TASK_ID"]
info = {
"cuid": cuid,
Expand Down
2 changes: 1 addition & 1 deletion swanlab/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "swanlab",
"version": "0.3.15-alpha.1",
"version": "0.3.15-alpha.2",
"description": "",
"python": "true"
}

0 comments on commit 304bc54

Please sign in to comment.