question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Thanks for putting together this library!

I have installed the library on a headless server, along with MongoDB and Visdom. Is there a way to view the results after running from the .yaml configs?

I am testing it out with the example

vel examples-configs/rl/atari/a2c/breakout_a2c.yaml train

Everything trains fine, but then when I look at the logfile at vel/output/openai/breakout_a2c/0/log.txt, it only saves the following:

Logging to /home/ygx/src/vel/output/openai/breakout_a2c/0

And the progress.csv at that directory level is empty.

When looking at the yaml config at https://github.com/yngtodd/vel/blob/master/examples-configs/rl/atari/a2c/breakout_a2c.yaml#L57, I see that it is saving a video. Where is that stored?

Thanks!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
MillionIntegralscommented, Nov 2, 2018

Yes, that’s entirely possible but that requires to rework a bit evaluation command. Currently in the file evaluate_env_command.py I roll out environments and gather only the final reward:

    def record_take(self, model, env_instance, device, takenumber):
        frames = []

        observation = env_instance.reset()

        frames.append(env_instance.render('rgb_array'))

        print("Evaluating environment...")

        while True:
            observation_array = np.expand_dims(np.array(observation), axis=0)
            observation_tensor = torch.from_numpy(observation_array).to(device)
            actions = model.step(observation_tensor, **self.sample_args)['actions']

            observation, reward, done, epinfo = env_instance.step(actions.item())

            frames.append(env_instance.render('rgb_array'))

            if 'episode' in epinfo:
                # End of an episode
                return epinfo['episode']

You’d need to change the logic to gather rewards of each step, aggregate and then plot. To get more meaningful results you probably would also like to disable reward clipping when env is created which is used for training.

0reactions
yngtoddcommented, Nov 14, 2018

Just ran the most recent changes, and it works like a dream!

🔥 vel [master] 🍂  vel examples-configs/rl/atari/a2c/breakout_a2c.yaml evaluate
<ModelConfig at examples-configs/rl/atari/a2c/breakout_a2c.yaml>
================================================================================
Pytorch version: 0.4.1 cuda version 9.0.176 cudnn version 7102
Running model breakout_a2c, run 0 -- command evaluate -- device cuda
CUDA Device name Quadro P620
2018/11/13 - 16:52:51
================================================================================
Storage: <vel.storage.classic.ClassicStorage object at 0x7f025c08b4e0>
Evaluating environment...
Evaluating environment...
Evaluating environment...
Evaluating environment...
Evaluating environment...
       lengths     rewards
count      5.0    5.000000
mean   10001.0  399.000000
std        0.0   34.467376
min    10001.0  341.000000
25%    10001.0  399.000000
50%    10001.0  405.000000
75%    10001.0  425.000000
max    10001.0  425.000000
================================================================================
Done.
2018/11/13 - 16:54:40
================================================================================

Thank you for taking the time to help me out!

Read more comments on GitHub >

github_iconTop Results From Across the Web

3.7 Viewing Results
The Results pane displays SQL command results as HTML formatted table. The number of rows returned appears after the output, and the time...
Read more >
View results - Microsoft Support
Open the form for which you want to review the results, and then select the Responses tab. Select View results to see individual...
Read more >
Viewing results in the results view - IBM
The Software Analyzer Results view tab: lists the analysis configurations that you are working on and those that you have already run; displays...
Read more >
Result viewer - Google Help
Patent results contain full text, figures, the original PDF version, metadata and citations. For viewing figures, the I key toggles the full image...
Read more >
Viewing results - TAO Testing
Click View on the right of the Test-taker whose results you want to see. A results table will appear. The box at the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found