Keep windows users engaged :)

  1. Win PowerShell curl is a poor alias for Invoke-WebRequest. In PowerShell the request looks like this “Invoke-WebRequest -Uri -ContentType “application/json” -Method POST -Body $JSON -UseBasicParsing” where $JSON = @{instances = @(1.0, 2.0, 5.0)} | ConvertTo-Json or $JSON= Get-Content .\batch1.json -Raw

  2. Bash scripts also don’t work in PowerShell:) Thus this script from an ungraded lab
    “while sleep 0.01;
    do curl …
    needs to be alter to this
    “Do {
    Start-Sleep -Milliseconds 10
    Invoke-WebRequest …
    while ($true)”
    with corresponding .ps1 extension.

1 Like

Hi @skipper-com, thanks for the recommendation. We created the labs having in mind that Linux is the most common way of deploying stuff written in Python in the cloud since for windows VMs you also need licensing. If you haven’t already, you can install WSL2 as described on the first lab and use bash instead of Powershell. If we do see many learners asking for a windows version of the labs we will probably add windows-specific instructions but in general we consider worth working on Linux as it provides a closer feel of what is most likely used in real life scenarios :slightly_smiling_face:

1 Like

Yes, you are right. Most developers and ML engineers use Linux/Mac for Python. Sure it’s the best option.
Personally, I can’t switch to Linux. And also I don’t want to try Linux VM for docker, kubernetes and so on - too complex to debug any issues. So, I’ll continue to use Win through this course and keep posting ‘code diff’:slight_smile:

I agree, WSL2 is a great option to work with Linux inside Windows, but I wasn’t ready for WSL2 after lab instruction “You should be able to run all the commands using Mac and Linux (tested on Ubuntu) CLI, or Windows Powershell (run as Administrator).”:slight_smile: It seems to me not really “all”.

BTW thanks for the great lab! Finally, I’ve got a moderate level of difficulty.

I’m glad to hear that you are enjoying the labs. We will probably create a guide on how to set up WSL2 since right now we mostly just link to the official installation resources. If you need any help with that let me know.

Also if you can keep posting code diff here it will be amazing so other learners can see it. Thanks for that!

Thanks for bringing this up! :slight_smile:

1 Like

Hi Alexander! Thank you for these tips and also for helping other learners! I’ll be updating the lab instructions for Windows users and will incorporate your suggestions along with those mentioned in this thread . Will keep the option of using Windows in the lab but as Andres mentioned (and you as well in the other thread), it would be more straightforward if they use WSL2.

Thanks again!

1 Like