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

Python (reticulate) variables pane not updating after changes from R #4869

Open
kv9898 opened this issue Oct 2, 2024 · 3 comments
Open

Python (reticulate) variables pane not updating after changes from R #4869

kv9898 opened this issue Oct 2, 2024 · 3 comments
Assignees
Labels
area: reticulate Issues related to the reticulate extension

Comments

@kv9898
Copy link

kv9898 commented Oct 2, 2024

System details:

Windows 11

Positron and OS details:

Positron Version: 2024.09.0 (system setup) build 103
Code - OSS Version: 1.93.0
Commit: 8274fe2
Date: 2024-09-30T02:46:12.087Z
Electron: 30.4.0
Chromium: 124.0.6367.243
Node.js: 20.15.1
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.22631

Interpreter details:

R 4.4.1
Python(Venv: r-reticulate): 3.11.4

Describe the issue:

When Python (reticulate) variables are updated from the R end, the variable pane is not updated, even when a different variable is updated through the Python console.

Steps to reproduce the issue:

  1. Run reticulate::py_run_string("a=1") in R console
  2. Switch to the Python (reticulate) interpreter
  3. No variable is displayed in the pane.
  4. Run print(a) in the Python console
  5. The correct value 1 is printed, but the variable pane is not updated.
  6. Run b=1 in the Python console
  7. variable b is displayed in pane, but a is still not shown.

Expected or desired behavior:

Variable panes are updated whenever there is a change in the interpreter

Were there any error messages in the UI, Output panel, or Developer Tools console?

None

@kv9898
Copy link
Author

kv9898 commented Oct 2, 2024

As a sidenote, I found that after I enabled the "reticulate" functionality of Positron, Positron initiates the reticulate environment when it boots. This is a bit problematic if I want to choose a different environment (I have to start R). Is this worth opening a separate issue?

This is opened as a separate issue in #4870.

@dfalbel dfalbel added the area: reticulate Issues related to the reticulate extension label Oct 2, 2024
@dfalbel dfalbel self-assigned this Oct 2, 2024
@dfalbel
Copy link
Contributor

dfalbel commented Oct 2, 2024

Hi @kv9898 ! Thanks for trying it out and for the bug report. I think it's worth opening a separate issue with more details and what behavior you'd have expected.

I'd also love to listen to your overall thoughts and impressions on the reticulate feature. Even if not directly actionable items. Thank you!

@kv9898
Copy link
Author

kv9898 commented Oct 2, 2024

Hi @kv9898 ! Thanks for trying it out and for the bug report. I think it's worth opening a separate issue with more details and what behavior you'd have expected.

I'd also love to listen to your overall thoughts and impressions on the reticulate feature. Even if not directly actionable items. Thank you!

Sure, I will open another issue shortly after more experiments to get things clearer.

In terms of the overall impression, I agree with #3920 (comment) that this is a "killer functionality". I was even so desperate to try it out that I couldn't wait for the pre-release build and even forked the Positron repo and try to build from the workflow (I failed, probably because I'm a noob to github workflows).

Sadly, as a Political Science student, there aren't a lot of multilingual opportunities for myself. The only use case for my so far is running TensorFlow/Keras in R, as it is a wrapper for Python. In this case it is helpful to use the reticulate Python interface for debugging, etc.

Ironically, my main issue with using reticulate in Python was that the output was not shown on Windows (#4580). I didn't expect a quick solution since that issue was added to the Future milestone and the reticulate support feature came as (in a positive sense) an overkill. It's good news for me that I can go to the Python console to see what's been printed :)

Finally, I want to say that I love the Positron team for my past interactions with you. I can always expect response to my issue within one working day, which doesn't hold for many other projects. I have actually been using Positron as my main IDE and recommending it to my friend. Weirdly enough, I kinda feel like I'm entrapped by the Posit ecosystem (Positron, shiny, tidyverse, Quarto) even though I've been trying to become bilingual in both R and Python. This company just weirdly covers all of my data science workflows haha.

@timtmok timtmok added this to the Release Candidate milestone Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: reticulate Issues related to the reticulate extension
Projects
None yet
Development

No branches or pull requests

3 participants