Skip to content

Question: is it possible to make CLI replace parameter dashes with underscores? #301

Closed
@iskandr

Description

@iskandr

I'm curious about replacing argparse with jsonargparse in some of my projects since simply running CLI(main_fn) would cover my most common use cases. However, it's not clear to me if there's any hook to change the mapping from Python argument names to CLI parameters. Specifically, I typically have multi-word parameters represented with dashes as commandline arguments. So, arg_like_this in Python comes --arg-like-this on the commandline. Is there any way to replicate this behavior with jsonargparse?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions