Skip to content

Parameter parsing fails for strings containing = character #772

@ndharms

Description

@ndharms

Hello there! I'm using Papermill to automate some Jupyter notebook execution and I think I may have caught a potential bug: when running Papermill using strings containing a = character as the default parameter, the parser fails.

I get an error that looks like the following, but anonymized:

Unable to parse line X 'parameter='./all/date=20240102/ml_flow_run_id=Y/model/''.

After a little digging, I think this is because of the following code in translators.py:

if nequal > 0:
   grouped_variable.append(flatten_accumulator(accumulator))
   accumulator = []
   if nequal > 1:
       logger.warning(f"Unable to parse line {iline + 1} '{line}'.")
       continue ```

Since my parameter has = characters in it, nequal > 1 == True and we run into the warning.

Is this a desired behavior? i.e., is it expected that there should not be any = within default strong parameters?
Or are there plans to enable parameterization of strings containing = as defaults?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions