fetch_ml/podman/scripts/test_ml_tools.py
Jeremie Fraeys 7880ea8d79
refactor: reorganize podman directory structure
Organize podman/ directory into logical subdirectories:

New structure:
- docs/          - ML_TOOLS_GUIDE.md, jupyter_workflow.md
- configs/       - environment*.yml, security_policy.json
- containers/    - *.dockerfile, *.podfile
- scripts/       - *.sh, *.py (secure_runner, cli_integration, etc.)
- jupyter/       - jupyter_cookie_secret (flattened from jupyter_runtime/runtime/)
- workspace/     - Example projects (cleaned of temp files)

Cleaned workspace:
- Removed .DS_Store, mlflow.db, cache/
- Removed duplicate cli_integration.py

Removed unnecessary nesting:
- Flattened jupyter_runtime/runtime/ to just jupyter/

Improves maintainability by grouping files by purpose and eliminating root directory clutter.
2026-02-18 16:40:46 -05:00

61 lines
1.7 KiB
Python

#!/usr/bin/env python3
"""
Test script to verify ML tools integration works
"""
import subprocess
import sys
import os
def test_tool_import(tool_name):
"""Test if a tool can be imported"""
try:
if tool_name == "mlflow":
import mlflow
print(f"{tool_name}: {mlflow.__version__}")
elif tool_name == "wandb":
import wandb
print(f"{tool_name}: {wandb.__version__}")
elif tool_name == "streamlit":
import streamlit
print(f"{tool_name}: {streamlit.__version__}")
elif tool_name == "dash":
import dash
print(f"{tool_name}: {dash.__version__}")
elif tool_name == "panel":
import panel
print(f"{tool_name}: {panel.__version__}")
elif tool_name == "bokeh":
import bokeh
print(f"{tool_name}: {bokeh.__version__}")
else:
print(f"{tool_name}: Unknown tool")
return True
except ImportError as e:
print(f"{tool_name}: {e}")
return False
def main():
print("🧪 Testing ML Tools Integration")
print("=" * 40)
tools = ["mlflow", "wandb", "streamlit", "dash", "panel", "bokeh"]
results = []
for tool in tools:
results.append(test_tool_import(tool))
print("\n" + "=" * 40)
success_count = sum(results)
total_count = len(results)
print(f"📊 Results: {success_count}/{total_count} tools available")
if success_count == total_count:
print("🎉 All ML tools are ready to use!")
return 0
else:
print("⚠️ Some tools are missing. Check environment.yml")
return 1
if __name__ == "__main__":
sys.exit(main())