mystic-ai / pipeline

Pipeline is an open source python SDK for building AI/ML workflows

Home Page:https://www.mystic.ai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pipeline function can't get source in python interactive mode

paulcjh opened this issue · comments

Code:

from pipeline import Pipeline, Variable, pipeline_function


@pipeline_function
def multiply(a: float, b: float) -> float:
    return a * b

Traceback:

Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
  File "/Users/paul/mystic/pipeline-stack/pipeline/pipeline/objects/decorators.py", line 48, in pipeline_function
    function.__pipeline_function__ = Function(function)
  File "/Users/paul/mystic/pipeline-stack/pipeline/pipeline/objects/function.py", line 32, in __init__
    self.source = inspect.getsource(function)
  File "/Users/paul/miniforge3/envs/pipeline-env/lib/python3.9/inspect.py", line 1024, in getsource
    lines, lnum = getsourcelines(object)
  File "/Users/paul/miniforge3/envs/pipeline-env/lib/python3.9/inspect.py", line 1006, in getsourcelines
    lines, lnum = findsource(object)
  File "/Users/paul/miniforge3/envs/pipeline-env/lib/python3.9/inspect.py", line 835, in findsource
    raise OSError('could not get source code')
commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.