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.0.tar.gz (690.5 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.0-py3-none-any.whl (34.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for spectrumlab-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fba40e4348a20dc586be48d2630f4dd5c15520a04449856b94d742678afde568
MD5 6275eabb5756843ef7544ae94508c293
BLAKE2b-256 245b07f40a9f05ecd37d925c84a722f242345e230fa211212fcfe9aa4295558a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spectrumlab-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3f2ae78a35c5266701b0ec6f67860c65ccb672556a33d08026ef787aca6c71d5
MD5 6129d0ebd51aa2ade3ff69bcf99cc73c
BLAKE2b-256 245187bbe0afbaf3354a46c58a5f4ceb683559a72210110522184cb04fb7e2f6

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