This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# hems_environments.py (Corrected) | |
import numpy as np | |
import gymnasium as gym | |
from gymnasium import spaces | |
class StochasticSolarEnv(gym.Env): | |
""" | |
A Gymnasium environment for discovering the periodic symmetry of solar irradiance | |
under stochastic weather conditions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Any, Callable | |
import numpy as np | |
import torch | |
import aim | |
from tianshou.utils import BaseLogger | |
class AimLogger(BaseLogger): | |
def __init__(self, repo: str = ".", experiment_name: str = "tianshou_experiment", tags: list[str] | None = None, **kwargs): | |
super().__init__(train_interval=1000, test_interval=1, update_interval=1000, info_interval=1) | |
self.run = aim.Run(repo=repo, experiment=experiment_name, **kwargs) |