News for hackers. Stuff that matters.
Re:Advanced computing with IPython by chrxr on Tuesday June 05, 2018 @09:19AM (#17237318)
At Harvard we've built out an infrastructure to allow us to deploy JupyterHub to courses with authentication managed by Canvas. It has allowed us to easily deploy complex set-ups to students so they can do really cool stuff without having to spend hours walking them through setup.

Instructors are writing their lectures as IPython notebooks, and distributing them to students, who then work through them in their JupyterHub environment.

Our most ambitious so far has been setting up each student in the course with a p2.xlarge machine with cuda and TensorFlow so they could do deep learning work for their final projects.

We supported 15 courses last year, and got deployment time for an implementation down to only 2-3 hours.

In conclusion, IPython good, JupyterHub good.

Edit: surfacing the link to the open source repo on GitHub https://github.com/harvard/cloudJHub

Re:Advanced computing with IPython by chrxr on Tuesday June 05, 2018 @09:25AM (#17237350)
It is worth noting that there is an argument that it is a worthwhile task for students to learn how to setup complex computing environments, as it better prepares them for the real world. However, in reality, there just isn't time within a single semester to do this for a class of 100+ students. So implementations such as this one trade-off that learning for a greater focus on computational theory and its implementations.
Re:Advanced computing with IPython by cirgue on Tuesday June 05, 2018 @09:45AM (#17237506)
It’s a good experience, but a motivated student who’s good at charging through docs can do it on their own. Having to manage that for a class that’s intended to teach conceptual material would be a big time-sink.
Re:Advanced computing with IPython by pm90 on Tuesday June 05, 2018 @02:11PM (#17240421)
Its a valid point to consider that as part of the learning experience. I don't think that students with limited time should be forced to go through that though. If you get them hooked on to computing, their natural curiosity would lead them to explore it further. Bogging them down with unnecessary setup stuff would probably only make them think that this shit takes way too much effort etc.

I've had many courses that were bogged down by software setup issues in college; I would rather than not be the case.

Re:Advanced computing with IPython by bunderbunder on Tuesday June 05, 2018 @07:25PM (#17243051)
Same here.

I want to say that, if it's pedagogically valuable, then it needs to be made into a small lab course (or part of the lab unit for an intro class), and taught once, in an organized manner.

And then stop letting professors hide behind this lame excuse so that they can get on with teaching the stuff that their course is actually about.

Re:Advanced computing with IPython by w0m on Tuesday June 05, 2018 @09:59AM (#17237605)
Agreed. At the beginning of class, walk students through the setup. Then for every project after, let them use the pre-rolled systems.
Re:Advanced computing with IPython by kaitai on Tuesday June 05, 2018 @11:46AM (#17238785)
I'd actually do the opposite. Let them use pre-rolled first, then when they actually know and care about how the system is set up, have them set it up the way they like it.

(I am actually leading a machine learning for high-schoolers camp in 2 weeks and we are using Jupyter notebooks so that all students, with heterogeneous backgrounds, will start in the same place and get to the fun stuff fast. Many will never have used Python and will not know or care about 2.7 vs 3, just to give the most high-level and basic example!)

Re:Advanced computing with IPython by meko on Tuesday June 05, 2018 @07:24PM (#17243042)
I wish I had ML camps growing up! Mine were photography and adobe flash :<
Re:Advanced computing with IPython by nerpderp83 on Tuesday June 05, 2018 @12:22PM (#17239210)
Setup is orthogonal to understanding and learning, leave it for extra credit or an optional follow up exercise. It will lose or distract many students.
Re:Advanced computing with IPython by killaken2000 on Tuesday June 05, 2018 @10:39AM (#17238033)
I think at the very least they should be able to see someone do it so they know what steps are involved. Possibly a video with steps but stated that it isn't the focus of the class.
Re:Advanced computing with IPython by adamsea on Tuesday June 05, 2018 @01:28PM (#17239969)
Depends what that particular course is supposed to teach. Stats, maybe some sort of intro course, or a programming course intended for non-CS majors are all courses where it could make sense to abstract away setting up complex environments -- just like how, in the business world, companies (SAS, etc) make tons of money abstracting away complex environments so businesses can have their employees focus on what provides value in that context.
Re:Advanced computing with IPython by chrxr on Tuesday June 05, 2018 @03:17PM (#17241040)
The majority of the courses that utilize JupyterHub at the moment involve some kind of stats work. They use JupyterHub to ease people with little technical experience into using stats libraries and coding generally, with the aim of giving them a high-level knowledge of CS principles and techniques.

An exception would be the example of the deep learning project work. In this case JupyterHub was utilized as an easy way to deploy a centrally managed, cost effective environment for a large class to use GPU resources without the risk of running up huge AWS costs for each student.

Re:Advanced computing with IPython by akhilcacharya on Tuesday June 05, 2018 @07:59PM (#17243259)
It's Harvard. They'll figure it out if push comes to shove.
Re:Advanced computing with IPython by da_chicken on Tuesday June 05, 2018 @09:28AM (#17237370)
I'm torn. On the one hand that's really cool to get everything configured and up and running so students can get to the interesting parts. On the other hand, learning how to configure your own environment is kind of an essential part of working with any tool that forces you to understand at least some of the structure involved.
Re:Advanced computing with IPython by sametmax on Tuesday June 05, 2018 @12:18PM (#17239158)
If you have 100 students, you will have 100 different mistakes to debug in the setup. A setup is not a program, there is rarely an easy way to pinpoint a problem, and so it takes a lot of time to setup just one, let alone a 100.

When the number of hours are limited, it's best to skip it entirely, and just provide a solid paper tutorial.

Re:Advanced computing with IPython by nightski on Tuesday June 05, 2018 @01:47PM (#17240193)
I'm so glad my college had class sizes of 10-15 and not 100, what a waste of money.
Re:Advanced computing with IPython by chrxr on Tuesday June 05, 2018 @03:39PM (#17241299)
Average class size of those using JupyterHub was more like 30, excluding two very large, very popular classes. Worth remembering all the classes have labs and sections which are much smaller.
Re:Advanced computing with IPython by akhilcacharya on Tuesday June 05, 2018 @08:07PM (#17243301)
> what a waste of money.

Uh, you know its Harvard we're talking about right?

Re:Advanced computing with IPython by nightski on Wednesday June 06, 2018 @02:24PM (#17249652)
Yes, especially because it's Harvard. It should be better than that given its cost and endowment.
Re:Advanced computing with IPython by nl on Tuesday June 05, 2018 @04:49PM (#17241896)
(Professional ML developer here)

It's almost a waste of time teaching people to setup a deep learning stack.

NVidia will break everything you do with every release and any instructions you write will be outdated in weeks.

For example, the TensorFlow/CUDA/CuDNN installation changes continually because you can't install the default releases of any of them and get a working system.

Re:Advanced computing with IPython by mikepurvis on Tuesday June 05, 2018 @10:49AM (#17238148)
If you're already exposed to what the working system looks like and you later on have to follow the setup tutorial to get it going yourself, that's much easier than starting from scratch. And it's more motivating too, since you know more of what the end result will give you vs hoping that it helps you solve the problem at hand.
Re:Advanced computing with IPython by commandlinefan on Tuesday June 05, 2018 @10:55AM (#17238215)
On the third hand, it's helpful (maybe ideal) to see somebody else do it, see what it looks like and how it ought to behave before trying to set it up yourself. But of course, at some point, you should do everything yourself.
Re:Advanced computing with IPython by chrxr on Tuesday June 05, 2018 @09:29AM (#17237380)
That is a fair point. Please see my reply to my post.
Re:Advanced computing with IPython by da_chicken on Tuesday June 05, 2018 @09:41AM (#17237474)
Ah, that wasn't there when I replied.

I do understand the dilemma. I work at a K-12 and the office next to mine is where they put together the science lab kits for students. It takes a fair bit of understanding to do that correctly sometimes, and that preparation work is some knowledge the students seem to miss out on in order to get to the subject matter. My coworker has mentioned on more than one occasion that with certain modules it feels like she does most of the work and the students just do the final step.

Re:Advanced computing with IPython by chrxr on Tuesday June 05, 2018 @09:47AM (#17237524)
I can appreciate that feeling; my father was an electronics teacher in secondary school in the UK.

It is true that we had to deal with some issues that might not have occurred had students gone through the process of setting up the environment themselves, like have to rebuild the machine of the student who uninstalled Cuda.

Re:Advanced computing with IPython by akhilcacharya on Tuesday June 05, 2018 @08:00PM (#17243264)
>Our most ambitious so far has been setting up each student in the course with a p2.xlarge machine with cuda and TensorFlow so they could do deep learning work for their final projects.

Wow! How expensive was this? Do you do any sort of shutdown/startup work or use pre-empt instances?

Re:Advanced computing with IPython by chrxr on Tuesday June 05, 2018 @08:08PM (#17243306)
The answer for this particular course was, "very expensive". Each students machine shuts down after 20 minutes of inactivity (defined as no Jupyter process currently running), so that saves money, but in this specific instance many of the students were running extremely long jobs, so that didn't really help us.

The average cost over all of the other courses was something like $2-3 per month per student. The deep learning course ended up being closer to $20 per student. Thanks to Amazon Educate almost the entire cost was covered with credit.

Re:Advanced computing with IPython by akhilcacharya on Tuesday June 05, 2018 @09:05PM (#17243597)
Interesting. Do you think your use case could be helped by doing only the training remotely on a single GPU/GPU cluster, and doing the rest of the development work on a cheaper machine? (basically just equivalent of estimator train() runs on a faster machine that quits afterward).

I wrote a tool that does that with Keras but I'm not sure if it's actually useful for real-world use cases.

Re:Advanced computing with IPython by jpetrucc on Tuesday June 05, 2018 @09:23PM (#17243692)
I saw your repo a few months ago when looking at implementing something similar! A lot of the things in the development notes seem to have been solved or improved recently.

I do think that Jupyter notebooks are an amazing thing for CS Education. I wish more college level classes would utilize them. It adds a nice layer of interactive experimentation to any program/assignment/project.

What I ended up using was z2jh [0], which is working out great for right now!

We aren't yet allowing students to use GPUs or any libs that would require them, but we may look into that in the future.

[0]: https://github.com/jupyterhub/zero-to-jupyterhub-k8s

Re:Advanced computing with IPython by uasnew on Tuesday June 05, 2018 @09:29AM (#17237383)
Is this something that is open source so that other schools could use it?
Re:Advanced computing with IPython by HerrMonnezza on Tuesday June 05, 2018 @04:09PM (#17241544)
If I'm allowed a shameless plug (I'm the developer), there is ElastiCluster [1] which can deploy (among others) JupyterHub on various IaaS cloud infrastructures. We have used it at UZH to provide teaching environments for various courses. By default it only comes with the local "passwd" authenticator, but anything that works with Jupyter or Linux/PAM can be used relatively easily (= write an Ansible playbook).

Feel free to reach out to me if you would like more info.

[1]: https://gc3-uzh-ch.github.com/elasticluster

Re:Advanced computing with IPython by chrxr on Tuesday June 05, 2018 @09:31AM (#17237394)
Most of the implementation is open source. Authentication module is separate as it's part of our Canvas app work, but it will likely be open sourced soon. We've also done implementations which authenticate via GitHub...

https://github.com/harvard/cloudJHub

Re:Advanced computing with IPython by carreau on Tuesday June 05, 2018 @01:02PM (#17239670)
There is a lot of work on the jupyterhub organization that provide custom authenticator (GitHub, laugh) feel free to reach out if you want to migrate your work there. Curious also why the existing GitHub Oauth did not work for you.
Re:Advanced computing with IPython by chrxr on Tuesday June 05, 2018 @01:49PM (#17240213)
Dev has no account so relaying this:

"we had an issue with Oauth when we upgraded JupyterHub version 0.7 to version 0.8. The instance spawner we wrote needed to be updated to fix the issue. The case that opened about this in our repository* fixed with the latest update of the instance spawner"

So it seems we could be using GitHub standard OAuth now. But 95% of our implementations utilize Canvas auth reconciling with our university AD.

*https://github.com/harvard/cloudJHub/issues/2

Re:Advanced computing with IPython by chrxr on Tuesday June 05, 2018 @01:25PM (#17239921)
Yeah, we need to get back in touch with the Jupyter Project folks to see if there is anything we've done that might be useful feeding back into the project in any way. I'm not 100% sure on the Oauth stuff, I am but the lowly PM. I've punted the question over to the dev lead, who may comment further (though not sure if he has an HN account).
Re:Advanced computing with IPython by carreau on Tuesday June 05, 2018 @02:42PM (#17240747)
Ok, Great, i saw the other comment, JupyterHub is about to be released in version 0.9 – so if there are changes you like to go in, there is still some time. Feel free to send PR that add Canvas to the list of known Authenticators[1] for other to find it easily.

I know there've been some work to have instructions on how to deploy on AWS, and work on the k8s helm charts to do so[2] if that can be of help. If any work could be consolidated to both decrease the workload of you (and us), that would be good. Are any of you attending JupyterCon in August ? In person feedback is always welcome (Sturday August 25th is open, free, Community Day/ hackathon / sprint/ open studio, where the Jupyter team will be there)

1: https://github.com/jupyterhub/jupyterhub#authenticators 2: https://zero-to-jupyterhub.readthedocs.io/en/latest/amazon/s...

Re:Advanced computing with IPython by dankohn1 on Tuesday June 05, 2018 @03:02PM (#17240914)
If you're interested in JupyterHub and Kubernetes, you should take a look at Kubeflow, which also includes support for Tensorflow:

https://github.com/kubeflow/kubeflow https://www.youtube.com/watch?v=I6iMznIYwM8