Skip to content

Instantly share code, notes, and snippets.

import re
import typer
import typer.core
class AliasGroup(typer.core.TyperGroup):
"""Typer Group subclass that supports commands with aliases.
To alias a command, include the aliases in the command name,
@gar1t
gar1t / [Guild AI] guild-uat-gist.md
Last active June 26, 2023 21:36
[Guild AI] guild-uat-gist.md

Hello

# Work-around to get train flags into eval run
import pprint
import yaml
print("Merging training flags")
flags = yaml.load(open(".guild/attrs/flags"))
train_flags = yaml.load(open("train_flags"))
for name, val in train_flags.items():
up: guild.pass
down:
main: guild.pass
requires:
- operation: up
warn-if-empty: no
up-steps:
steps:
with open("bigbatch.csv", "w") as f:
f.write("""x,y
1,2
3,4
""")
with open("bigbatch.csv", "w") as f:
f.write("""x,y
1,2
3,4
""")
train:
flags-dest: global:config
flags-import: all
train2:
flags-dest: namespace:config
flags-import: all
[FLAGS]
lr = 0.01
dropout = 0.2
[OTHER]
foo = hello
bar = 123.0
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gar1t
gar1t / [Guild AI] will-share-2.md
Created January 27, 2021 00:21
Guild AI Repository

This is a Guild AI runs repository. To access runs, install Guild AI and run guild pull gist:gar1t/will-share-2. For more information about Guild AI Gist based repositories, see Guild AI - Gists.