Skip to content

Commit

Permalink
Merge pull request #13784 from DevinTDHa/bug/dbfs
Browse files Browse the repository at this point in the history
Fix loadSavedModel for DBFS
  • Loading branch information
maziyarpanahi authored May 10, 2023
2 parents 2153a06 + d30652d commit b8a8cb1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ object ResourceHelper {
case class SourceStream(resource: String) {

var fileSystem: Option[FileSystem] = None
private val (pathExists, path) = OutputHelper.doesPathExists(resource)
private val (pathExists: Boolean, path: Option[Path]) = OutputHelper.doesPathExists(resource)
if (!pathExists) {
throw new FileNotFoundException(s"file or folder: $resource not found")
} else {
Expand Down Expand Up @@ -156,7 +156,7 @@ object ResourceHelper {
Paths.get(destination.toString, path.get.getName).toUri
else destination.toUri
case "dbfs" =>
val dbfsPath = path.toString.replace("dbfs:/", "/dbfs/")
val dbfsPath = path.get.toString.replace("dbfs:/", "/dbfs/")
val sourceFile = new File(dbfsPath)
val targetFile = new File(destination.toString)
if (sourceFile.isFile) FileUtils.copyFileToDirectory(sourceFile, targetFile)
Expand Down

0 comments on commit b8a8cb1

Please sign in to comment.