Skip to content

Commit

Permalink
Update Task to new base class
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelFP committed Sep 27, 2023
1 parent 159da77 commit a370276
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions optimas/core/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,13 @@ class Task(NamedBase):
n_opt : int
Number of task evaluations to perform per optimization batch.
"""
n_init: int
n_opt: int

def __init__(
self,
name: str,
n_init: int,
n_opt: int
) -> None:
super().__init__(name)
self._n_init = n_init
self._n_opt = n_opt

@property
def n_init(self) -> int:
return self._n_init

@property
def n_opt(self) -> int:
return self._n_opt
super().__init__(name, n_init=n_init, n_opt=n_opt)

0 comments on commit a370276

Please sign in to comment.