Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postprocessing #52

Merged
merged 33 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
17d9cc3
Clean up API structure
jmilldotdev Jan 6, 2025
074a70d
refactor API code
jmilldotdev Jan 6, 2025
4b6af32
refactor client file prep to use the same method
jmilldotdev Jan 6, 2025
9d40a50
more refactor
jmilldotdev Jan 6, 2025
ffc46a7
maybe it works?
jmilldotdev Jan 7, 2025
0cd3c04
it seems to work
jmilldotdev Jan 7, 2025
17152aa
remove unnecessary cron file
jmilldotdev Jan 7, 2025
d04a7cf
add more info when deplying without TEST_ALL
aiXander Jan 7, 2025
1aa3777
merge
jmilldotdev Jan 7, 2025
5d31396
Add ably heartbeat
jmilldotdev Jan 7, 2025
fb8deb1
add trigger model
jmilldotdev Jan 7, 2025
bf9fea9
okay it appears to all work
jmilldotdev Jan 7, 2025
9a9dfc4
Merge pull request #48 from edenartlab/feat/user-crons
genekogan Jan 7, 2025
b4bf0ca
fix circular?
jmilldotdev Jan 7, 2025
1da45bb
fix build again
jmilldotdev Jan 7, 2025
f51b9cd
one more fix build
jmilldotdev Jan 7, 2025
57f8608
Changing deployer
jmilldotdev Jan 7, 2025
fc57078
change agent file again
jmilldotdev Jan 7, 2025
1e83cf5
Fix deployment via api
jmilldotdev Jan 7, 2025
2ecb68d
Add openAI streaming theoretically
jmilldotdev Jan 7, 2025
f201b9d
Remove a stray print
jmilldotdev Jan 7, 2025
2ceda04
add view on eden button to discord client
jmilldotdev Jan 7, 2025
6107b0d
Merge pull request #51 from edenartlab/jmill/work
genekogan Jan 7, 2025
63edb03
Logging & error handling upgrades for API and discord client
jmilldotdev Jan 8, 2025
951ff91
add more verbosity in deploys
aiXander Jan 8, 2025
7805e9c
upgrade replicate client
genekogan Jan 8, 2025
6fd81f2
set hydra stage
aiXander Jan 8, 2025
d668faf
canceling
genekogan Jan 8, 2025
93afed9
postprocessing task
genekogan Jan 8, 2025
4974c30
postprocessing task
genekogan Jan 8, 2025
f426e03
forgot this file
genekogan Jan 8, 2025
c904cc7
fix cancel
genekogan Jan 8, 2025
4009a52
fix cancelg
genekogan Jan 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ jobs:

- name: Deploy to Modal
working-directory: eve
run: rye run modal deploy ./eve/api.py
run: rye run modal deploy ./eve/api/api.py
2 changes: 1 addition & 1 deletion .github/workflows/staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ jobs:

- name: Deploy to Modal
working-directory: eve
run: rye run modal deploy ./eve/api.py
run: rye run modal deploy ./eve/api/api.py
11 changes: 9 additions & 2 deletions comfyui.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
specific_test = os.getenv("SPECIFIC_TEST") if os.getenv("SPECIFIC_TEST") else ""
skip_tests = os.getenv("SKIP_TESTS")

# Run a bunch of checks to verify input args:
if test_all and specific_test:
print(f"WARNING: can't have both TEST_ALL and SPECIFIC_TEST at the same time...")
print(f"Running TEST_ALL instead")
Expand All @@ -80,6 +81,11 @@
print(f"skip_tests: {skip_tests}")
print("========================================")

if not test_workflows and workspace_name and not test_all:
print("\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
print("!!!! WARNING: You are deploying a workspace without TEST_ALL !!!!")
print("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n")

def install_comfyui():
snapshot = json.load(open("/root/workspace/snapshot.json", 'r'))
comfyui_commit_sha = snapshot["comfyui"]
Expand Down Expand Up @@ -362,7 +368,8 @@ def test_workflows(self):
else:
tests = [f"/root/workspace/workflows/{workflow}/test.json"]
print(f"====> Running tests for {workflow}: ", tests)
for test in tests:
for i, test in enumerate(tests):
print(f"\n\n\n------------------ Running test {i+1} of {len(tests)} ------------------")
tool = Tool.from_yaml(f"/root/workspace/workflows/{workflow}/api.yaml")
if tool.status == "inactive":
print(f"{workflow} is inactive, skipping test")
Expand Down Expand Up @@ -691,7 +698,7 @@ def validate_url(url):
#print("found lora:\n", lora)

if not lora:
raise Exception(f"Lora {key} with id: {lora_id} not found!")
raise Exception(f"Lora {key} with id: {lora_id} not found in DB {db}!")

base_model = lora.get("base_model")
lora_url = lora.get("checkpoint")
Expand Down
13 changes: 10 additions & 3 deletions eve/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import logging
import sentry_sdk
from dotenv import load_dotenv
from pathlib import Path
Expand All @@ -6,17 +7,20 @@

home_dir = str(Path.home())


EDEN_API_KEY = None

logging.basicConfig(
level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
)


def load_env(db):
global EDEN_API_KEY

db = db.upper()
if db not in ["STAGE", "PROD"]:
raise ValueError(f"Invalid database: {db}")

os.environ["DB"] = db

# First try ~/.eve
Expand All @@ -37,7 +41,10 @@ def load_env(db):

# start sentry
sentry_dsn = os.getenv("SENTRY_DSN")
sentry_sdk.init(dsn=sentry_dsn, traces_sample_rate=1.0, profiles_sample_rate=1.0)
if sentry_dsn:
sentry_sdk.init(
dsn=sentry_dsn, traces_sample_rate=1.0, profiles_sample_rate=1.0
)

# load api keys
EDEN_API_KEY = SecretStr(os.getenv("EDEN_API_KEY", ""))
Expand Down
1 change: 0 additions & 1 deletion eve/agent.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import os
import yaml
import time
import json
import traceback
Expand Down
Loading
Loading