Dylan Wilder
08/30/2022, 8:41 PMonemodel.get_assumptions.base_prices
but it registered as `onemodel.models.annotations.wf.onemodel.models.annotations.onemodel.get_assumptions.base_prices`*.* Any ideas? i'm guessing something around tracked instance is injecting this?Yee
08/30/2022, 8:45 PMDylan Wilder
08/30/2022, 8:47 PMYee
08/30/2022, 9:19 PMDylan Wilder
08/30/2022, 9:19 PMYee
08/30/2022, 9:19 PMDylan Wilder
08/30/2022, 9:20 PMYee
08/30/2022, 11:12 PMDylan Wilder
08/30/2022, 11:15 PMYee
08/30/2022, 11:15 PMDylan Wilder
08/30/2022, 11:15 PMYee
08/30/2022, 11:15 PMDylan Wilder
08/30/2022, 11:16 PMYee
08/30/2022, 11:17 PMDylan Wilder
08/31/2022, 2:42 AMctx = FlyteContextManager.current_context()
state = ctx.compilation_state.with_params("", resolver=_resolver)
with FlyteContextManager.with_context(ctx.with_compilation_state(state)):
task = cls._Task(assumption_name)
But i'm unclear what the intended behavior is ie why does the task contstructor ignore the passed resolver in favor of something in the global contextKetan (kumare3)
08/31/2022, 4:13 PMDylan Wilder
08/31/2022, 4:14 PMYee
08/31/2022, 4:16 PMDylan Wilder
08/31/2022, 4:17 PMYee
08/31/2022, 4:17 PMDylan Wilder
08/31/2022, 4:17 PMYee
08/31/2022, 4:18 PMdef test_dwild():
x = BasePricesSchema.name
print(x)
Assumptions.get(version_id="abc", assumption=x)
@task
def t2(pdf: BasePricesSchema) -> int:
return len(pdf)
@workflow
def wf(version_id: str) -> int:
bp = Assumptions.get(version_id=version_id, assumption=BasePricesSchema.name)
return t2(pdf=bp)
this test produces the wrong name.def test_dwild():
x = BasePricesSchema.name
print(x)
Assumptions.get(version_id="abc", assumption=x)
# @task
# def t2(pdf: BasePricesSchema) -> int:
# return len(pdf)
#
#
# @workflow
# def wf(version_id: str) -> int:
# bp = Assumptions.get(version_id=version_id, assumption=BasePricesSchema.name)
# return t2(pdf=bp)
Dylan Wilder
08/31/2022, 4:19 PMYee
08/31/2022, 4:19 PMDylan Wilder
08/31/2022, 4:20 PMYee
08/31/2022, 4:32 PMDylan Wilder
08/31/2022, 4:42 PM