Installation
Prerequisites
Python 3.10.7
pip (modern version)
Installation
Standard Installation
Dyn-Benchmark is available from a dedicated package repository. You can install it using pip:
pip install dyn-benchmark[pretty]
For enhanced visualization capabilities, we recommend installing dyn-viz`:
# Install dyn-viz for visualization features
pip install dyn-viz
Installation from Source
For users who want to access the latest development version or contribute to the project, you can install directly from the source repository:
# Clone the repository (SSH)
git clone git@gitlab.com:decide.imt-atlantique/dyn/benchmark.git
# Or using HTTPS
git clone https://gitlab.com/decide.imt-atlantique/dyn/benchmark.git
# Install in development mode
pip install -e /path/to/dyn_benchmark
Using Virtual Environments
We recommend using virtual environments for installing Dyn-Benchmark to avoid conflicts with other packages.
Using venv:
python -m venv dyn-env
source dyn-env/bin/activate # On Windows: dyn-env\Scripts\activate
# Then install the package as described above
Using pyenv with virtualenv:
pyenv install 3.10.7
pyenv virtualenv 3.10.7 dyn-env
pyenv local dyn-env
# Then install the package as described above
Using conda:
conda create -n dyn-env python=[3.10]
conda activate dyn-env
# Then install the package as described above
Verification
To verify your installation is working correctly, run the following Python code:
try:
# Import the necessary components
from dyn.benchmark.generator.groundtruth_generator import GroundtruthGenerator
print("✓ Successfully imported the package")
# Create a simple generator with minimal parameters
generator = GroundtruthGenerator(seed=42)
print("✓ Successfully created a generator")
# Generate a very small benchmark (this will take a few seconds)
print("Generating a small benchmark (this may take a few seconds)...")
groundtruth = generator.generate()
# If we reach this point, generation was successful
print("✓ Successfully generated a benchmark with:")
print(f" - {len(groundtruth.graphs)} snapshots")
print(f" - {sum(len(g.nodes) for g in groundtruth.graphs.values())} total nodes across all snapshots")
print(f" - {sum(len(g.edges) for g in groundtruth.graphs.values())} total edges across all snapshots")
print(f" - {len(set(row.static_community_id for row in groundtruth.tcommlist))} static communities")
print(f" - {len(groundtruth.events)} community events")
print("\nInstallation verified successfully!")
except Exception as e:
print(f"\n❌ Verification failed: {type(e).__name__}: {e}")
print("Please check the troubleshooting section or report this issue.")
Troubleshooting
If you encounter issues during installation:
Ensure you’re using a compatible Python version
Check that you have the necessary permissions to install packages
If behind a proxy, configure pip appropriately
For further assistance, please consult the troubleshoots document or create an issue on our GitLab repository