PathmindAI / nativerl

Train reinforcement learning agents using AnyLogic or Python-based simulations
Apache License 2.0
19 stars 4 forks source link

Python error - `metrics` is not defined in this line #441

Closed slinlee closed 2 years ago

slinlee commented 2 years ago

Metrics is not defined here: https://github.com/SkymindIO/nativerl/blob/5f18f2290c707938aa748ede167783d0f4d3a659/nativerl/python/pathmind_training/environments.py#L330

thetwotravelers commented 2 years ago

does this throw an error? it references itself for all i != 0, where it should already be defined. if it's a issues, you could put metrics = np.zeros(metrics_space.shape) just above that line

slinlee commented 2 years ago

does this throw an error? it references itself for all i != 0, where it should already be defined. if it's a issues, you could put metrics = np.zeros(metrics_space.shape) just above that line

@brettskymind it doesn't throw an error as far as I know. It's flagged by python linting as it being undefined though.