keita____
@keita____

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

metaflowのエラー

解決したいこと

ある方の記事を参考にしながらseq2seqでテキスト生成をやっています。metaflowをインストールをしたはずなのに、おそらくそこでエラーが出ていると思います。どうやったら解決できるか知りたいです。

発生している問題・エラー

Metaflow 2.9.4 executing TextGenFlow for user:
Validating your flow...
    The graph looks good!
Running pylint...
    Pylint not found, so extra checks are disabled.
※pip install metaflowは行っています。

該当するソースコード

# -*- coding: utf-8 -*-
from metaflow import FlowSpec, step
from readfile import readfile, prepareData
from encoder import EncoderRNN
from attnDecoderRNN import AttnDecoderRNN
from trainer import Trainer

INPUT = "INPUT"
OUTPUT = "OUTPUT"

class TextGenFlow(FlowSpec):

    @step
    def start(self):
        print("Reading File...")
        text_df = readfile("data/entail_evaluation_set.txt")
        self.src, self.target, self.pairs = prepareData(INPUT, OUTPUT, text_df)
        self.next(self.init_network)

    @step
    def init_network(self):
        print("Initializing Network...")
        hidden_size = 256
        self.encoder = EncoderRNN(self.src.n_words, hidden_size)
        self.attn_decoder = AttnDecoderRNN(hidden_size, self.target.n_words, dropout_p=0.1)
        self.next(self.train)

    @step
    def train(self):
        print("Training...")
        self.trainer = Trainer(src=self.src, target=self.target, pairs=self.pairs)
        self.encoder, self.decoder = self.trainer.trainIters(encoder=self.encoder, decoder=self.attn_decoder, n_iters=75000)
        self.next(self.end)

    @step
    def end(self):
        print("Evaluation...")
        self.trainer.evaluateRandomly(encoder=self.encoder, decoder=self.attn_decoder)

if __name__ == '__main__':
    TextGenFlow()
0

1Answer

Comments

  1. @keita____

    Questioner

    回答ありがとうございます。やってみたところこのようになりました。まだエラーの様なものが出るのですが、、、どうすればいいでしょうか??
    Metaflow 2.9.4 executing TextGenFlow for user:
    Validating your flow...
    The graph looks good!
    Running pylint...
    Pylint is happy!

    '/Users/•••/main.py show' shows a description of this flow.
    '/Users/•••/main.py run' runs the flow locally.
    '/Users/•••/main.py help' shows all available commands and options.

Your answer might help someone💌