Skip to content

Commit

Permalink
Add/dask example scikit learn (#148)
Browse files Browse the repository at this point in the history
* add dask example with scikit learn
* fix bug that if cores not defined, we should default to what is found with --local

Signed-off-by: vsoch <vsoch@users.noreply.github.com>
  • Loading branch information
vsoch committed Apr 23, 2023
1 parent 9b28b18 commit e0e9e70
Show file tree
Hide file tree
Showing 6 changed files with 475 additions and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/flux/templates/wait.sh
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ mkdir -p /etc/flux/system

# --cores=IDS Assign cores with IDS to each rank in R, so we assign 0-(N-1) to each host
{{ if not .Spec.Logging.Quiet }}echo "flux R encode --hosts={{ .Hosts}} {{if .Cores}}--cores=0-{{.Cores}}{{ end }}"{{ end }}
flux R encode --hosts={{ .Hosts}} {{if .Cores}}--cores=0-{{.Cores}}{{ end }} > /etc/flux/system/R
flux R encode --hosts={{ .Hosts}} {{if .Cores}}--cores=0-{{.Cores}}{{ else }}--local{{ end }} > /etc/flux/system/R
{{ if not .Spec.Logging.Quiet }}printf "\n📦 Resources\n"
cat /etc/flux/system/R{{ end }}

Expand Down
1 change: 1 addition & 0 deletions docs/tutorials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ The following tutorials are provided from their respective directories (and are
- [Fireworks](https://github.com/flux-framework/flux-operator/blob/main/examples/machine-learning/fireworks)
- [Pytorch MNIST](https://github.com/flux-framework/flux-operator/blob/main/examples/machine-learning/pytorch)
- [Tensorflow cifar-10](https://github.com/flux-framework/flux-operator/blob/main/examples/machine-learning/tensorflow)
- [Dask with Scikit-Learn](https://github.com/flux-framework/flux-operator/blob/main/examples/machine-learning/dask/scikit-learn)

### Services

Expand Down

0 comments on commit e0e9e70

Please sign in to comment.