1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-12 23:36:54 +08:00

fix_pylint_w0719 (#1463)

* fix_pylint_w0719

* remove_fixme
This commit is contained in:
Linlang
2023-03-17 19:25:49 +08:00
committed by GitHub
parent e457ca8511
commit 0e8bfcb5d3
5 changed files with 6 additions and 7 deletions

View File

@@ -224,7 +224,7 @@ def requests_with_retry(url, retry=5, **kwargs):
except Exception as e:
log.warning("exception encountered {}".format(e))
continue
raise Exception("ERROR: requests failed!")
raise TimeoutError("ERROR: requests failed!")
#################### Parse ####################

View File

@@ -333,7 +333,7 @@ class MLflowExperiment(Experiment):
recorder = self._get_recorder(recorder_name=recorder_name)
self._client.delete_run(recorder.id)
except MlflowException as e:
raise Exception(
raise ValueError(
f"Error: {e}. Something went wrong when deleting recorder. Please check if the name/id of the recorder is correct."
) from e

View File

@@ -415,7 +415,7 @@ class MLflowExpManager(ExpManager):
raise MlflowException("No valid experiment has been found.")
self.client.delete_experiment(experiment.experiment_id)
except MlflowException as e:
raise Exception(
raise ValueError(
f"Error: {e}. Something went wrong when deleting experiment. Please check if the name/id of the experiment is correct."
) from e

View File

@@ -324,7 +324,7 @@ class MLflowRecorder(Recorder):
raise RuntimeError("This recorder is not saved in the local file system.")
else:
raise Exception(
raise ValueError(
"Please make sure the recorder has been created and started properly before getting artifact uri."
)
@@ -464,7 +464,7 @@ class MLflowRecorder(Recorder):
if self.artifact_uri is not None:
return self.artifact_uri
else:
raise Exception(
raise ValueError(
"Please make sure the recorder has been created and started properly before getting artifact uri."
)