mirror of
https://github.com/Steffo99/unimore-bda-6.git
synced 2024-11-25 01:04:19 +00:00
Count runs
This commit is contained in:
parent
b4573d5eab
commit
2bd97cbad2
2 changed files with 10 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="unimore_bda_6" type="PythonConfigurationType" factoryName="Python" nameIsGenerated="true">
|
<configuration default="false" name="unimore_bda_6" type="PythonConfigurationType" factoryName="Python" nameIsGenerated="true">
|
||||||
<module name="unimore-bda-6" />
|
<module name="unimore-bda-6" />
|
||||||
<option name="INTERPRETER_OPTIONS" value="-O" />
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
<option name="PARENT_ENVS" value="true" />
|
<option name="PARENT_ENVS" value="true" />
|
||||||
<envs>
|
<envs>
|
||||||
<env name="PYTHONUNBUFFERED" value="1" />
|
<env name="PYTHONUNBUFFERED" value="1" />
|
||||||
|
|
|
@ -36,7 +36,7 @@ def main():
|
||||||
for sample_func in [sample_reviews_varied, sample_reviews_polar]:
|
for sample_func in [sample_reviews_varied, sample_reviews_polar]:
|
||||||
|
|
||||||
slog = logging.getLogger(f"{__name__}.{sample_func.__name__}")
|
slog = logging.getLogger(f"{__name__}.{sample_func.__name__}")
|
||||||
slog.debug(f"Selected sample_func: %s", sample_func)
|
slog.debug("Selected sample_func: %s", sample_func)
|
||||||
|
|
||||||
for SentimentAnalyzer in [
|
for SentimentAnalyzer in [
|
||||||
TensorflowSentimentAnalyzer,
|
TensorflowSentimentAnalyzer,
|
||||||
|
@ -44,7 +44,7 @@ def main():
|
||||||
]:
|
]:
|
||||||
|
|
||||||
slog = logging.getLogger(f"{__name__}.{sample_func.__name__}.{SentimentAnalyzer.__name__}")
|
slog = logging.getLogger(f"{__name__}.{sample_func.__name__}.{SentimentAnalyzer.__name__}")
|
||||||
slog.debug(f"Selected SentimentAnalyzer: %s", SentimentAnalyzer)
|
slog.debug("Selected SentimentAnalyzer: %s", SentimentAnalyzer)
|
||||||
|
|
||||||
for Tokenizer in [
|
for Tokenizer in [
|
||||||
PlainTokenizer,
|
PlainTokenizer,
|
||||||
|
@ -55,10 +55,16 @@ def main():
|
||||||
]:
|
]:
|
||||||
|
|
||||||
slog = logging.getLogger(f"{__name__}.{sample_func.__name__}.{SentimentAnalyzer.__name__}.{Tokenizer.__name__}")
|
slog = logging.getLogger(f"{__name__}.{sample_func.__name__}.{SentimentAnalyzer.__name__}.{Tokenizer.__name__}")
|
||||||
slog.debug(f"Selected Tokenizer: %s", Tokenizer)
|
slog.debug("Selected Tokenizer: %s", Tokenizer)
|
||||||
|
|
||||||
|
run_counter = 0
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
|
|
||||||
|
slog = logging.getLogger(f"{__name__}.{sample_func.__name__}.{SentimentAnalyzer.__name__}.{Tokenizer.__name__}.{run_counter}")
|
||||||
|
run_counter += 1
|
||||||
|
slog.debug("Run #%d", run_counter)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
slog.debug("Instantiating %s with %s...", SentimentAnalyzer, Tokenizer)
|
slog.debug("Instantiating %s with %s...", SentimentAnalyzer, Tokenizer)
|
||||||
sa = SentimentAnalyzer(tokenizer=Tokenizer())
|
sa = SentimentAnalyzer(tokenizer=Tokenizer())
|
||||||
|
|
Loading…
Reference in a new issue