Netflix / metaflow

:rocket: Build and manage real-life ML, AI, and data science projects with ease!

Home Page:https://metaflow.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to utilise pytest unit test for metaflow

iamdansari opened this issue · comments

from HelloWorld import HelloWorld
from metaflow import Flow, Metaflow
import pytest

@pytest.fixture
def get_flow():
# Setup
flow = HelloWorld() // OSError: could not get source code

Below is a simple Metaflow

from metaflow import FlowSpec, step

class HelloWorldFlow(FlowSpec):
@step
def start(self):
print("Hello, World!")
self.next(self.end)

@step
def end(self):
    print("Flow completed.")

if name == 'main':
HelloWorldFlow()

commented

@iamdansari we have a new API implementation landing soon that should help with this use case.