RosettaCommons / RosettaCommons/foundry
[Bug]`int()` parsing failure when component contains `P` suffix during RFD3 input parsing
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 966
- Forks
- 181
- Avg merge
- 4d 4h
- Merged PRs (30d)
- 2
Description
Bug: int() parsing failure when component contains P suffix during RFD3 input parsing
Description
During RFD3 inference, the input parser fails when processing the generated design length component.
The parser function accumulate_components() expects each non-motif component to be an integer value and directly converts the component using:
n = int(component)
However, the component list generated by get_design_pattern_with_constraints() contains a string value with a protein type suffix:
component = "80P"
This value cannot be converted by Python's int() function:
int("80P")
resulting in:
ValueError: invalid literal for int() with base 10: '80P'
Reproduction
Input specification:
{
"test_L80": {
"input": "/content/L-homoserine_seed.pdb",
"length": "80-80",
"ligand": "LIG",
"dialect": 2
}
}
Component expansion result:
get_design_pattern_with_constraints(
"80-80",
length="80-80"
)
# returns:
['80P']
The generated component is then passed into:
accumulate_components()
where the parser assumes:
component == "80"
but receives:
component == "80P"
Expected behavior
The component format passed to accumulate_components() should match the parser expectation.
Either:
- The component generator should return an integer-compatible value:
80
or:
- The parser should explicitly support typed component strings:
80P
and extract the numeric length before integer conversion.
Affected code
File:
rfd3/src/rfd3/inference/input_parsing.py
Function:
accumulate_components()
Current logic:
else:
n = int(component)
The current implementation assumes that all non-alphabetic components are pure integers.
Environment
Repository:
foundry_RFdiffusion3
Related modules:
foundry.utils.components
rfd3.inference.input_parsing
Model initialization and checkpoint loading complete successfully. The failure occurs only during input component parsing.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in rfd3/src/rfd3/inference/input_parsing.py at accumulate_components() and inspect the related component-generation path in foundry.utils.components. Reproduce the supplied RFD3 input and trace the 80P value from get_design_pattern_with_constraints(). Done means the generated component and parser agree, with the supplied case completing without the ValueError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 74/100