helpful-jelly-64228
05/01/2025, 11:11 AM{
"cpus": 16,
"mesh_result": {
"instance_info": {
"instance_id": "...",
"public_ip": "..."
},
"mesh_log": {
"path": "<s3://flytecfd-bucket/task-data/mesh-dir-6d95f0d05e21457aa117451cbf4ffdfe/mesh/mesh.log>"
},
"mesh_dir": {
"path": "<s3://flytecfd-bucket/task-data/mesh-dir-6d95f0d05e21457aa117451cbf4ffdfe/mesh/constant/polyMesh/>"
}
},
"cases": {
"case_aoa_01.00": {
"type": "multi-part blob",
"uri": "<s3://flytecfd-bucket/task-data/cases-dir-29b204be507a48e79a657657beb1e1f3/case_aoa_01.00/>"
}
}
}
Here the mesh_log and mesh_dir is part of a dataclass and is working as expected and FlyteDirectory and FlyteFile is initailized the same way.
@dataclasses.dataclass
class MeshResult:
instance_info: InstanceInfo
mesh_log: FlyteFile
mesh_dir: FlyteDirectory
def start_solvers_wf(
cases: dict[str, FlyteDirectory], mesh_result: MeshResult, cpus: int
)
Any idea what could be causing this?broad-monitor-993
05/01/2025, 1:58 PMdict[str, FlyteDirectory]
and the one consuming ithelpful-jelly-64228
05/01/2025, 3:13 PMimport flytekit as fl
from flytekit import FlyteDirectory
@fl.task
def output_directory(name: str, dir: FlyteDirectory):
print(f"Output Directory Name: {name}, Directory Path: {dir.path}")
@fl.dynamic
def test_subtask(
test_dict: dict[str, FlyteDirectory],
flyte_directory_path: FlyteDirectory,
flyte_directory_from_source_path: FlyteDirectory,
)->None:
output_directory(name="flyte_directory_path", dir=flyte_directory_path)
output_directory(name="flyte_directory_from_source_path", dir=flyte_directory_from_source_path)
for k, v in test_dict.items():
output_directory(name=k, dir=v)
@fl.task
def get_dir_task()->dict[str, FlyteDirectory]:
return {
"path": FlyteDirectory(path="<s3://flytecfd-bucket/ronny-input/>"),
"from_source": FlyteDirectory.from_source("<s3://flytecfd-bucket/ronny-input/>")
}
@fl.dynamic
def test_task_wf() -> None:
test_subtask(
test_dict=get_dir_task(),
flyte_directory_path=FlyteDirectory(path="<s3://flytecfd-bucket/ronny-input/>"),
flyte_directory_from_source_path=FlyteDirectory.from_source("<s3://flytecfd-bucket/ronny-input/>")
)
So its kind of solved for now, thanks!