File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -101,6 +101,34 @@ jobs:
101101 - name : Check devices
102102 run : |
103103 python -c "import jax; print(jax.devices())"
104+
105+ - name : Run Conflict Verification Script
106+ run : |
107+ # This command creates the file inside the runner
108+ cat <<'EOF' > verify_conflict.py
109+ print("--- PyTorch vs. JAX Conflict Test ---")
110+
111+ print("\nStep 1: Attempting to import torch...")
112+ try:
113+ import torch
114+ print(f"Successfully imported torch version: {torch.__version__}")
115+ print(f"Is PyTorch using CUDA? -> {torch.cuda.is_available()}")
116+ except Exception as e:
117+ print(f"Failed to import torch: {e}")
118+
119+ print("\nStep 2: Now, attempting to initialize JAX...")
120+ try:
121+ import jax
122+ devices = jax.devices()
123+ print("\n--- RESULT: SUCCESS ---")
124+ print(f"JAX initialized correctly and found devices: {devices}")
125+ except Exception as e:
126+ print("\n--- RESULT: FAILURE ---")
127+ print("JAX failed to initialize after PyTorch was imported.")
128+ print(f"JAX Error: {e}")
129+ EOF
130+
131+ # Now that the file exists, this command will work
104132 python verify_conflict.py
105133
106134 # - name: Run MaxDiffusion Training
You can’t perform that action at this time.
0 commit comments