Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update log.py #218

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion milabench/cli/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
run_with_loggers,
validation_names,
)
from ..log import (
from ..dashbaord.live_report import LiveReportFormatter
from ..dashboard.log import (
DataReporter,
LongDashFormatter,
ShortDashFormatter,
Expand Down Expand Up @@ -75,6 +76,7 @@ def cli_run(args=None):
dash_class = {
"short": ShortDashFormatter,
"long": LongDashFormatter,
"live": LiveReportFormatter
"no": None,
}.get(args.dash, None)

Expand Down
2 changes: 1 addition & 1 deletion milabench/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

from .config import build_config, build_system_config
from .fs import XPath
from .log import TerminalFormatter
from .dashboard.log import TerminalFormatter
from .merge import merge
from .multi import MultiPackage
from .report import make_report
Expand Down
11 changes: 10 additions & 1 deletion milabench/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,16 @@
from .merge import merge

system_global = contextvars.ContextVar("system")
config_global = contextvars.ContextVar("Config")
config_global = contextvars.ContextVar("config")
execution_count = contextvars.ContextVar("count")


def set_run_count(total):
execution_count.set(total)


def get_run_count():
return execution_count.get()


def relative_to(pth, cwd):
Expand Down
Loading
Loading