Skip to main content

A pioneering unified platform designed to systematize and accelerate deep learning research in spectroscopy.

Project description

SpectrumLab

A pioneering unified platform designed to systematize and accelerate deep learning research in spectroscopy.

🚀 Quick Start

Environment Setup

We recommend using conda and uv for environment management:

# Clone the repository
git clone https://github.com/little1d/SpectrumLab.git
cd SpectrumLab

# Create conda environment
conda create -n spectrumlab python=3.10
conda activate spectrumlab

pip install uv
uv pip install -e .

Data Setup

Download benchmark data from Hugging Face:

Extract the data to the data directory in the project root.

API Keys Configuration

# Copy and edit environment configuration
cp .env.example .env
# Configure your API keys in the .env file

💻 Usage

Python API

from spectrumlab.benchmark import get_benchmark_group
from spectrumlab.models import GPT4o
from spectrumlab.evaluator import get_evaluator

# Load benchmark data
benchmark = get_benchmark_group("perception")
data = benchmark.get_data_by_subcategories("all")

# Initialize model
model = GPT4o()

# Get evaluator
evaluator = get_evaluator("perception")

# Run evaluation
results = evaluator.evaluate(
    data_items=data,
    model=model,
    save_path="./results"
)

print(f"Overall accuracy: {results['metrics']['overall']['accuracy']:.2f}%")

Command Line Interface

The CLI provides a simple way to run evaluations:

# Basic evaluation
spectrumlab eval --model gpt4o --level perception

# Specify data path and output directory
spectrumlab eval --model claude --level signal --data-path ./data --output ./my_results

# Evaluate specific subcategories
spectrumlab eval --model deepseek --level semantic --subcategories "IR_spectroscopy" "Raman_spectroscopy"

# Customize output length
spectrumlab eval --model internvl --level generation --max-length 1024

# Get help
spectrumlab eval --help

🤝 Contributing

We welcome community contributions! Please see CONTRIBUTING.md for detailed guidelines.

Acknowledgments

  • Experiment Tracking: SwanLab for experiment management and visualization
  • Choice Evaluator Framework: Inspired by MMAR

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spectrumlab-0.1.2.tar.gz (691.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spectrumlab-0.1.2-py3-none-any.whl (34.4 kB view details)

Uploaded Python 3

File details

Details for the file spectrumlab-0.1.2.tar.gz.

File metadata

  • Download URL: spectrumlab-0.1.2.tar.gz
  • Upload date:
  • Size: 691.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.5

File hashes

Hashes for spectrumlab-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5b44037f1b3409467fb42589ce2e167b004e5dfc541cbba23b5c4faae27f7a4f
MD5 64da8b228977941bd8cf808e6b4a5243
BLAKE2b-256 c54c1be28b50900a8f876767b03022693dd18fb3aa3ff415edb5681647ad2523

See more details on using hashes here.

File details

Details for the file spectrumlab-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for spectrumlab-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c95aa227a8923bcef4c62248c86f56485971fc8c2edf6e0922946d458b7c3f8b
MD5 932f9640c815a3c79f97901f7d56e194
BLAKE2b-256 84b57e0c82765892c5d5ad0c3e25eaaea43ddc326f439dba40e24fa4e114dce6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page