filomba01/mostly-ai-competition

Python

0

10 commits

updated Jul 14, 2025

See the code

README

MOSTLY AI Prize Competition Submission

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.

πŸš€ Quick Start

Prerequisites

Recommended AWS EC2 Instance Types:

  • GPU runs: g5.2xlarge

Installation

# 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

Competition Usage

The main competition script run_best_config.py accepts a CSV training dataset and generates a synthetic dataset of identical size and structure.

For SEQUENTIAL DATA Challenge

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.

Command Line Arguments

ArgumentDescriptionDefaultRequired
--input-filePath to input CSV training dataset-βœ…
--model-typeModel type: tabular or sequentialsequential❌
--sample-sizeNumber of synthetic samples to generate20000❌
--workspaceWorkspace directory for intermediate files/data/workspace_best❌
--nameExperiment name for output filesbest_config_flat❌

πŸ“Š Optimized Hyperparameters

This submission uses extensively tuned hyperparameters optimized for competition metrics:

SEQUENTIAL DATA Tabular Model

  • Architecture: Medium model with optimized embeddings
  • Training: Weight decay 0.049, LR factor 0.35, dropout 0.45
  • Performance: Optimized for overall accuracy while maintaining privacy

πŸ”§ Technical Details

Dependencies

See requirements.txt for pinned versions and requirements_with_dependency.txt for all the dependencies and their versions.

πŸ“ Output Files

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

πŸ“œ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

filomba01/mostly-ai-competition

Python

0

10 commits

updated Jul 14, 2025

See the code

README

MOSTLY AI Prize Competition Submission

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.

πŸš€ Quick Start

Prerequisites

Recommended AWS EC2 Instance Types:

  • GPU runs: g5.2xlarge

Installation

# 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

Competition Usage

The main competition script run_best_config.py accepts a CSV training dataset and generates a synthetic dataset of identical size and structure.

For SEQUENTIAL DATA Challenge

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.

Command Line Arguments

ArgumentDescriptionDefaultRequired
--input-filePath to input CSV training dataset-βœ…
--model-typeModel type: tabular or sequentialsequential❌
--sample-sizeNumber of synthetic samples to generate20000❌
--workspaceWorkspace directory for intermediate files/data/workspace_best❌
--nameExperiment name for output filesbest_config_flat❌

πŸ“Š Optimized Hyperparameters

This submission uses extensively tuned hyperparameters optimized for competition metrics:

SEQUENTIAL DATA Tabular Model

  • Architecture: Medium model with optimized embeddings
  • Training: Weight decay 0.049, LR factor 0.35, dropout 0.45
  • Performance: Optimized for overall accuracy while maintaining privacy

πŸ”§ Technical Details

Dependencies

See requirements.txt for pinned versions and requirements_with_dependency.txt for all the dependencies and their versions.

πŸ“ Output Files

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

πŸ“œ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.