We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b7ddad commit 6b6b184Copy full SHA for 6b6b184
src/kepler_model/util/config.py
@@ -126,10 +126,16 @@ def set_env_from_model_config():
126
return
127
128
for line in model_config.splitlines():
129
- splits = line.split("=")
+ line = line.strip()
130
+ # ignore comments and blanks
131
+ if not line or line.startswith("#"):
132
+ continue
133
+
134
+ # pick only the first part until # and ignore the rest
135
+ splits = line.split("#")[0].strip().split("=")
136
if len(splits) > 1:
137
os.environ[splits[0].strip()] = splits[1].strip()
- logging.info(f"set {splits[0]} to {splits[1]}.")
138
+ logging.info(f"set env {splits[0]} to '{splits[1]}'.")
139
140
141
def is_estimator_enable(prefix):
0 commit comments