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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for spectrumlab-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e26b298cca010cc7afb17d2bc04e50b3bea8597b4d77ea92e2d5b8c6294e65f0
MD5 1ff0da19460a93a235710dab2bb76865
BLAKE2b-256 7524474969f5a29f12571dd8533c203dc909824d2fdc651ff43ff84e0a046212

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spectrumlab-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 692721eec86289bfbfdfd1d0723d3273f7bd05c6b5015768fdbe5a9c39c9aff0
MD5 dea4a3f523e8b8eccb535ac801ac58c6
BLAKE2b-256 4dc930cae8702967c7e477274d7bbd23cb2766c721765b147c24686ee9a1267d

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