Skip to content

feat: node param override#56

Open
TomCC7 wants to merge 5 commits into
dfki-ric:develfrom
qrafty-ai:feat/node-param-override
Open

feat: node param override#56
TomCC7 wants to merge 5 commits into
dfki-ric:develfrom
qrafty-ai:feat/node-param-override

Conversation

@TomCC7
Copy link
Copy Markdown

@TomCC7 TomCC7 commented Feb 14, 2026

Hi, this is an reimplementation of my previous PR #49 based on the new project state. I've tested locally with the example and it's working correctly. Closes #44 .

Copy link
Copy Markdown
Collaborator

@ndahn ndahn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @TomCC7, and sorry for the exceptionally long wait :') I had a few comments on the implementation, let me know if you find time to address them. There's a lot of inconsequential format changes which is not very nice, but fine - these won't stop me from accepting your PR.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think this should be part of this PR

ctx.command.allow_extra_args = True
ctx.allow_extra_args = True

def _bool_param_type(value: str) -> bool:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

click already handles bool types well, don't think this is needed

click_cmd.allow_extra_args = True
click_cmd.ignore_unknown_options = True
click_cmd.allow_extra_args = allow_kwargs
click_cmd.ignore_unknown_options = True
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like having this on by default, is this needed for this PR?

def launch_toml(
path: str,
launch_args: dict[str, str] = None,
extra_args: list[str] = None,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"extra_args" is a bit vague, I would like to at least see some documentation on its intended purpose.

Comment thread better_launch/launcher.py
# We don't want to log this
print(msg)

def set_node_param_overrides(self, overrides: dict[str, dict[str, Any]]) -> None:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A setter only member feels weird to me. Since it's intended to be modified and no other checks are done I think you can just make the member public.

Comment thread bin/bl
launch_args = {k: v for k, v in kwargs.items() if not k.startswith("bl_")}

# Pass current bl_* settings as CLI args to child process
from better_launch.utils.settings import Settings
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move to top of function

Comment thread bin/bl
args.extend(["--bl-node-param-override", "true"])

# Pass through extra args (e.g., --node.param value for node overrides)
args.extend(ctx.args)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels wrong, the function is already executed by click with whatever CLI args it received.

Comment thread bin/bl
# of a point to this.
# TODO pass overrides?
launch_toml(self.filepath, launch_args=kwargs)
launch_toml(self.filepath, launch_args=launch_args, extra_args=ctx.args)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels wrong, the function is already executed by click with whatever CLI args it received.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check if the examples/param_echo_node.py I recently included could be used or extended here instead.

script_dir = os.path.dirname(os.path.abspath(__file__))
bl.node(
package=".",
executable=os.path.join(script_dir, "scripts", "timed_talker.py"),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really not necessary, just use bl.find()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants