I want to centralize all self definded Datatype ba...
# flyte-support
f
I want to centralize all self definded Datatype based on python object only by using @dataclass_json @dataclass or . That mean all datatype I will push in 1 folder such as datatype_flyte. Then the workflow which want to use any datatype in folder datatype_flyte will import its. but when do that, the job registration the workflow which import the external module in localhost such as datatype_flyte cannot be understood. How to deal with this problem.
t
Sorry, haven't understood your problem. Is it possible for you share the code and explain what you're trying to do?
f
Here, I want to defind all mydata struct like this in 1 folder flyte_dataclass, and i want to import it to the workflow which need to use that datastruct. The datastruct which base on typing or dataclass are not needed to resigeter in Flyte native type engine. @tall-lock-23197
t
So you want to import dataclass defined in a different file into the file that has your workflow?
👍 1
f
@tall-lock-23197 yes
t
You just can say:
from .base_hyperparams import BaseHyperparams
f
thanks, my syntax is not have the dot and i cant run it. thank you @tall-lock-23197
👍 1