code-loader 1.0.46__py3-none-any.whl → 1.0.48__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -42,7 +42,7 @@ class LogExternalEpochDataRequest:
42
42
  experimentId: str
43
43
  epoch: int
44
44
  metrics: ApiMetrics
45
- force: bool = False
45
+ override: bool = False
46
46
 
47
47
  @dataclass
48
48
  class TagModelRequest:
@@ -91,13 +91,14 @@ class Epoch:
91
91
  tags=tags
92
92
  ))
93
93
 
94
- def log(self, modelFilePath: Optional[str] = None, tags: Optional[list[str]] = None) -> None:
94
+ def log(self, modelFilePath: Optional[str] = None, tags: Optional[List[str]] = None, override: bool = False) -> None:
95
95
  """
96
96
  Logs the epoch with optional model file and tags.
97
97
 
98
98
  Args:
99
99
  modelFilePath (Optional[str]): The path to the model file. Defaults to None.
100
100
  tags (Optional[List[str]]): A list of tags to associate with the epoch model. Will always include the default tag. Unless the default tag is set to '', all previous epoch model with the same tag will be removed
101
+ override (bool): Whether to override the existing epoch model. Defaults to False.
101
102
  """
102
103
  if tags is None:
103
104
  tags = []
@@ -119,7 +120,8 @@ class Epoch:
119
120
  experimentId=self.ctx.experiment_id,
120
121
  projectId=self.ctx.project_id,
121
122
  epoch=self.epoch,
122
- metrics=api_metrics
123
+ metrics=api_metrics,
124
+ override=override
123
125
  ))
124
126
  if modelFilePath is not None and len(tags) > 0:
125
127
  self._tag_model(tags)
@@ -41,7 +41,7 @@ class Experiment:
41
41
  """
42
42
  return Epoch(self.ctx, epoch, self.default_epoch_tag)
43
43
 
44
- def log_epoch(self, epoch: int, metrics: Optional[Metrics] = None, model_path: Optional[str] = None, tags: Optional[List[str]] = None) -> None:
44
+ def log_epoch(self, epoch: int, metrics: Optional[Metrics] = None, model_path: Optional[str] = None, tags: Optional[List[str]] = None, override: bool = False) -> None:
45
45
  """
46
46
  Logs an epoch with optional metrics, model path, and tags.
47
47
 
@@ -50,11 +50,12 @@ class Experiment:
50
50
  metrics (Optional[Metrics]): The metrics to log for the epoch. Defaults to None.
51
51
  model_path (Optional[str]): The path to the model file. Defaults to None.
52
52
  tags (Optional[List[str]]): A list of tags to associate with the epoch model. Will always include the default tag. Unless the default tag is set to '', all previous epoch model with the same tag will be removed.
53
+ override (bool): Whether to override the epoch if it already exists. Defaults to False.
53
54
  """
54
55
  epoch_o = self.init_epoch(epoch)
55
56
  if metrics is not None:
56
57
  epoch_o.set_metrics(metrics)
57
- epoch_o.log(model_path, tags)
58
+ epoch_o.log(model_path, tags, override)
58
59
 
59
60
  def set_properties(self, properties: Dict[str, Any]) -> None:
60
61
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: code-loader
3
- Version: 1.0.46
3
+ Version: 1.0.48
4
4
  Summary:
5
5
  Home-page: https://github.com/tensorleap/code-loader
6
6
  License: MIT
@@ -7,11 +7,11 @@ code_loader/contract/exceptions.py,sha256=jWqu5i7t-0IG0jGRsKF4DjJdrsdpJjIYpUkN1F
7
7
  code_loader/contract/responsedataclasses.py,sha256=w7xVOv2S8Hyb5lqyomMGiKAWXDTSOG-FX1YW39bXD3A,3969
8
8
  code_loader/contract/visualizer_classes.py,sha256=Ka8fJSVKrOeZ12Eg8-dOBGMW0UswYCIkuhnNMd-7z9s,22948
9
9
  code_loader/experiment_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
- code_loader/experiment_api/api.py,sha256=p_III5t9WCpvd1REq9L-pF3r1RhjDlxMCBBK-Sn0B1I,2490
10
+ code_loader/experiment_api/api.py,sha256=a7wh6Hhe7IaVxu46eV2soSz-yxnmXG3ipU1BBtsEAaQ,2493
11
11
  code_loader/experiment_api/cli_config_utils.py,sha256=n6JMyNrquxql3KKxHhAP8jAzezlRT-PV2KWI95kKsm0,1140
12
12
  code_loader/experiment_api/client.py,sha256=8kqLWh2Zg7mNA5E9Q0v0qRuPm3OE3Rs7lfGAcXOucU4,1428
13
- code_loader/experiment_api/epoch.py,sha256=OwK8ENR7TJIkreUAZKTRJamPcHDvQYeU85qcDNxSCpo,4700
14
- code_loader/experiment_api/experiment.py,sha256=oVi6GAJ1e1kOygnOquTvb6SgepMhTlrpH0uVqCwviYM,6349
13
+ code_loader/experiment_api/epoch.py,sha256=mcrdgwbUgG8hcq6Nthp7bNl5KAVZ5727_ICasJp7thQ,4849
14
+ code_loader/experiment_api/experiment.py,sha256=vyE2zyY9JcVKuHcIA8Njr5DWlmbP2cyJHnGAsnaOots,6483
15
15
  code_loader/experiment_api/experiment_context.py,sha256=kdzUbuzXo1pMVslOC3TKeJwW8sx_qWkxDVrswjduH0A,194
16
16
  code_loader/experiment_api/types.py,sha256=MY8xFARHwdVA7p4dxyhD60ShmttgTvb4qdp1oEB_NPg,485
17
17
  code_loader/experiment_api/utils.py,sha256=XZHtxge12TS4H4-8PjV3sKuhp8Ud6ojAiIzTZJEqBqc,3304
@@ -22,7 +22,7 @@ code_loader/leaploader.py,sha256=E1DHtRDzz0hyb3kAMl6S_JDbjGxJPR_bZHU77Af4rR4,175
22
22
  code_loader/utils.py,sha256=TZAoUbA2pE8eK3Le3s5Xr4eRaYdeDMQtxotx6rh-5oE,2185
23
23
  code_loader/visualizers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
24
  code_loader/visualizers/default_visualizers.py,sha256=VoqO9FN84yXyMjRjHjUTOt2GdTkJRMbHbXJ1cJkREkk,2230
25
- code_loader-1.0.46.dist-info/LICENSE,sha256=qIwWjdspQeSMTtnFZBC8MuT-95L02FPvzRUdWFxrwJY,1067
26
- code_loader-1.0.46.dist-info/METADATA,sha256=25rGAJqHthPl5csB16XuFX9HkycPAjnmO-5Mo35SI0U,888
27
- code_loader-1.0.46.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
28
- code_loader-1.0.46.dist-info/RECORD,,
25
+ code_loader-1.0.48.dist-info/LICENSE,sha256=qIwWjdspQeSMTtnFZBC8MuT-95L02FPvzRUdWFxrwJY,1067
26
+ code_loader-1.0.48.dist-info/METADATA,sha256=s65JNpeKwOhpvCS8TY1RFkfSEUTDxGCfiBBjy-b7sh8,888
27
+ code_loader-1.0.48.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
28
+ code_loader-1.0.48.dist-info/RECORD,,