- Add jupyter_launcher.sh script to start Jupyter with ML tools - Create cli_integration.py helper for CLI operations - Add sample notebook structure for experiments - Create workflow documentation for seamless data science integration
1.2 KiB
1.2 KiB
CLI-Jupyter Integration Workflow
Workflow Overview
This workflow integrates the FetchML CLI with Jupyter notebooks for seamless data science experiments.
Step 1: Start Jupyter Server
# Build the container with ML tools
podman build -f ml-tools-runner.podfile -t ml-tools-runner .
# Start Jupyter server
podman run -d -p 8888:8888 --name ml-jupyter \
-v "$(pwd)/workspace:/workspace:Z" \
--entrypoint conda localhost/ml-tools-runner \
run -n ml_env jupyter notebook --no-browser --ip=0.0.0.0 --port=8888 \
--NotebookApp.token='' --NotebookApp.password='' --allow-root
# Access at http://localhost:8888
Step 2: Use CLI to Sync Projects
# From another terminal, sync your project
cd cli && ./zig-out/bin/ml sync ./my_project --queue
# Check status
./zig-out/bin/ml status
Step 3: Run Experiments in Jupyter
# In your Jupyter notebook
import mlflow
import wandb
import pandas as pd
# Start MLflow tracking
mlflow.start_run()
mlflow.log_param("model", "random_forest")
mlflow.log_metric("accuracy", 0.95)
Step 4: Monitor with CLI
# Monitor jobs from CLI
./zig-out/bin/ml monitor
# View logs
./zig-out/bin/ml experiment log my_experiment