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
tall-lock-23197
11/01/2023, 5:14 AM
Sorry, haven't understood your problem. Is it possible for you share the code and explain what you're trying to do?
f
full-evening-87657
11/01/2023, 5:19 AM
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
tall-lock-23197
11/01/2023, 5:26 AM
So you want to import dataclass defined in a different file into the file that has your workflow?
👍 1
f
full-evening-87657
11/01/2023, 5:32 AM
@tall-lock-23197 yes
t
tall-lock-23197
11/01/2023, 5:54 AM
You just can say:
from .base_hyperparams import BaseHyperparams
f
full-evening-87657
11/01/2023, 7:02 AM
thanks, my syntax is not have the dot and i cant run it. thank you @tall-lock-23197