diff --git a/runhouse/resources/module.py b/runhouse/resources/module.py index 086c5bc72..2ebe3c3dc 100644 --- a/runhouse/resources/module.py +++ b/runhouse/resources/module.py @@ -1153,15 +1153,21 @@ def openapi_spec(self, spec_name: Optional[str] = None): param.default if param.default != inspect.Parameter.empty else ..., ) + for k, v in params.items(): + if isinstance(v[0], Callable): + logger.warning( + f"Callable detected in openapi spec params: {k} of type {v[0]}" + ) + # Filter out any callables which are not compatible for generating the schema - filtered_params = { - k: (v[0], v[1]) - for k, v in params.items() - if not isinstance(v[0], Callable) - } + # filtered_params = { + # k: (v[0], v[1]) + # for k, v in params.items() + # if not isinstance(v[0], Callable) + # } module_method_params = create_model( - f"{method_name}_schema", **filtered_params + f"{method_name}_schema", **params ).schema() module_method_params["title"] = "kwargs"