Skip to content

Knostromo/azure-shiny-upload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Shiny fileInput Issues/Tests on Azure ML Compute Instance

Background

  • There might be unannounced changes on Azure ML compute instance during May/June 2022

  • Initially the fileInput function (from shiny) stopped working

    • I only tested xlsx, xls and csv files. There might be more issues with other filetypes
    • the SHA uploaded of the uploaded files will be different.
  • Then Azure ML compute instance would just stopped provisioning RStudio

    • As of today (29-Jun-2022),
      • Azure docs doesn't mention this or the rational behind this.
      • the custom application approach of add RStudio doesn't work e.g. it can't access the folders/files on the compute instance.
  • I have created this app to test/check what actually happen to the uploaded file

    • Specifically I look at these properties of the uploaded file:
      • location
      • SHA
      • Estimated file encoding
      • if possible render table output

Shiny Upload App

  • Clone the repo to your machine/env.

  • Run the app as standard shiny app

  • I have used the iris dataset as test data in different formats, these are located in the /DATA

  • I have tested in various environments, so far it is working fine except in Azure ML Compute Instance

  • For example, if I run it locally:

    • XLSX
      • image
    • XLS
      • image
    • CSV
      • image
    • The SHA of the uploaded files matched and all table outputs worked.

Azure ML Compute Instance specific issues

  • If you run the same app on Azure ML compute instance, you will see the SHAs are different.
    • XLSX
      • image
    • XLS
      • image
    • CSV
      • image
    • All SHA of the uploaded files are different, but ASCII based files (e.g. CSV) still works.
    • NOTE this used to work fine on Azure until ~ mid-May 2022 (I think)

File encoding for reference

  • These are the estimated encoding of the raw test data
           iris.csv iris.xls       iris.xlsx
encoding   "ASCII"  "windows-1250" "ASCII"  
confidence 1        0.22           1        
  • Source code
sapply(list.files("DATA/"), function(x) {
  readr::guess_encoding(paste0("DATA/",x))
  })

Repo Structure

.
├── [   0]  DATA ** <- Sample Data**
│   ├── [3.8K]  iris.csv
│   ├── [ 36K]  iris.xls
│   └── [9.4K]  iris.xlsx
├── [   0]  R
│   └── [1.8K]  app.R
└── [ 730]  README.md

Languages