-
Notifications
You must be signed in to change notification settings - Fork 739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Further changes to the new shell
package
#173
Conversation
Job PR-173/1 is complete. |
Codecov Report
@@ Coverage Diff @@
## master #173 +/- ##
==========================================
- Coverage 78.53% 74.61% -3.92%
==========================================
Files 124 123 -1
Lines 6783 6800 +17
==========================================
- Hits 5327 5074 -253
- Misses 1456 1726 +270
|
8cdfb4f
to
19a5c7d
Compare
- Allow backwards-compatible metadata.json files. - Rename `time_freq` -> `freq`.
19a5c7d
to
1b8e01a
Compare
Job PR-173/3 is complete. |
def _get_datasets(self): | ||
freq = self.hyperparameters["time_freq"] | ||
def _get_datasets(self) -> Dict[str, FileDataset]: | ||
freq = self.hyperparameters["freq"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this won't break anything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. I cleaned up all SageMaker-related configuration and environment bootstrapping logic (now all in sagemaker/__init__.py
) and updated the PR.
The following method now ensures backwards-compatibility w.r.t. the hyperparameters.json
file. Backwards-compatibility in the metadata.json
file was already added in the current version.
def _load_hyperparameters(path: MLPath, channels) -> dict:
with path.hyperparameters.open() as json_file:
hyperparameters = parse_sagemaker_parameters(json.load(json_file))
for old_freq_name in ['time_freq', 'time_granularity']:
if old_freq_name in hyperparameters:
hyperparameters['freq'] = hyperparameters[old_freq_name]
if "metadata" in channels:
with (channels["metadata"] / "metadata.json").open() as file:
metadata = MetaData(**json.load(file))
hyperparameters.update(freq=metadata.freq)
return hyperparameters
- Use entry_points-based name -> type resolution of the forecaster type in the CLI. - Mark the module as `.typesafe`.
1b8e01a
to
24c52b9
Compare
Job PR-173/4 is complete. |
1cebe48
to
148fa4f
Compare
Job PR-173/5 is complete. |
Job PR-173/6 is complete. |
It would be nice to add tests for the |
.typesafe
.Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.