Open AlejandroEsquivel opened 1 year ago
This issue is a part of Hacktoberfest. Closing this issue will earn you 1 point.
Hey could you please assign this issue to me
I believe Covalent's serialization logic only supports the CallDeps class for function calls and expects a callable object however not raw python functions in the call_before and call_after sections of the electron API. Hence It's necessary to wrap the raw python functions in CallDeps objects for function calls. The following updations in the workflow should help resolve the issue: @ct.electron( call_before=[ct.DepsCall(execute_before_electron, args=(1, 2))], call_after=[ct.DepsCall(execute_after_electron)] ) OR call_deps_before = ct.DepsCall(execute_before_electron, 1, 2) call_deps_after = ct.DepsCall(execute_after_electron)
@ct.electron( call_before=[call_deps_before], call_after=[call_deps_after], )
I believe Covalent's serialization logic only supports the CallDeps class for function calls and expects a callable object however not raw python functions in the call_before and call_after sections of the electron API. Hence It's necessary to wrap the raw python functions in CallDeps objects for function calls. The following updations in the workflow should help resolve the issue:
@ct.electron(
call_before=[ct.DepsCall(execute_before_electron, args=(1, 2))], call_after=[ct.DepsCall(execute_after_electron)]
)
OR
call_deps_before = ct.DepsCall(execute_before_electron, 1, 2)
call_deps_after = ct.DepsCall(execute_after_electron)
@ct.electron(
call_before=[call_deps_before], call_after=[call_deps_after],
)
Indeed true ! Adding a feature label to this.
Environment
What is happening?
Using Implicit form of CallDeps in a workflow seems to throw an issue (i.e using raw python functions into
call_before
orcall_after
instead of using the call deps classHow can we reproduce the issue?
Running the following workflow using implicit call deps fails:
What should happen?
One should be able to execute the above workflow successfully