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

Medicalai ErrorStoppping Not Working #8

Open
zeynepkoyun opened this issue Nov 15, 2021 · 3 comments
Open

Medicalai ErrorStoppping Not Working #8

zeynepkoyun opened this issue Nov 15, 2021 · 3 comments

Comments

@zeynepkoyun
Copy link

zeynepkoyun commented Nov 15, 2021

Hi @aibharata

When we want to stop the training early with medicalai via a callback called EarlyStopping, it gives an error at line 209 in the file "medicalai/chief/core.py".
How should the data be defined here, because it is desired to behave like a string first and then a dictionary.
Can you share sample data?

Error line

if bestModelCond is not None and bestModelCond.lower() != 'default':
print('\n[INFO]: ENGINE INITIALIZED WITH "SAVING BEST MODEL" and Early Stopping MODE\n')
earlystop_callback = tf.keras.callbacks.EarlyStopping(
monitor=bestModelCond['monitor'],
min_delta=bestModelCond['min_delta'],
patience=bestModelCond['patience']
)
if callbacks is None:
callbacks=[earlystop_callback]
else:
callbacks.append(earlystop_callback)

@zeynepkoyun
Copy link
Author

Hi @aibharata

When we want to stop the training early with medicalai via a callback called EarlyStopping, it gives an error at line 209 in the file "medicalai/chief/core.py". How should the data be defined here, because it is desired to behave like a string first and then a dictionary. Can you share sample data?

Error line

if bestModelCond is not None and bestModelCond.lower() != 'default': print('\n[INFO]: ENGINE INITIALIZED WITH "SAVING BEST MODEL" and Early Stopping MODE\n') earlystop_callback = tf.keras.callbacks.EarlyStopping( monitor=bestModelCond['monitor'], min_delta=bestModelCond['min_delta'], patience=bestModelCond['patience'] ) if callbacks is None: callbacks=[earlystop_callback] else: callbacks.append(earlystop_callback)

Hi @aibharata

is there any progress on this?

@aibharata
Copy link
Owner

Hi @zeynepkoyun,

Thank you for bringing this to our notice. There are a few bugs here. bestModelCond = 'default' should have initialized the conditions, but it doesn't as of now.

Currently, it expects a dictionary. You can initialize and pass bestModelCond like this :

bestModelCond  = {
    monitor='val_accuracy', 
    patience=8, 
    min_delta=0.001, 
}

We will issue a bug fix in a few days to support more conditions.

By the way, which version are you using currently? 1.1.59 or 1.2.9.2rc0

@zeynepkoyun
Copy link
Author

Merhaba @zeynepkoyun ,

Bunu dikkatimize sunduğunuz için teşekkür ederiz. Burada birkaç bug var. bestModelCond = 'default' koşulları başlatmalıydı, ama şu an için değil.

Şu anda, bir sözlük bekliyor. bestModelCond'u şu şekilde başlatabilir ve iletebilirsiniz:

bestModelCond  = {
    monitor='val_accuracy', 
    patience=8, 
    min_delta=0.001, 
}

Daha fazla koşulu desteklemek için birkaç gün içinde bir hata düzeltmesi yayınlayacağız.

Bu arada, şu anda hangi sürümü kullanıyorsunuz? 1.1.59 or 1.2.9.2rc0

Hi @aibharata
I'll try and let you know.
The version I am currently using is 1.1.59.
I will be waiting for the new version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants