I want to centralize all self definded Datatype ba...
# ask-the-community
r
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.
s
Sorry, haven't understood your problem. Is it possible for you share the code and explain what you're trying to do?
r
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. @Samhita Alla
s
So you want to import dataclass defined in a different file into the file that has your workflow?
r
@Samhita Alla yes
s
You just can say:
from .base_hyperparams import BaseHyperparams
r
thanks, my syntax is not have the dot and i cant run it. thank you @Samhita Alla