Skip to content

NsNet2 sample fails with unexpected 'constraints' argument error #135

@mig9mili

Description

@mig9mili
## Description
When building and testing Quidditch, the NsNet2 sample fails with an error indicating an unexpected `constraints` argument being passed to `NsNet2.forward()`.

## Error Message
```python
TypeError: NsNet2.forward() got an unexpected keyword argument 'constraints'

Steps to Reproduce

  1. Clone the repository
  2. Set up environment with required dependencies
  3. Run either:
    cmake --build . --target test
    # or
    cmake --build . --target codegen runtime

Full Error Stack Trace

Traceback (most recent call last):
  File ".../NsNet2.py", line 102, in <module>
    exported = aot.export(with_frames(n_frames=args.frames))
  File ".../shark_turbine/aot/exporter.py", line 321, in export
    cm = TransformedModule(context=context, import_to="import")
  [...]
  File ".../shark_turbine/aot/builtins/jittable.py", line 197, in flat_wrapped_f
    return self.wrapped_f(*pytorch_args, **pytorch_kwargs)
TypeError: NsNet2.forward() got an unexpected keyword argument 'constraints'

Environment

  • OS: Ubuntu
  • Python Version: 3.11.11
  • CMake Version: 3.22.1
  • Using virtual environment with required dependencies installed

Additional Context

The error seems to occur during the IREE compilation pipeline when trying to export the NsNet2 model. The error suggests there's a mismatch between the model's forward method signature and how it's being called during the compilation process.


Would you like me to explain any part of this issue template or help modify it further?

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