Skip to content
Merged
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
2 changes: 1 addition & 1 deletion python/evalio/cli/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def parse_config(
params = yaml.safe_load(f)

# get output directory
out = Path(params["output_dir"])
out = Path(params["output_dir"]) if "output_dir" in params else None

# process datasets & make sure they are downloaded by building
datasets = DatasetBuilder.parse(params.get("datasets", None))
Expand Down
11 changes: 8 additions & 3 deletions python/evalio/cli/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from evalio.cli.completions import DatasetOpt, PipelineOpt
from evalio.utils import print_warning
from tqdm.rich import tqdm
import numpy as np

from evalio.types import ImuMeasurement, LidarMeasurement
from evalio.rerun import RerunVis, VisArgs
Expand Down Expand Up @@ -77,17 +78,18 @@ def run_from_cli(
"Cannot specify both config and manual options", param_hint="run"
)

# Go through visualization options
if show is None:
vis_args = VisArgs(show=visualize)
else:
vis_args = show
vis = RerunVis(vis_args)

# Parse the config file if provided
if config is not None:
pipelines, datasets, out = parse_config(config)
if out is None:
print_warning("Output directory not set. Defaulting to './evalio_results'")
out = Path("./evalio_results")
out = Path("./evalio_results") / config.stem

else:
if in_pipelines is None:
Expand Down Expand Up @@ -134,7 +136,10 @@ def run(
print(
f"Running {plural(len(pipelines), 'pipeline')} on {plural(len(datasets), 'dataset')} => {plural(len(pipelines) * len(datasets), 'experiment')}"
)
lengths = [d.length if d.length is not None else len(d.build()) for d in datasets]
lengths = [
min(d.length if d.length is not None else np.inf, len(d.build()))
for d in datasets
]
dtime = sum(le / d.dataset.lidar_params().rate for le, d in zip(lengths, datasets)) # type: ignore
dtime *= len(pipelines)
if dtime > 3600:
Expand Down
Loading