Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potenial ploting issue inside Rstudio #91

Open
Cdk29 opened this issue Dec 22, 2020 · 3 comments
Open

Potenial ploting issue inside Rstudio #91

Cdk29 opened this issue Dec 22, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@Cdk29
Copy link
Contributor

Cdk29 commented Dec 22, 2020

Hi again.

Running the following :

path_img = 'cassava-leaf-disease-classification/train_images/'
#library(data.table)
labels<-read_csv('cassava-leaf-disease-classification//train.csv')
head(labels)
dataloader <- fastai::ImageDataLoaders_from_df(df=labels, path=path_img, bs=8, seed=6,
                                               num_workers=0, 
                                               item_tfms = Resize(448),
                                               batch_tfms = aug_transforms(size=224, min_scale=0.75))
dataloader %>% show_batch()
learnR <- dataloader %>% cnn_learner(xresnet50(), metrics = accuracy,  model_dir="fastai_model/") #prettier
learnR$to_fp16()
learnR$freeze()
learnR %>% lr_find()
learnR %>% plot_lr_find(dpi = 200)

I can knit and got a md document with the graphs. However, running the cells of the rmarkdown document will not output anything below the line Or inside the plots panels. (while it will happen with keras for example).

I do not know for sure if this is a local config problem, or a change introduced by the commit 8594699.

@Cdk29
Copy link
Contributor Author

Cdk29 commented Dec 22, 2020

Session info :

R version 4.0.2 (2020-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.10

Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
[1] LC_CTYPE=fr_FR.UTF-8 LC_NUMERIC=C LC_TIME=fr_FR.UTF-8 LC_COLLATE=fr_FR.UTF-8
[5] LC_MONETARY=fr_FR.UTF-8 LC_MESSAGES=fr_FR.UTF-8 LC_PAPER=fr_FR.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] fastai_2.0.3 forcats_0.5.0 stringr_1.4.0 dplyr_1.0.2 purrr_0.3.4 readr_1.4.0 tidyr_1.1.2
[8] tibble_3.0.4 ggplot2_3.3.2 tidyverse_1.3.0

loaded via a namespace (and not attached):
[1] httr_1.4.2 pkgload_1.1.0 jsonlite_1.7.2 modelr_0.1.8 assertthat_0.2.1 cellranger_1.1.0
[7] yaml_2.2.1 remotes_2.2.0 sessioninfo_1.1.1 pillar_1.4.7 backports_1.2.1 lattice_0.20-41
[13] glue_1.4.2 reticulate_1.18-9000 digest_0.6.27 rvest_0.3.6 colorspace_2.0-0 htmltools_0.5.0
[19] Matrix_1.2-18 pkgconfig_2.0.3 devtools_2.3.2 broom_0.7.2 haven_2.3.1 scales_1.1.1
[25] processx_3.4.5 generics_0.1.0 usethis_2.0.0 ellipsis_0.3.1 withr_2.3.0 cli_2.2.0
[31] magrittr_2.0.1 crayon_1.3.4 readxl_1.3.1 memoise_1.1.0 evaluate_0.14 ps_1.5.0
[37] fs_1.5.0 fansi_0.4.1 xml2_1.3.2 pkgbuild_1.1.0 tools_4.0.2 prettyunits_1.1.1
[43] hms_0.5.3 lifecycle_0.2.0 munsell_0.5.0 reprex_0.3.0 callr_3.5.1 compiler_4.0.2
[49] rlang_0.4.9 grid_4.0.2 rstudioapi_0.13 rappdirs_0.3.1 rmarkdown_2.5 testthat_3.0.0
[55] gtable_0.3.0 curl_4.3 DBI_1.1.0 R6_2.5.0 lubridate_1.7.9.2 knitr_1.30
[61] rprojroot_2.0.2 desc_1.2.0 stringi_1.5.3 Rcpp_1.0.5 vctrs_0.3.5 png_0.1-7
[67] dbplyr_2.0.0 tidyselect_1.1.0 xfun_0.19

@turgut090
Copy link
Member

Thanks, I am using the following package grid and it has an issue with rmarkdown. This is why you cannot see them (graphs/plots) while executing a cell

library(tiff)
img <- readTIFF(system.file("img", "Rlogo.tiff", package="tiff"))
grid::grid.raster(img)

If you have a library that works for Mac, Linux, Windows we can switch to it.

@Cdk29
Copy link
Contributor Author

Cdk29 commented Dec 22, 2020

If I come up with an idea I will PR.

@turgut090 turgut090 added the bug Something isn't working label Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants