Skip to content

Commit 8b98df9

Browse files
committed
Make src default to github
1 parent 71d097e commit 8b98df9

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

supar/parsers/const.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def predict(self, data, pred=None, lang=None, buckets=8, batch_size=5000, prob=F
126126
return super().predict(**Config().update(locals()))
127127

128128
@classmethod
129-
def load(cls, path, reload=False, src=None, **kwargs):
129+
def load(cls, path, reload=False, src='github', **kwargs):
130130
r"""
131131
Loads a parser with data fields and pretrained model parameters.
132132
@@ -141,7 +141,7 @@ def load(cls, path, reload=False, src=None, **kwargs):
141141
Specifies where to download the model.
142142
``'github'``: github release page.
143143
``'hlt'``: hlt homepage, only accessible from 9:00 to 18:00 (UTC+8).
144-
Default: None.
144+
Default: ``'github'``.
145145
kwargs (dict):
146146
A dict holding unconsumed arguments for updating training configs and initializing the model.
147147
@@ -419,7 +419,7 @@ def predict(self, data, pred=None, lang=None, buckets=8, batch_size=5000, prob=F
419419
return super().predict(**Config().update(locals()))
420420

421421
@classmethod
422-
def load(cls, path, reload=False, src=None, **kwargs):
422+
def load(cls, path, reload=False, src='github', **kwargs):
423423
r"""
424424
Loads a parser with data fields and pretrained model parameters.
425425
@@ -434,7 +434,7 @@ def load(cls, path, reload=False, src=None, **kwargs):
434434
Specifies where to download the model.
435435
``'github'``: github release page.
436436
``'hlt'``: hlt homepage, only accessible from 9:00 to 18:00 (UTC+8).
437-
Default: None.
437+
Default: ``'github'``.
438438
kwargs (dict):
439439
A dict holding unconsumed arguments for updating training configs and initializing the model.
440440

supar/parsers/dep.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def predict(self, data, pred=None, lang=None, buckets=8, batch_size=5000, prob=F
124124
return super().predict(**Config().update(locals()))
125125

126126
@classmethod
127-
def load(cls, path, reload=False, src=None, **kwargs):
127+
def load(cls, path, reload=False, src='github', **kwargs):
128128
r"""
129129
Loads a parser with data fields and pretrained model parameters.
130130
@@ -139,7 +139,7 @@ def load(cls, path, reload=False, src=None, **kwargs):
139139
Specifies where to download the model.
140140
``'github'``: github release page.
141141
``'hlt'``: hlt homepage, only accessible from 9:00 to 18:00 (UTC+8).
142-
Default: None.
142+
Default: ``'github'``.
143143
kwargs (dict):
144144
A dict holding unconsumed arguments for updating training configs and initializing the model.
145145
@@ -437,7 +437,7 @@ def predict(self, data, pred=None, lang=None, buckets=8, batch_size=5000, prob=F
437437
return super().predict(**Config().update(locals()))
438438

439439
@classmethod
440-
def load(cls, path, reload=False, src=None, **kwargs):
440+
def load(cls, path, reload=False, src='github', **kwargs):
441441
r"""
442442
Loads a parser with data fields and pretrained model parameters.
443443
@@ -452,7 +452,7 @@ def load(cls, path, reload=False, src=None, **kwargs):
452452
Specifies where to download the model.
453453
``'github'``: github release page.
454454
``'hlt'``: hlt homepage, only accessible from 9:00 to 18:00 (UTC+8).
455-
Default: None.
455+
Default: ``'github'``.
456456
kwargs (dict):
457457
A dict holding unconsumed arguments for updating training configs and initializing the model.
458458
@@ -657,7 +657,7 @@ def predict(self, data, pred=None, lang=None, buckets=8, batch_size=5000, prob=F
657657
return super().predict(**Config().update(locals()))
658658

659659
@classmethod
660-
def load(cls, path, reload=False, src=None, **kwargs):
660+
def load(cls, path, reload=False, src='github', **kwargs):
661661
r"""
662662
Loads a parser with data fields and pretrained model parameters.
663663
@@ -672,7 +672,7 @@ def load(cls, path, reload=False, src=None, **kwargs):
672672
Specifies where to download the model.
673673
``'github'``: github release page.
674674
``'hlt'``: hlt homepage, only accessible from 9:00 to 18:00 (UTC+8).
675-
Default: None.
675+
Default: ``'github'``.
676676
kwargs (dict):
677677
A dict holding unconsumed arguments for updating training configs and initializing the model.
678678
@@ -966,7 +966,7 @@ def predict(self, data, pred=None, lang=None, buckets=8, batch_size=5000, prob=F
966966
return super().predict(**Config().update(locals()))
967967

968968
@classmethod
969-
def load(cls, path, reload=False, src=None, **kwargs):
969+
def load(cls, path, reload=False, src='github', **kwargs):
970970
r"""
971971
Loads a parser with data fields and pretrained model parameters.
972972
@@ -981,7 +981,7 @@ def load(cls, path, reload=False, src=None, **kwargs):
981981
Specifies where to download the model.
982982
``'github'``: github release page.
983983
``'hlt'``: hlt homepage, only accessible from 9:00 to 18:00 (UTC+8).
984-
Default: None.
984+
Default: ``'github'``.
985985
kwargs (dict):
986986
A dict holding unconsumed arguments for updating training configs and initializing the model.
987987

supar/parsers/sdp.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def predict(self, data, pred=None, lang=None, buckets=8, batch_size=5000, verbos
100100
return super().predict(**Config().update(locals()))
101101

102102
@classmethod
103-
def load(cls, path, reload=False, src=None, **kwargs):
103+
def load(cls, path, reload=False, src='github', **kwargs):
104104
r"""
105105
Loads a parser with data fields and pretrained model parameters.
106106
@@ -115,7 +115,7 @@ def load(cls, path, reload=False, src=None, **kwargs):
115115
Specifies where to download the model.
116116
``'github'``: github release page.
117117
``'hlt'``: hlt homepage, only accessible from 9:00 to 18:00 (UTC+8).
118-
Default: None.
118+
Default: ``'github'``.
119119
kwargs (dict):
120120
A dict holding unconsumed arguments for updating training configs and initializing the model.
121121
@@ -380,7 +380,7 @@ def predict(self, data, pred=None, lang=None, buckets=8, batch_size=5000, verbos
380380
return super().predict(**Config().update(locals()))
381381

382382
@classmethod
383-
def load(cls, path, reload=False, src=None, **kwargs):
383+
def load(cls, path, reload=False, src='github', **kwargs):
384384
r"""
385385
Loads a parser with data fields and pretrained model parameters.
386386
@@ -395,7 +395,7 @@ def load(cls, path, reload=False, src=None, **kwargs):
395395
Specifies where to download the model.
396396
``'github'``: github release page.
397397
``'hlt'``: hlt homepage, only accessible from 9:00 to 18:00 (UTC+8).
398-
Default: None.
398+
Default: ``'github'``.
399399
kwargs (dict):
400400
A dict holding unconsumed arguments for updating training configs and initializing the model.
401401

0 commit comments

Comments
 (0)