DataScienceTutorials.jl icon indicating copy to clipboard operation
DataScienceTutorials.jl copied to clipboard

Update existing tutorials

Open EssamWisam opened this issue 1 year ago • 13 comments

In this PR, tutorials will be updated to satisfy the following two conditions:

  • Run flawlessly on Julia 1.10 with the most recent package version
  • Make plots only using the default gr backend of Plots.jl (i.e., remove the Python dependency)

To do:

  • [x] Replace Pkg.update() wth Pkg.instantiate() in tutorials
  • [x] Fix the problems with the tutorials having a ⚠️ (now requiring only review and merge of open PR's; see the tables below)
  • [x] Merge the new credit fraud tutorial
  • [ ] Check all tutorials render properly (e.g, no overly long outputs)

EssamWisam avatar Mar 11 '24 12:03 EssamWisam

Data Basics

Tutorial Name Changes Introduced
D0-categorical Updated manifest only
D0-dataframe Updated manifest only
D0-loading Updated manifest only
D0-processing Translated multiple plots
D0-scitype Updated manifest only

EssamWisam avatar Mar 11 '24 12:03 EssamWisam

Introduction to Statistical Learning

Tutorial Name Changes Introduced
ISL-lab-10 4 One-liners, 2 Plots
ISL-lab-2 1 Plot
ISL-lab-3 3 Plots Only
ISL-lab-4 4 Plots, 3 One-liners
ISL-lab-5 4 Plots Only
ISL-lab-6b 6 Plots Done ~~but ML model output issue for last plot~~ #200
ISL-lab-8 1 One-liner
ISL-lab-9 1 Plot Only

For some reason the lasso regressor in ISL-lab-6b after the MLJ update produces zeros for all coefficients.

EssamWisam avatar Mar 11 '24 12:03 EssamWisam

Getting Started

Tutorial Name Changes Introduced
A-composing-models One line
A-ensembles Fixed Plots
A-ensembles-2 One line, Fixed Plots
A-ensembles-3 ~~Fixed Plots. Now need to fix Deterministic only.~~ #198
A-fit-predict One line
~~A-learning-networks~~ to be removed 💀 #203
~~A-learning-networks-2~~ to be removed 💀 #203
A-model-choice Updated manifest only
A-model-tuning Fixed Plots
A-stacking Fixed multiple plots. ~~Now need to fix Deterministic only~~ #198

I may not be able to commit the changes in the same order as in the table since I worked on multiple branches.

EssamWisam avatar Mar 11 '24 12:03 EssamWisam

Tutorial Name Changes Introduced
EX-GLM Two one liners
EX-airfoil Fixed one plot.
EX-boston-flux Fixed one plot.
EX-breastcancer Fixed two plots and added two one liners (not easy)
EX-horse Update manifest only
EX-housekingcounty Fixed two plots
EX-powergen Fix seven plots
EX-wine Fix one plot
EX-AMES Changed one line. ~~Need to fix DeterministicComposite.~~ #201
EX-boston-lgbm ~~Stuck at an error ArgumentError: NULL library handle~~ #201
EX-crabs-xgb ~~Stuck at an error L1HingeLoss;~~ edit From LossFunctions.jl, no longer supported. #201
EX-telco Fixed one line. ~~Stuck at error ERROR: type NamedTuple has no field feature_importances~~ #202

EssamWisam avatar Mar 11 '24 13:03 EssamWisam

This is a highly valuable contribution, thanks.

Thank you.

Have finished my initial review and will now investigate some of the issues you have raised.

Please ping me when you have addressed my comments and any minor changes you still want to make here.

@ablaom I have addressed them in text but will address them by revisiting the code soon.

EssamWisam avatar Mar 11 '24 21:03 EssamWisam

Can we please make those Pkg.update -> Pkg.instantiate replacements?

ablaom avatar Mar 11 '24 22:03 ablaom

@EssamWisam The tutorial DRAFT-EX-creditfraud was never a live tutorial, but an abandoned work-in-progress. Seems a shame not to bring it in, so I am working on a separate PR to formerly instate it.

ablaom avatar Mar 11 '24 23:03 ablaom

Can we please make those Pkg.update -> Pkg.instantiate replacements?

I planned to do so after finishing with all tutorials since I actually use that line to update the manifest. Would you like me to do that earlier?

EssamWisam avatar Mar 12 '24 00:03 EssamWisam

@EssamWisam The tutorial DRAFT-EX-creditfraud was never a live tutorial, but an abandoned work-in-progress. Seems a shame not to bring it in, so I am working on a separate PR to formerly instate it.

Alright. I think it's not urgent compared to having all existing tutorials updated so we can finally deploy this.

EssamWisam avatar Mar 12 '24 00:03 EssamWisam

I've finished off the credit fraud tutorial: https://github.com/JuliaAI/DataScienceTutorials.jl/pull/196

ablaom avatar Mar 12 '24 07:03 ablaom

@ablaom I have addressed all your comments in the commits above.

EssamWisam avatar Mar 12 '24 12:03 EssamWisam

I planned to do so after finishing with all tutorials since I actually use that line to update the manifest. Would you like me to do that earlier?

No that's fine.

ablaom avatar Mar 12 '24 18:03 ablaom

I'm waiting on:

  • [x] https://github.com/JuliaAI/MLJBase.jl/pull/963

so I can update the Telco tutorial.

ablaom avatar Mar 15 '24 03:03 ablaom

I found that I didn't validate the credit-fraud tutorials because it wasn't in the horizontal nav before fix-nav was introduced. Found some minor issues and fixed.

EssamWisam avatar Apr 08 '24 23:04 EssamWisam

Found that ensembles-3 required fixes to render properly after it was moved to the advanced section (e.g., correct Project.toml reference in code) so fixed that as well.

EssamWisam avatar Apr 08 '24 23:04 EssamWisam

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@ablaom Excuse me for being unprofessional in not making PRs for these changes. Point is they were deterministic and minor so I thought it's faster to get by them quickly. Don't mind any cross you see next to a commit, it implies I pushed something from __site by mistake in that commit or a previous one (which I always straightforwardly fix with a revert).

I will merge this now.

EssamWisam avatar Apr 09 '24 02:04 EssamWisam