# Issues with Guild file - output-scalars and sourcecode

**URL:** https://guildai.org/t/issues-with-guild-file-output-scalars-and-sourcecode/218
**Category:** Troubleshooting
**Created:** [July 4, 2020, 8:49pm UTC](https://guildai.org/t/issues-with-guild-file-output-scalars-and-sourcecode/218 "2020-07-04T20:49:51Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![samedii](https://yyz1.discourse-cdn.com/flex031/user_avatar/guildai.org/samedii/32/125_2.png) [@samedii](https://guildai.org/u/samedii)
#### Post date: [July 4, 2020, 8:49pm UTC](https://guildai.org/t/issues-with-guild-file-output-scalars-and-sourcecode/218/1 "2020-07-04T20:49:51Z")

</div>

This looks like it would solve the issue but I’m getting new issues with my guild file.

It’s complaining about `output-scalars: off`

```
  operations:
    search_lr:
      main: search_lr
      flags-import: all
      output-scalars: off
      requires:
        - database
    train:

```

```
ERROR: error loading guildfile from .: error in /home/richard/Documents/league/guild.yml: invalid value for output-scalars: False

```

I checked here: [Scalars](https://guildai.org/t/scalars/160) and it seems like I’m doing it correctly?

If I remove that then it starts complaining about my sourcecode:

```
  sourcecode:
    - '*.py'
    - '*.json'
    - guild.yml
    - exclude:
        file:
          - riot_api_key.py
        dir:
          - tb
          - checkpoints
          - matches
          - match_histories

```

```
ERROR: error loading guildfile from .: error in /home/richard/Documents/league/guild.yml: invalid exclude value: {'file': ['riot_api_key.py'], 'dir': ['tb', 'checkpoints', 'matches', 'match_histories']}

```

The list probably continues after fixing these issues so I think it’s better to wait with this.

---

<div class="post-metadata">

### Author: ![garrett](https://yyz1.discourse-cdn.com/flex031/user_avatar/guildai.org/garrett/32/224_2.png) [@garrett](https://guildai.org/u/garrett)
#### Post date: [July 4, 2020, 8:59pm UTC](https://guildai.org/t/issues-with-guild-file-output-scalars-and-sourcecode/218/2 "2020-07-04T20:59:52Z")

</div>

I’ll look into the `off` issue - likely a bug.

For your `exclude` spec, it’s either `dir` or `file`. The intent is to denote what type of path is being excluded. There’s an optimization for excluding dirs where Guild doesn’t bother scanning the dir for matches. Otherwise an exclude is treated as a pattern is applied to every file in your project.

You want this:

```yaml
 sourcecode:
    - '*.py'
    - '*.json'
    - guild.yml
    - exclude: riot_api_key.py
    - exclude:
        dir:
          - tb
          - checkpoints
          - matches
          - match_histories

```

I’ve never really liked this spelling. There are other options that apply to `include` and `exclude` so there’s some sense to it, but it’s not particularly intuitive to me.

---

<div class="post-metadata">

### Author: ![garrett](https://yyz1.discourse-cdn.com/flex031/user_avatar/guildai.org/garrett/32/224_2.png) [@garrett](https://guildai.org/u/garrett)
#### Post date: [July 4, 2020, 9:02pm UTC](https://guildai.org/t/issues-with-guild-file-output-scalars-and-sourcecode/218/3 "2020-07-04T21:02:48Z")

</div>

Regarding the `output-scalars` error when you use `off` what version of Guild are you using? This is working on my end with 0.7.0.rc11.

---

<div class="post-metadata">

### Author: ![samedii](https://yyz1.discourse-cdn.com/flex031/user_avatar/guildai.org/samedii/32/125_2.png) [@samedii](https://guildai.org/u/samedii)
#### Post date: [July 4, 2020, 9:40pm UTC](https://guildai.org/t/issues-with-guild-file-output-scalars-and-sourcecode/218/4 "2020-07-04T21:40:47Z")

</div>

I used the latest master 341abcd46eb13158275cf5254888d32b4b8203cf

---

<div class="post-metadata">

### Author: ![garrett](https://yyz1.discourse-cdn.com/flex031/user_avatar/guildai.org/garrett/32/224_2.png) [@garrett](https://guildai.org/u/garrett)
#### Post date: [July 4, 2020, 9:54pm UTC](https://guildai.org/t/issues-with-guild-file-output-scalars-and-sourcecode/218/5 "2020-07-04T21:54:45Z")

</div>

I can’t explain this error with `output-scalars`. Guild doesn’t even generate that string format.

It’s possible that an older version of Guild is in play here?

Does `guild check` shows version `0.7.0.rc11` and `guild_install_location` pointing to the repo code?

---

<div class="post-metadata">

### Author: ![garrett](https://yyz1.discourse-cdn.com/flex031/user_avatar/guildai.org/garrett/32/224_2.png) [@garrett](https://guildai.org/u/garrett)
#### Post date: [July 4, 2020, 9:56pm UTC](https://guildai.org/t/issues-with-guild-file-output-scalars-and-sourcecode/218/6 "2020-07-04T21:56:41Z")

</div>

The next is to see if there’s a small Guild file that replicates that and send it my way. Looking over the current source I just don’t see how it’s possible to get that error message.

---

<div class="post-metadata">

### Author: ![samedii](https://yyz1.discourse-cdn.com/flex031/user_avatar/guildai.org/samedii/32/125_2.png) [@samedii](https://guildai.org/u/samedii)
#### Post date: [July 5, 2020, 3:46pm UTC](https://guildai.org/t/issues-with-guild-file-output-scalars-and-sourcecode/218/7 "2020-07-05T15:46:57Z")

</div>

You were right. I pulled latest master but it fetched only up to 0.6.4. Didn’t care to find out why but cloned everything again instead. I gave up at the point of updating my PATH variable after building guild. Sorry I don’t feel strongly enough about this to warrant this much time. I can wait for the next release.

---

<div class="post-metadata">

### Author: ![garrett](https://yyz1.discourse-cdn.com/flex031/user_avatar/guildai.org/garrett/32/224_2.png) [@garrett](https://guildai.org/u/garrett)
#### Post date: [July 5, 2020, 3:50pm UTC](https://guildai.org/t/issues-with-guild-file-output-scalars-and-sourcecode/218/8 "2020-07-05T15:50:28Z")

</div>

Understandable. For a quick check you can run the script directly (`<repo>/guild/scripts/guild`) without configuring your path. Setting up an alias to that works as well if you want to run from source. No biggie though. There’ll be a quick followup release to 0.7 with this fix.

---

<div class="post-metadata">

### Author: ![samedii](https://yyz1.discourse-cdn.com/flex031/user_avatar/guildai.org/samedii/32/125_2.png) [@samedii](https://guildai.org/u/samedii)
#### Post date: [July 5, 2020, 4:04pm UTC](https://guildai.org/t/issues-with-guild-file-output-scalars-and-sourcecode/218/9 "2020-07-05T16:04:39Z")

</div>

Ok. I tried this `<repo>/guild/scripts/guild tensorboard 1` and it started very quickly. Seems to work.
