Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove vec noise as a direct dependency #284

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker/cpu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ ADD ./setup.py ./setup.py
ADD ./README.md ./README.md
ADD ./MANIFEST.in ./MANIFEST.in
ADD ./kaggle_environments ./kaggle_environments
RUN pip install Flask bitsandbytes accelerate && pip install . && pytest
RUN pip install Flask bitsandbytes accelerate vec-noise && pip install . && pytest

CMD kaggle-environments
2 changes: 1 addition & 1 deletion docker/gpu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ ADD ./setup.py ./setup.py
ADD ./README.md ./README.md
ADD ./MANIFEST.in ./MANIFEST.in
ADD ./kaggle_environments ./kaggle_environments
RUN pip install Flask bitsandbytes accelerate && pip install . && pytest
RUN pip install Flask bitsandbytes accelerate vec-noise && pip install . && pytest

CMD kaggle-environments
2 changes: 0 additions & 2 deletions kaggle_environments/envs/lux_ai_s2/lux_ai_s2.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
syspath.append(__dir__)


import vec_noise

from luxai_s2.env import LuxAI_S2
import numpy as np

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from collections.abc import Iterable

import numpy as np
from vec_noise import snoise2


def symmetrize(x, symmetry="vertical"):
Expand Down Expand Up @@ -91,6 +90,8 @@ def noise(self, x=None, y=None, frequency: float = 1):
x = x + self.noise_shift

x, y = np.meshgrid(x, y)
# importing here because vec_noise causes import issues in cloud functions
from vec_noise import snoise2
total = snoise2(x, y, octaves=self.octaves)
symmetrize(total, self.symmetry)
# Normalize between [0, 1]
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ def get_version(rel_path):
"Flask >= 1.1.2",
"numpy >= 1.19.5",
"requests >= 2.25.1",
"vec-noise >= 1.1.4",
"pettingzoo == 1.24.0",
"gymnasium == 0.29.0",
"stable-baselines3 == 2.1.0",
Expand Down