This class could be simplifies as just a simple python function:

```python:
def get_topic_ids(topics_path):
    """Utility function to read official topic names from the relevant file.""" 
    topics = open(topics_path).read().split('\n')
    return dict((topics[i], i) for i in range(len(topics))).values()
```

However as the dict datastructure does not store the ordering, this seems buggy to me. Furthermore it does not seem to be used as `all_classes = [0, 1]` during training.