Excessive output truncated

152 views
Skip to first unread message

Hamza Coban

unread,
Dec 3, 2020, 7:52:19 AM12/3/20
to COMP541
Hi all,

While working on IJulia the output of cells are truncated after 524364 bytes. Similarly in lab5 training until success function encounters the same issue. Is there a way to increase the limit of the output to see the progress of the code?

Regards,

--
Hamza Çoban
Physics
Koc University

Deniz Yuret

unread,
Dec 3, 2020, 8:00:33 AM12/3/20
to Hamza Coban, COMP541
I recommend not working with IJulia for serious development.

--
You received this message because you are subscribed to the Google Groups "COMP541" group.
To unsubscribe from this group and stop receiving emails from it, send an email to COMP541+u...@ku.edu.tr.
To view this discussion on the web visit https://groups.google.com/a/ku.edu.tr/d/msgid/COMP541/CAOfZ_xaiNkMScATORyDpRxfdKdPa5BJaNm%2BzSpC2V6nprzk0yg%40mail.gmail.com.

BARIS BATUHAN TOPAL

unread,
Dec 3, 2020, 8:10:05 AM12/3/20
to Deniz Yuret, Hamza Coban, COMP541
Hi Hamza,

About the problem (at least for the lab assignment) you can add a new condition to print. For instance:

resim.png

the print command in train_until_all_success can be adjusted for only printing each 100th iteration after the last print. If you want to observe if a change in accuracy occurred in the intermediate steps, then you can keep a new max_total parameter and if the new total is more than max_total, you can also print. I know this is not a direct answer to your question but this solution can be used temporarily since increasing the print interval solves the problem.

Barış Batuhan Topal
M.Sc. Computer Science Student
Koç University


Osman Mutlu

unread,
Dec 3, 2020, 8:38:58 AM12/3/20
to BARIS BATUHAN TOPAL, Deniz Yuret, Hamza Coban, COMP541
Hi Hamza,

Please do not add any code outside the  "# Your code here" parts. You can use Baris's suggestion when you are testing your implementation. If your implementation is correct, all of the models in the notebook will reach 100% accuracy on training data before approximately 15000 epochs.

Best,
Osman

Hamza Coban

unread,
Dec 3, 2020, 8:48:07 AM12/3/20
to Osman Mutlu, BARIS BATUHAN TOPAL, Deniz Yuret, COMP541
Thank you for your responses! 

While implementing accuracy function I cannot update ncorrect inside a loop; thus, I change the part  push!(accuracies, ncorrect == length(gold_actions) ? 1.0 : 0.0) a little. Do you have any suggestions on updating a variable inside a for loop.

Regards,

Osman Mutlu

unread,
Dec 3, 2020, 9:15:04 AM12/3/20
to Hamza Coban, BARIS BATUHAN TOPAL, Deniz Yuret, COMP541
Hi Hamza,

You should be able to update ncorrect since you are already in a function and a for loop. You can check the julia documentation on scoping for details. You can also try using mapreduce function instead of a loop.
If all fails, please send me your code (only to me please!).

Best,
Osman

GURKAN SOYKAN

unread,
Dec 4, 2020, 4:26:40 AM12/4/20
to Deniz Yuret, Hamza Coban, COMP541
Dear Prof. Yuret,
What would you suggest in terms of IDE / editor for serious development in Julia?
Best.

On Thu, Dec 3, 2020 at 4:00 PM Deniz Yuret <dyu...@ku.edu.tr> wrote:


--
Gürkan Soykan

Deniz Yuret

unread,
Dec 4, 2020, 5:05:24 AM12/4/20
to GURKAN SOYKAN, Hamza Coban, COMP541
Emacs.

ILKER KESEN

unread,
Dec 29, 2020, 5:46:55 AM12/29/20
to Deniz Yuret, GURKAN SOYKAN, Hamza Coban, COMP541
Hi,

Related to the IDE question, I've been experimenting with Visual Studio Code recently. You can use it for Julia, too. I really liked it.

- Autocompleting, snippets, on the fly pop-up documentation features come by default.
- In backtraces, I can click on the filename (Ctrl+Click) and open the file on the editor.
- It has a good Remote SSH plugin.
- You can use Emacs/Vi keybindings.
- It has its own Jupyter interface and integrated terminal.
- It has an awesome git plugin (second best after Emacs plugin Magit).

Though, for beginners I DO NOT RECOMMEND it. Since IDEs hide many things from users, so you learn less. Emacs is the most powerful editor, but I recommend Vi/Vim for people who don't know both: (i) it is present on nearly all the machines, (ii) easy to learn/use once you learn how to quit, (iii) no endless customization rabbit hole. Never use Jupyter Notebooks for development since you don't have the power of the editor.

Best.
- ilker

VOLKAN AYDINGUL

unread,
Dec 29, 2020, 6:37:01 AM12/29/20
to ILKER KESEN, Deniz Yuret, GURKAN SOYKAN, Hamza Coban, COMP541
Hi,

As an addition to the İlker's answer, VS Code also provides a very detailed profile view of the desired function via using the ´@prof_view´macro. An example snapshot can be observed below:
prof_view.PNG
 
Also, it provides inlined timing results of certain lines of the code when you accessed them from the above cpuprofile list, as can be observed below:

timing.PNG


Best regards,
Volkan Aydıngül


GURKAN SOYKAN

unread,
Dec 29, 2020, 1:36:24 PM12/29/20
to VOLKAN AYDINGUL, ILKER KESEN, Deniz Yuret, Hamza Coban, COMP541
Dear Ilker and Volkan,
Thank you for sharing such insights about VS Code.
I had used it with Julia Lang as well. However, debugging was extremely buggy for some reason. 
Do you also experience the same phenomenon?
As a side note, I am trying to adapt to the jupyter lab instead of jupyter notebooks, and its IDE-like features and extensions are really useful.
Best regards.

VOLKAN AYDINGUL

unread,
Dec 29, 2020, 4:37:47 PM12/29/20
to GURKAN SOYKAN, ILKER KESEN, Deniz Yuret, Hamza Coban, COMP541
Dear Gürkan,

As you mentioned, I have also experienced a buggy debugging environment. Unfortunately, because of the rush I am currently experiencing due to the project :), I could not fully investigate a work-around. However, I believe that, after some configuration inside the VSC, it will also work fine. To compensate for the lack of the debugger, I am using the Julia Explorer that also VS Code provides. It displays everything you passed to the ´Main´ module. Currently, it helps me a lot to investigate the behaviors of my functions, and modules, etc.

I hope it helps.

Best regards,
Volkan Aydıngül

Reply all
Reply to author
Forward
0 new messages