Skip to content

llaallii/frequency_allocation_rl

Repository files navigation

tgnn-rl

Temporal graph neural network research environment focused on reinforcement learning workflows.

Environment Setup with Mamba

GPU workflow (recommended)

# Create and activate the CUDA-enabled environment described in environment.yml
mamba env create -f environment.yml
mamba activate tgnn-rl

CPU-only workflow

# Create a CPU-only environment (omit the NVIDIA channel and CUDA dependency)
mamba create -n tgnn-rl python=3.10 pytorch>=2.2 -c pytorch -c conda-forge
mamba activate tgnn-rl

If you prefer to reuse environment.yml, delete the pytorch-cuda=12.1 line before creating the CPU environment.

Install the Package and Optional Extras

# Install the project in editable mode (recommended for development)
pip install -e .

# Optional extras
pip install ".[dev]"   # testing, linting, and type-checking tooling
pip install ".[geom]"  # PyTorch Geometric dependencies
pip install ".[rl]"    # reinforcement learning integrations

PyTorch Geometric Wheels

# GPU wheels (replace TORCH_VERSION with your installed torch build, e.g., 2.2.0)
pip install torch-geometric torch-scatter torch-sparse \
    -f https://data.pyg.org/whl/torch-<TORCH_VERSION>+cu121.html

# CPU wheels
pip install torch-geometric torch-scatter torch-sparse \
    -f https://data.pyg.org/whl/torch-<TORCH_VERSION>+cpu.html

Verify the Installation

python -c "import torch, numpy; import pkgutil; \
print(f'torch={torch.__version__}, cuda={torch.cuda.is_available()}'); \
print('env package available:', pkgutil.find_loader('env') is not None)"

Run Tests

pytest
pytest --cov=src --cov-report=term-missing

Linting and Formatting

ruff check .
ruff check --fix .
black src tests

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors