REPL print overshadow after sampling. #112
Comments
Which terminal are you using? I'm guessing you are on Windows? Can you use the Powershell? |
I am using VScode and julia addon/interface. |
@justinjoliver Are you asking for the |
Can you send me the script you are trying to run? |
Just ran a simple script on VSCode, including a call to I'll check a bit if that would be feasible in VSCode. |
Ok, just installed PowerShell on my system and then installed it in VSCode. If I then run a Julia script, pwsh seems to turn into the Julia REPL. Guess that's the closest I can come to emulate Windows on my system. I'm assuming you can start a Julia REPL and execute non-Cmdstan scripts in that REPL? |
Above you write "That is what I am trying to see". You mean the output of stansummary by calling |
So, I can execute any operations. The issue is not related to the operation of Stan, but relates to what happens afterwards. After I run the Stan model, my REPL is covered by the the text shown in the image - instead of command line starting with 'julia>' FYI - I was running example bernoulli example. |
Hi Justin, Great, what I'm trying to find out is what step in executing a script causes the shell to go nuts. E.g. can you execute line by line below program, e.g. by copy-pasting into the REPL?
|
Ah, got you. Hope I can be more helpful. I have executed the program above. The phenomenon starts with the line,
As you can see from the image below. Because the sample prints the long dataframe, I have cut the image and am showing the rest below, Hope this helps, and thank you so much for the (very very timely) troubleshoot. I really appreciate it! |
One more, hopefully quick test. Can you replace the lines after the data definition by:
|
In above test I have explicitly disabled running Have you ever tried something like:
If that works fine, we know for sure it is caused by something in CmdStan.jl because in the first run |
If you click on what is showing |
For the first: I only see 'Julia REPL' |
Can you select |
Not sure if you then have to restart VSCode. I noticed in the latest test script I forgot to include
Update: But with |
What would also help me if you could send the output of both |
Did with windows powershell - same deal. Did included Statistics when I saw the functions. My version info:
ENV
|
Justin, when you restart VSCode and start a Terminal (not the Julia REPL, but e.g. using the |
Powershell |
Hmmm, I'm running out of ammunition. As a last attempt, can you run a In either case, my next step will be to ask on Julia Discourse if someone else has ran into this issue. |
Ok, some interesting responses on my question on Discourse. It looks like externally spawned commands occasionally disable the handling of escape characters. And VSCode is directly spawning the Julia REPL, so my suggestion to switch to Powershell couldn't work I guess. A very simple test from above request for help: "I wanted to use the REPL shell mode (type ";" in the REPL, key to get out of it) to call cygwin programs":
"but the teminal mode in the julia repl gets screwed up. A sort of work around is to use the windows cmd.exe to indirectly call the desired program like this":
Can you try above quick test? If so, this is a bigger problem than calling On going through the code in CmdStan.jl, I noticed this should have been fixed some time ago. The command line commands I'm using to run cmdstan is stored in On unix-like systems the commands should look like:
On Windows these should look like:
Would you mind also checking that on your system? Just type It's very unfortunate I can't test any of this myself. But it would be really nice if VSCode + StanJulia would work on Windows! |
From Tim I understand the combination of Stan.jl (.e.g. StanSample.jl etc.) + VSCode + Windows work ok. I wonder if that is another solution for you:
Definitely still interested in above output, but I'm afraid fixing CmdStan + VSCode + Windows might take a bit longer. It really should be fixed in VSCode or the Julia extension for VSCode. |
Hi,
I am using the latest version of CmdStan.jl an Stan - 2.26.
Seems like wrapper is at work, but I am having some interface issue. After the first run, my julia REPL gets 'shadowed' by what it seems like an output. I can't really see anything after the run and I can't get it to disappear (tried print, read lines, escape, etc...). See the image below.
Any idea how I can troubleshoot this?
Thanks in advance.
The text was updated successfully, but these errors were encountered: