azuremountazure-databrickstfrecord

Azure Databricks working with mounted blobs in Python


I've mounted a container (which contains tfrecords) to my Azure Databricks notebook with a shared access signature. Everything seems to be okay so far, since I can see my blobs if I run dbutils.fs.ls("dbfs:/mnt/testmount").

However, I seem to be missing something fundamental here. I wish to train a model with the tfrecords from my mount, but it seems like I can't just access them outright with a path name, like dbfs:/mnt/testmount/<my_files> or simply /mnt/testmount/<my_files>.

Is there some other way to do this? Perhaps the mounting way is wrong?


Solution

  • try this

    filePath = 'dbfs/mnt/testmount/'
    
    or 
    
    filePath = '/dbfs/mnt/testmount/'
    

    In some cases dbutils.fs.ls("dbfs:/mnt/testmount/") doesn't work