Skip to content

Commit 901fc2d

Browse files
committed
Release v0.1.0 (initial)
Remove obsolete GitHub workflows and update documentation for Python version; Enhance examples and performance settings in utilities.
1 parent 373d300 commit 901fc2d

File tree

9 files changed

+52
-209
lines changed

9 files changed

+52
-209
lines changed

.github/workflows/publish-pypi.yml

Lines changed: 0 additions & 122 deletions
This file was deleted.

.github/workflows/release-drafter.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/update-changelog.yml

Lines changed: 0 additions & 58 deletions
This file was deleted.

.readthedocs.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ version: 2
88
build:
99
os: ubuntu-22.04
1010
tools:
11-
python: "3.11" # Updated to a more recent Python version
11+
python: "3.11"
1212
# You can also specify other tool versions:
1313
# nodejs: "20"
1414
# rust: "1.70"
@@ -17,7 +17,6 @@ build:
1717
pre_build:
1818
# Run any pre-build steps like checking links or validating structure
1919
- pip install -e .
20-
- python -m scripts.validate_docs
2120

2221
# Build documentation in the "docs/" directory with Sphinx
2322
sphinx:

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
- Future features and improvements will be listed here
1313

14-
## [0.1.0] - 2025-03-01
14+
## [0.1.0] - 2025-05-09
1515

1616
### Added
1717

18-
- Initial release of Kaira framework
18+
- Initial release of Kaira framework v0.1.0
1919
- Core modules for wireless communication simulation
2020
- DeepJSCC implementation
2121
- Channel models and modulation schemes

examples/channels/plot_fading_channels.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,16 @@ def calculate_ser(received, original_indices):
251251
detected_indices[(received_real < 0) & (received_imag > 0)] = 2 # -1+1j
252252
detected_indices[(received_real < 0) & (received_imag < 0)] = 3 # -1-1j
253253

254+
# Convert to numpy and ensure shapes match
255+
original_np = original_indices.numpy()
256+
257+
# Make sure both arrays have the same length
258+
min_length = min(len(detected_indices), len(original_np))
259+
detected_indices = detected_indices[:min_length]
260+
original_np = original_np[:min_length]
261+
254262
# Calculate error rate
255-
errors = detected_indices != original_indices.numpy()
263+
errors = detected_indices != original_np
256264
ser = np.mean(errors)
257265

258266
return ser

examples/models/plot_xie2023_dt_deepjscc.py

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -357,20 +357,41 @@ def demonstrate_communication_pipeline(model, image, snr_db=10):
357357

358358
# Modulated signal (take first few dimensions to visualize)
359359
modulated_data = results["modulated"][0].cpu().numpy()
360-
signal_length = min(100, modulated_data.shape[0])
360+
361+
# For stem plot, use only the first dimension if it's multi-dimensional
362+
if len(modulated_data.shape) > 1:
363+
# Extract just the first 16 values from the first dimension
364+
plot_data = modulated_data[0, :16]
365+
signal_length = len(plot_data)
366+
else:
367+
# If it's already 1D, take first 16 values
368+
plot_data = modulated_data[:16]
369+
signal_length = len(plot_data)
361370

362371
plt.subplot(2, 2, 2)
363-
plt.stem(range(signal_length), modulated_data[:signal_length])
364-
plt.title("Modulated Signal (First 100 symbols)")
372+
# Use the prepared data directly
373+
plt.stem(range(signal_length), plot_data)
374+
plt.title("Modulated Signal (First 16 symbols)")
365375
plt.xlabel("Symbol Index")
366376
plt.ylabel("Amplitude")
367377
plt.grid(True, alpha=0.3)
368378

369379
# Show received signal (with channel effects)
370380
received_data = results["received"][0].cpu().numpy()
371381

382+
# For stem plot, use only the first dimension if it's multi-dimensional
383+
if len(received_data.shape) > 1:
384+
# Extract just the first 16 values from the first dimension
385+
received_plot_data = received_data[0, :16]
386+
received_length = len(received_plot_data)
387+
else:
388+
# If it's already 1D, take first 16 values
389+
received_plot_data = received_data[:16]
390+
received_length = len(received_plot_data)
391+
372392
plt.subplot(2, 2, 3)
373-
plt.stem(range(signal_length), received_data[:signal_length], linefmt="r-")
393+
# Use the prepared data directly
394+
plt.stem(range(received_length), received_plot_data, linefmt="r-")
374395
plt.title(f"Received Signal (After {model.channel.__class__.__name__})")
375396
plt.xlabel("Symbol Index")
376397
plt.ylabel("Amplitude")
@@ -417,11 +438,20 @@ def demonstrate_communication_pipeline(model, image, snr_db=10):
417438
# Get actual data size for modulated and received signals
418439
mod_data = results["modulated"][0].cpu().numpy()
419440
rec_data = results["received"][0].cpu().numpy()
420-
signal_length = min(50, len(mod_data)) # Limit to at most 50 points
441+
442+
# For stem plot, use only the first dimension if it's multi-dimensional
443+
if len(rec_data.shape) > 1:
444+
# Extract values from the first dimension
445+
rec_plot_data = rec_data[0, :16]
446+
signal_length = len(rec_plot_data)
447+
else:
448+
# If it's already 1D, take first 16 values
449+
rec_plot_data = rec_data[:16]
450+
signal_length = len(rec_plot_data)
421451

422452
# Show received signal (varies by SNR)
423453
plt.subplot(1, 4, i + 2)
424-
plt.stem(range(signal_length), rec_data[:signal_length], linefmt="r-")
454+
plt.stem(range(signal_length), rec_plot_data, linefmt="r-")
425455
plt.title(f"Received Signal (SNR={snr} dB)")
426456
plt.xlabel("Symbol Index")
427457
plt.ylabel("Amplitude")

examples/utils/plot_capacity_analyzer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
# -----------------------------------------
3838

3939
# NEW: More granular performance control
40-
PERFORMANCE_MODE = "balanced" # Options: "ultra_fast", "fast", "balanced", "detailed"
40+
PERFORMANCE_MODE = "ultra_fast" # Options: "ultra_fast", "fast", "balanced", "detailed"
4141

4242
# Configure visualization and computation based on performance mode
4343
if PERFORMANCE_MODE == "ultra_fast":

requirements-dev.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ isort>=5.12.0
1717
mypy>=1.0.0
1818
pre-commit
1919
coverage>=7.0.0
20+
seaborn
21+
ipython
22+
scikit-learn

0 commit comments

Comments
 (0)