Skip to content

Commit

Permalink
fqe callback logs loc is optional parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuaspear committed Sep 4, 2024
1 parent 3992ed1 commit 1b1c6a2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ If importance sampling based methods are evaluating to 0, consider visualising t
The different kinds of importance samples can also be visualised by querying the ```traj_is_weights``` attribute of a given ```ImportanceSampler``` object. If for example, vanilla importance sampling is being used and the samples are not ```NaN``` or ```Inf``` then visualising the ```traj_is_weights``` may provide insight. In particular, IS weights will tend to inifinity when the evaluation policy places large density on an action in comparison to the behaviour policy.

### Release log

#### 7.0.1
* Made the logging location for d3rlpy/FQE callback an optional parameter

#### 7.0.0 (Major API release)
* Altered ISEstimator and OPEEstimatorBase APIs to depend on EmpiricalMeanDenomBase and WeightDenomBase
* EmpiricalMeanDenomBase and WeightDenomBase seperatly define functions over the dataset value and weights of the individul trajectory weights, respectively. This allows a far greater number of estimators to be flexibly implemented
Expand Down
2 changes: 1 addition & 1 deletion src/offline_rl_ope/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "7.0.0"
__version__ = "7.0.1"
8 changes: 6 additions & 2 deletions src/offline_rl_ope/api/d3rlpy/Callbacks/DM.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,19 @@ def __init__(
model_fit_kwargs:Dict,
dataset:MDPDataset,
fqe_impl_init:Optional[FQEImplInitArg]=None,
device:DeviceArg = False
device:DeviceArg = False,
logs_loc:Optional[str] = None
) -> None:
super().__init__(debug=False, debug_path="")
self.__scorers = scorers
self.__dataset = dataset
self.__fqe_cls = fqe_cls
self.__model_init_kwargs = model_init_kwargs
self.__model_fit_kwargs = model_fit_kwargs
self.__logs_loc = os.path.join(os.getcwd(), "tmp_fqe_logs_loc")
if logs_loc:
self.__logs_loc = logs_loc
else:
self.__logs_loc = os.path.join(os.getcwd(), "tmp_fqe_logs_loc")
self.__cur_exp = 0
os.mkdir(self.__logs_loc)
self.__fqe_impl_init = fqe_impl_init
Expand Down

0 comments on commit 1b1c6a2

Please sign in to comment.