From 0650741ae6b865e14331b426005c82e4d2bba5b0 Mon Sep 17 00:00:00 2001 From: Dilara Gokay Date: Thu, 6 Jun 2024 14:57:01 +0100 Subject: [PATCH] Replace tfds.core.ReadWritePath with epath.Path. (#326) --- challenges/movi/movi_e.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/challenges/movi/movi_e.py b/challenges/movi/movi_e.py index 9b84ee30..c396a8b4 100644 --- a/challenges/movi/movi_e.py +++ b/challenges/movi/movi_e.py @@ -16,14 +16,14 @@ import dataclasses import json import logging +from typing import Dict, List, Union +from etils import epath import imageio import numpy as np import png - import tensorflow as tf import tensorflow_datasets.public_api as tfds -from typing import List, Dict, Union _DESCRIPTION = """ @@ -576,11 +576,11 @@ def is_complete_dir(video_dir, layers=DEFAULT_LAYERS): return True -PathLike = Union[str, tfds.core.ReadWritePath] +PathLike = Union[str, epath.Path] -def as_path(path: PathLike) -> tfds.core.ReadWritePath: - """Convert str or pathlike object to tfds.core.ReadWritePath. +def as_path(path: PathLike) -> epath.Path: + """Convert str or pathlike object to epath.Path. Instead of pathlib.Paths, we use the TFDS path because they transparently support paths to GCS buckets such as "gs://kubric-public/GSO".