Csed-dev commited on
Commit
3d18570
·
verified ·
1 Parent(s): 70052bb

Update dataset card: fix repo ID, add tar.gz download instructions

Browse files
Files changed (1) hide show
  1. README.md +33 -13
README.md CHANGED
@@ -57,13 +57,15 @@ A curated subset of the [SuiteSparse Matrix Collection](https://sparse.tamu.edu/
57
  ```
58
  .
59
  ├── README.md
60
- ├── manifest.parquet # Matrix metadata (id, group, name, rows, cols, nnz, kind)
61
- ├── suitesparse/
62
- ├── 2D_27628_bjtcai/
63
- └── 2D_27628_bjtcai.mtx
64
- ├── ACTIVSg2000/
65
- │ └── ACTIVSg2000.mtx
66
- ── ... # 867 matrix directories
 
 
67
  └── benchmark_results/
68
  └── benchmark_gnp_paper.jsonl # FGMRES benchmark with 6 preconditioners
69
  ```
@@ -103,23 +105,41 @@ All matrices originate from the [SuiteSparse Matrix Collection](https://sparse.t
103
 
104
  ## Usage
105
 
 
 
106
  ```python
107
- from scipy.io import mmread
 
108
  from huggingface_hub import hf_hub_download
109
 
110
- path = hf_hub_download(
111
- repo_id="Csed-dev/matrixpfn-base",
112
- filename="suitesparse/ACTIVSg2000/ACTIVSg2000.mtx",
 
 
113
  repo_type="dataset",
 
 
114
  )
115
- matrix = mmread(path)
 
 
 
 
 
 
 
 
 
116
  print(f"Shape: {matrix.shape}, NNZ: {matrix.nnz}")
117
  ```
118
 
 
 
119
  ```python
120
  from datasets import load_dataset
121
 
122
- manifest = load_dataset("Csed-dev/matrixpfn-base", "manifest")
123
  print(manifest["train"].to_pandas().head())
124
  ```
125
 
 
57
  ```
58
  .
59
  ├── README.md
60
+ ├── manifest.parquet # Matrix metadata (browsable in HF Dataset Viewer)
61
+ ├── suitesparse_manifest.json # Full manifest with all 867 matrix metadata
62
+ ├── suitesparse.tar.gz # All 867 matrices (1.8 GB compressed, ~5.7 GB extracted)
63
+ │ └── suitesparse/
64
+ ├── 2D_27628_bjtcai/
65
+ │ └── 2D_27628_bjtcai.mtx
66
+ ── ACTIVSg2000/
67
+ │ │ └── ACTIVSg2000.mtx
68
+ │ └── ... # 867 matrix directories
69
  └── benchmark_results/
70
  └── benchmark_gnp_paper.jsonl # FGMRES benchmark with 6 preconditioners
71
  ```
 
105
 
106
  ## Usage
107
 
108
+ ### Download and extract all matrices
109
+
110
  ```python
111
+ import subprocess
112
+ from pathlib import Path
113
  from huggingface_hub import hf_hub_download
114
 
115
+ DATA_DIR = Path("data")
116
+ DATA_DIR.mkdir(exist_ok=True)
117
+
118
+ hf_hub_download(
119
+ repo_id="Csed-dev/matrixpfn-suitesparse",
120
  repo_type="dataset",
121
+ filename="suitesparse.tar.gz",
122
+ local_dir=DATA_DIR,
123
  )
124
+ subprocess.run(["tar", "xzf", str(DATA_DIR / "suitesparse.tar.gz"), "-C", str(DATA_DIR)], check=True)
125
+ (DATA_DIR / "suitesparse.tar.gz").unlink()
126
+ ```
127
+
128
+ ### Load a single matrix
129
+
130
+ ```python
131
+ from scipy.io import mmread
132
+
133
+ matrix = mmread("data/suitesparse/ACTIVSg2000/ACTIVSg2000.mtx")
134
  print(f"Shape: {matrix.shape}, NNZ: {matrix.nnz}")
135
  ```
136
 
137
+ ### Browse the manifest
138
+
139
  ```python
140
  from datasets import load_dataset
141
 
142
+ manifest = load_dataset("Csed-dev/matrixpfn-suitesparse", "manifest")
143
  print(manifest["train"].to_pandas().head())
144
  ```
145