Enhance data parsing and validation, add extra info types files
- Improved `parse_int_list` and `parse_float_list` functions to support JSON list input. - Introduced `validate_dataset_metadata` function to ensure dataset metadata consistency with training configuration. - Added multiple new files for extra information types, categorizing them into assessment-only, exposure-only, and combined types. - Removed deprecated `merge_extra_info_types` function and adjusted related logic in `train.py`. - Updated `save_config` function to accept additional metadata for training runs. - Refactored model and training scripts for better clarity and maintainability.
This commit is contained in:
@@ -94,7 +94,7 @@ class DeepHealth(nn.Module):
|
||||
])
|
||||
self.rope = None
|
||||
self.rbf = None
|
||||
if time_mode == "relative":
|
||||
elif time_mode == "relative":
|
||||
self.age_encoding = None
|
||||
self.blocks = nn.ModuleList([
|
||||
GPTBlock(
|
||||
@@ -154,6 +154,9 @@ class DeepHealth(nn.Module):
|
||||
other_time: torch.FloatTensor | None = None,
|
||||
**unused_kwargs,
|
||||
) -> torch.Tensor:
|
||||
if unused_kwargs:
|
||||
unknown = ", ".join(sorted(unused_kwargs))
|
||||
raise TypeError(f"Unexpected DeepHealth forward arguments: {unknown}")
|
||||
if mode not in {"next_token", "all_future"}:
|
||||
raise ValueError("mode must be either 'next_token' or 'all_future'")
|
||||
if mode == "all_future" and t_query is None:
|
||||
|
||||
Reference in New Issue
Block a user