Add scripts for Q
This commit is contained in:
@@ -80,7 +80,7 @@ def run_exp(task_config, dataset, experiment_name, recorder_name, uri):
|
||||
# Train model
|
||||
R.log_params(**flatten_dict(task_config))
|
||||
if "save_path" in inspect.getfullargspec(model.fit).args:
|
||||
model_fit_kwargs["save_path"] = os.path.join(recorder_root_dir, "model-ckps")
|
||||
model_fit_kwargs["save_path"] = os.path.join(recorder_root_dir, "model.ckps")
|
||||
model.fit(**model_fit_kwargs)
|
||||
# Get the recorder
|
||||
recorder = R.get_recorder()
|
||||
|
@@ -17,7 +17,7 @@ import logging
|
||||
from qlib.utils import (
|
||||
unpack_archive_with_buffer,
|
||||
save_multiple_parts_file,
|
||||
create_save_path,
|
||||
get_or_create_path,
|
||||
drop_nan_by_y_index,
|
||||
)
|
||||
from qlib.log import get_module_logger, TimeInspector
|
||||
@@ -176,7 +176,7 @@ class QuantTransformer(Model):
|
||||
_prepare_loader(test_dataset, False),
|
||||
)
|
||||
|
||||
save_path = create_save_path(save_path)
|
||||
save_path = get_or_create_path(save_path)
|
||||
self.logger.info("Fit procedure for [{:}] with save path={:}".format(self.__class__.__name__, save_path))
|
||||
|
||||
def _internal_test(ckp_epoch=None, results_dict=None):
|
||||
|
Reference in New Issue
Block a user