Closed felixg3 closed 1 year ago
Hi @felixg3,
Regularization takes a long time. Thus, a short lived MPC token could expire before the operation is completed leading to the problem you reported. Using a longer-lived token will in general solve the problem. We have added the option of including your MPC token in sits version 1.4.0 (currently under development). To install the current development version, please use: devtools::install_github("e-sensing/sits@dev")
.
To include your longer-lived token you need to add an environmental variable with the token as follows: Sys.setenv("MPC_TOKEN" = "YOUR-TOKEN")
. Including your longer-lived token should solve the problem of long delay in accessing data from MPC.
In general, regularization is faster when the original data has been downloaded from the MPC cloud to a temporary storage in a local environment. This is true both when running on a virtual machine in the Azure Cloud or when running on a local computer.
Hi @felixg3,
Regularization takes a long time. Thus, a short lived MPC token could expire before the operation is completed leading to the problem you reported. Using a longer-lived token will in general solve the problem. We have added the option of including your MPC token in sits version 1.4.0 (currently under development). To install the current development version, please use:
devtools::install_github("e-sensing/sits@dev")
.Thank you very much for your quick reply. To clarify: the regularisation happens in an endless loop on my local machine and happens successfully on MPC. On my local device, nothing is written to the disk/output dir. I checked permissions and what I could think of with Linux issues in general.
By the way, is it possible to save the temporary output (the output parameter) to an external blob storage like with AzurStor? Or does it only support local directories?
To include your longer-lived token you need to add an environmental variable with the token as follows:
Sys.setenv("MPC_TOKEN" = "YOUR-TOKEN")
. Including your longer-lived token should solve the problem of long delay in accessing data from MPC.Thank you, I'll try it out. Maybe I can open a PR to append the documentation?
In general, regularization is faster when the original data has been downloaded from the MPC cloud to a temporary storage in a local environment. This is true both when running on a virtual machine in the Azure Cloud or when running on a local computer.
Does sits_cube() download the data or does it create an index only that is then later queried by sits_regularize()?
Hi @felixg3 sits_cube() does not download the data; as you stated, it stores the addresses of the files (usually in the cloud) which are then used by sits_regularize() to produce a regular data cube. Please use sits_cube_copy() to copy the contents of a data cube.
Thank you so much for your assistance. I hope I did not bother you by framing my questions in a bug report.
However, I am still wondering why sits_regularize() works well in the cloud environment and not on my local machine. I assume that within the MPC there are no rate limits due to no egress traffic for Microsoft, while my local machine would need to use the MPC token. I will test it today and share the results.
kein Problem!! We are always pleased to help.
Describe the bug When attempting to regularize a data cube with sits_regularize(), I receive the error:
Tiles 144051 (BLUE, GREEN, NIR08, RED, SWIR16, SWIR22), 143051 (BLUE, GREEN, NIR08, RED, SWIR16, SWIR22) .
Weirdly enough, the CLOUD band is missing in this error message. If I let R run, it does not write data to the disk and the process continues for many hours.To Reproduce Edit: When running sits_regularize() on Microsoft Planetary Computer JupyterLab, the first run takes quite some time. On my local environment, the first run finishes within a few seconds. The following code produces the error in my local environment. The same issue is not reproducible in the other environment (MPC JupyterLab) I posted at the end of this bug report. test-environment.zip
If reporting a change from previous versions
Please read https://cran.r-project.org/web/packages/sits/news/news.html first.
Additional context Add any other context about the problem here. Environment where the error comes up:
Environment where the error is NOT reproducible