continual-foragax 0.10.1__py3-none-any.whl → 0.10.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: continual-foragax
3
- Version: 0.10.1
3
+ Version: 0.10.2
4
4
  Summary: A continual reinforcement learning benchmark
5
5
  Author-email: Steven Tang <stang5@ualberta.ca>
6
6
  Requires-Python: >=3.8
@@ -1,9 +1,9 @@
1
1
  foragax/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  foragax/colors.py,sha256=rqNPiywP4Nvr0POhsGpasRk-nMMTS3DOwFRUgperlUk,2065
3
- foragax/env.py,sha256=X9oc60xNL4uTFnbt_BynN_c3XmVa9MYbSclW-g4qQoc,18628
3
+ foragax/env.py,sha256=Oo0jlvDXZTzV92yKJ08krRRg5yD1wSsvuIvxUrzMxu4,18748
4
4
  foragax/objects.py,sha256=CyBxrykTxpHCI_2hE9jE8mG4TU8R7VxzKdQ5mtxkEqU,6004
5
5
  foragax/registry.py,sha256=7_RDXvm_3RNO7culBLGkE0jH8Wk_q6jbMv72dZx4JO8,2722
6
- foragax/rendering.py,sha256=KAoQpdndy5JDQlyG0c5QDHuH-_Tfy5RuVlDtndnHVjc,2765
6
+ foragax/rendering.py,sha256=bms7wvBZTofoR-K-2QD2Ggeed7Viw8uwAEiEpEM3eSo,2768
7
7
  foragax/weather.py,sha256=KNAiwuFz8V__6G75vZIWQKPocLzXqxXn-Vt4TbHIpcA,1258
8
8
  foragax/data/ECA_non-blended_custom/TG_SOUID100897.txt,sha256=N7URbX6VlCZvCboUogYjMzy1I-0cfNPOn0QTLSHHfQ0,1776751
9
9
  foragax/data/ECA_non-blended_custom/TG_SOUID100928.txt,sha256=AaJMWisVu2YPlZFwvetzHZBI2DqWqUYmp8BVzx6gWZI,817991
@@ -128,8 +128,8 @@ foragax/data/ECA_non-blended_custom/TG_SOUID156887.txt,sha256=juzTPgJoJxfqmZkorL
128
128
  foragax/data/ECA_non-blended_custom/elements.txt,sha256=OtcUBoDAHxuln79BPKGu0tsQxG_5G2BfAX3Ck130kEA,4507
129
129
  foragax/data/ECA_non-blended_custom/metadata.txt,sha256=nudnmOCy5cPJfSXt_IjyX0S5-T7NkCZREICZSimqeqc,48260
130
130
  foragax/data/ECA_non-blended_custom/sources.txt,sha256=1j3lSmINAoCMqPqFrHfZJriOz6sTYZNOhXzUwvTLas0,20857
131
- continual_foragax-0.10.1.dist-info/METADATA,sha256=tgSSa5FtfA6qRBCZ_L3r3XnsfDpjhKMTRFJ9TL_OfCo,4897
132
- continual_foragax-0.10.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
133
- continual_foragax-0.10.1.dist-info/entry_points.txt,sha256=Qiu6iE_XudrDO_bVAMeA435h4PO9ourt8huvSHiuMPc,41
134
- continual_foragax-0.10.1.dist-info/top_level.txt,sha256=-z3SDK6RfLIcLI24n8rdbeFzlVY3hunChzlu-v1Fncs,8
135
- continual_foragax-0.10.1.dist-info/RECORD,,
131
+ continual_foragax-0.10.2.dist-info/METADATA,sha256=fpB7XhrzvckiVovAFHYB3GUWdRKr2DhiUTRCLS815A4,4897
132
+ continual_foragax-0.10.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
133
+ continual_foragax-0.10.2.dist-info/entry_points.txt,sha256=Qiu6iE_XudrDO_bVAMeA435h4PO9ourt8huvSHiuMPc,41
134
+ continual_foragax-0.10.2.dist-info/top_level.txt,sha256=-z3SDK6RfLIcLI24n8rdbeFzlVY3hunChzlu-v1Fncs,8
135
+ continual_foragax-0.10.2.dist-info/RECORD,,
foragax/env.py CHANGED
@@ -348,7 +348,9 @@ class ForagaxEnv(environment.Environment):
348
348
 
349
349
  if is_true_mode:
350
350
  # Apply true object borders by overlaying true colors on border pixels
351
- img = apply_true_borders(img, render_grid, self.size)
351
+ img = apply_true_borders(
352
+ img, render_grid, self.size, len(self.object_ids)
353
+ )
352
354
 
353
355
  # Add grid lines for world mode
354
356
  grid_color = jnp.zeros(3, dtype=jnp.uint8)
@@ -376,7 +378,9 @@ class ForagaxEnv(environment.Environment):
376
378
 
377
379
  if is_true_mode:
378
380
  # Apply true object borders by overlaying true colors on border pixels
379
- img = apply_true_borders(img, aperture, self.aperture_size)
381
+ img = apply_true_borders(
382
+ img, aperture, self.aperture_size, len(self.object_ids)
383
+ )
380
384
 
381
385
  # Add grid lines for aperture mode
382
386
  grid_color = jnp.zeros(3, dtype=jnp.uint8)
foragax/rendering.py CHANGED
@@ -9,7 +9,10 @@ from foragax.colors import hsv_to_rgb_255
9
9
 
10
10
 
11
11
  def apply_true_borders(
12
- base_img: jax.Array, true_grid: jax.Array, grid_size: Tuple[int, int]
12
+ base_img: jax.Array,
13
+ true_grid: jax.Array,
14
+ grid_size: Tuple[int, int],
15
+ num_objects: int,
13
16
  ) -> jax.Array:
14
17
  """Apply true object borders by overlaying HSV border colors on border pixels.
15
18
 
@@ -17,12 +20,12 @@ def apply_true_borders(
17
20
  base_img: Base image with object colors
18
21
  true_grid: Grid of object IDs for determining border colors
19
22
  grid_size: (height, width) of the grid
23
+ num_objects: Number of object types
20
24
 
21
25
  Returns:
22
26
  Image with HSV borders overlaid on border pixels
23
27
  """
24
28
  # Create HSV border colors for each object type
25
- num_objects = true_grid.max() + 1 # Assume object IDs start from 0
26
29
  hues = jnp.linspace(0, 1, num_objects, endpoint=False)
27
30
 
28
31
  # Convert HSV to RGB for border colors