Skip to content

Commit

Permalink
fix: expose env variable for workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
maximilianwerk committed Mar 5, 2021
1 parent cb40b44 commit 1f163f2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jina/optimizers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def get_empty_copy(self) -> 'OptimizerCallback':
"""
Return an empty copy of the :class:`OptimizerCallback`.
.. # noqa: DAR202
:raises NotImplementedError: :class:`OptimizerCallback` is just an interface. Please use any implemented subclass.
"""
raise NotImplementedError
Expand All @@ -35,6 +36,7 @@ def get_final_evaluation(self) -> float:
"""
Return the aggregation of all evaluation collected via :method:`__call__`
.. # noqa: DAR202
:raises NotImplementedError: :class:`OptimizerCallback` is just an interface. Please use any implemented subclass.
"""
raise NotImplementedError
Expand Down Expand Up @@ -187,6 +189,8 @@ def _trial_parameter_sampler(self, trial):
trial.workspace = self._workspace_base_dir + '/JINA_WORKSPACE_' + '_'.join(
[str(v) for v in trial_parameters.values()])

trial_parameters['JINA_OPTIMIZER_TRIAL_WORKSPACE'] = trial.workspace

return trial_parameters

@staticmethod
Expand Down

0 comments on commit 1f163f2

Please sign in to comment.