Skip to content
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

fix: expose env variable for workspace #2114

Merged
merged 1 commit into from
Mar 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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