Spaces:
Runtime error
Runtime error
File size: 444 Bytes
a22e84b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
from pathlib import Path
from typing_extensions import Annotated
from zenml import step
from llm_engineering.infrastructure.files_io import JsonFileManager
@step
def to_json(
data: Annotated[dict, "serialized_artifact"],
to_file: Annotated[Path, "to_file"],
) -> Annotated[Path, "exported_file_path"]:
absolute_file_path = JsonFileManager.write(
filename=to_file,
data=data,
)
return absolute_file_path
|