b9r5 commited on
Commit
dbad91c
·
verified ·
1 Parent(s): c72a0f0

Added citation

Browse files
Files changed (1) hide show
  1. README.md +35 -10
README.md CHANGED
@@ -1,10 +1,35 @@
1
- ---
2
- configs:
3
- - config_name: submissions
4
- data_files: "submissions.parquet"
5
- - config_name: successful_submissions
6
- data_files: "successful_submissions.parquet"
7
- - config_name: leaderboards
8
- data_files: "leaderboards.parquet"
9
- license: mit
10
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Hugging Face Dataset Exporter
2
+
3
+ This script exports data from a Postgres database to a Hugging Face dataset in Parquet format.
4
+
5
+ ## Setup
6
+
7
+ 1. **Install dependencies:**
8
+
9
+ Navigate to this directory and install the required Python packages.
10
+
11
+ ```bash
12
+ pip install -r requirements.txt
13
+ ```
14
+
15
+ 2. **Set environment variables:**
16
+
17
+ The script uses environment variables for database credentials. You can set them in your shell or use a `.env` file.
18
+
19
+ ```bash
20
+ export DB_USER="your_db_user"
21
+ export DB_PASSWORD="your_db_password"
22
+ export DB_HOST="localhost"
23
+ export DB_PORT="5432"
24
+ export DB_NAME="your_db_name"
25
+ ```
26
+
27
+ ## Usage
28
+
29
+ Run the script from the root of the repository:
30
+
31
+ ```bash
32
+ python scripts/hf_export/export.py --output_dir /path/to/your/dataset
33
+ ```
34
+
35
+ The script will create a directory at the specified output path containing the dataset in Parquet format. If `--output_dir` is not provided, it will save to `hf_dataset` in the current working directory.