Competition Entry for The MOSTLY AI Prize - Stage 2
This repository contains an optimized synthetic data generation solution for both FLAT DATA and SEQUENTIAL DATA challenges, capable of generating high-fidelity privacy-safe synthetic data that meets competition requirements.
Recommended AWS EC2 Instance Types:
g5.2xlarge# Clone the repository
git clone <repository-url>
cd mostly-ai-competition
# Install dependencies
pip install -r requirements.txt
pip install uv
uv pip install -U "mostlyai-engine[gpu]"
pip install psycopg2-binary
In case the installation fails, all the requirements and their dependencies can be found in the requirements_with_dependency.txt file.
Otherwise, you can use the Dockerfile to build the image and run the container by running:
docker build -t mostlyai-engine-2 .
docker run --gpus=all -it mostlyai-engine-2 -v data:/data
The main competition script run_best_config.py accepts a CSV training dataset and generates a synthetic dataset of identical size and structure.
python run_best_config.py \
--input-file /data/sequential_training.csv \
--model-type sequential \
--sample-size 20000 \
--workspace /data/workspace_sequential \
--name sequential_submission
In the sequential case, the selected column configuration is saved in the config/column_types.json file and loaded automatically. If the column names differ from the training data, they must be updated in the file.
Consider that the input and output directory /data is referred to as the one mounted in the container; if you are running without the container, you need to change the path to the input and output files.
By default, the run will remove the workspace directory if already exists a previous one, consider to save the results in a different directory every run.
| Argument | Description | Default | Required |
|---|---|---|---|
--input-file | Path to input CSV training dataset | - | β |
--model-type | Model type: tabular or sequential | sequential | β |
--sample-size | Number of synthetic samples to generate | 20000 | β |
--workspace | Workspace directory for intermediate files | /data/workspace_best | β |
--name | Experiment name for output files | best_config_flat | β |
This submission uses extensively tuned hyperparameters optimized for competition metrics:
See requirements.txt for pinned versions and requirements_with_dependency.txt for all the dependencies and their versions.
After successful execution, the following files are generated:
{workspace}/
βββ SyntheticData/ # Main synthetic dataset (Parquet format)
βββ synthetic_data_{name}.csv # Competition-ready CSV output
βββ ModelStore/ # Trained model artifacts
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Competition Entry for The MOSTLY AI Prize - Stage 2
This repository contains an optimized synthetic data generation solution for both FLAT DATA and SEQUENTIAL DATA challenges, capable of generating high-fidelity privacy-safe synthetic data that meets competition requirements.
Recommended AWS EC2 Instance Types:
g5.2xlarge# Clone the repository
git clone <repository-url>
cd mostly-ai-competition
# Install dependencies
pip install -r requirements.txt
pip install uv
uv pip install -U "mostlyai-engine[gpu]"
pip install psycopg2-binary
In case the installation fails, all the requirements and their dependencies can be found in the requirements_with_dependency.txt file.
Otherwise, you can use the Dockerfile to build the image and run the container by running:
docker build -t mostlyai-engine-2 .
docker run --gpus=all -it mostlyai-engine-2 -v data:/data
The main competition script run_best_config.py accepts a CSV training dataset and generates a synthetic dataset of identical size and structure.
python run_best_config.py \
--input-file /data/sequential_training.csv \
--model-type sequential \
--sample-size 20000 \
--workspace /data/workspace_sequential \
--name sequential_submission
In the sequential case, the selected column configuration is saved in the config/column_types.json file and loaded automatically. If the column names differ from the training data, they must be updated in the file.
Consider that the input and output directory /data is referred to as the one mounted in the container; if you are running without the container, you need to change the path to the input and output files.
By default, the run will remove the workspace directory if already exists a previous one, consider to save the results in a different directory every run.
| Argument | Description | Default | Required |
|---|---|---|---|
--input-file | Path to input CSV training dataset | - | β |
--model-type | Model type: tabular or sequential | sequential | β |
--sample-size | Number of synthetic samples to generate | 20000 | β |
--workspace | Workspace directory for intermediate files | /data/workspace_best | β |
--name | Experiment name for output files | best_config_flat | β |
This submission uses extensively tuned hyperparameters optimized for competition metrics:
See requirements.txt for pinned versions and requirements_with_dependency.txt for all the dependencies and their versions.
After successful execution, the following files are generated:
{workspace}/
βββ SyntheticData/ # Main synthetic dataset (Parquet format)
βββ synthetic_data_{name}.csv # Competition-ready CSV output
βββ ModelStore/ # Trained model artifacts
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.