This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
paperspace@pspx59qcl:~/client$ yea run functional_tests/imports/04-batch4.py | |
INFO: Timed out waiting for server to start... http://localhost:37211 1645464371.6856294 | |
INFO: Timed out waiting for server to start... http://localhost:37211 1645464372.6893241 | |
Traceback (most recent call last): | |
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 159, in _new_conn | |
conn = connection.create_connection( | |
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 84, in create_connection | |
raise err | |
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 74, in create_connection | |
sock.connect(sa) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""Test a batch of import telemetry | |
--- | |
id: 0.imports.04-batch4 | |
tag: | |
shard: imports | |
plugin: | |
- wandb | |
depend: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First table/ table for first iteration/epoch | |
original_table = ... # format [id, wandb.Image object, ...] | |
artifact.add(original_table, "my_table") | |
# Log the table as artifact. (optionally)Log the same table in dashboard if you want to | |
run.log_artifact(artifact) | |
run.log({"my_table": original_table}) | |
# Use the logged artifact to get the reference of table | |
run.use_artifact(artifact) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Decision Boundary Utils | |
-# Modified from https://github.com/tmadl/highdimensional-decision-boundary-plot | |
-class DBPlot(BaseEstimator): | |
- def __init__( | |
- self, | |
- estimator=KNeighborsClassifier(n_neighbors=10), | |
- acceptance_threshold=0.03, | |
- n_decision_boundary_keypoints=60, | |
- n_connecting_keypoints=None, | |
- n_interpolated_keypoints=None, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Needs datasets, albumentations | |
from PIL import Image | |
from datasets import load_dataset | |
from datasets.download.download_manager import DownloadMode #, REUSE_DATASET_IF_EXISTS, REUSE_CACHE_IF_EXISTS | |
import albumentations as A | |
from albumentations.pytorch.transforms import ToTensorV2 | |
from albumentations.augmentations.transforms import Normalize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Callable, Dict, Any, List | |
from fastapi import Depends, FastAPI | |
from fastapi.encoders import jsonable_encoder | |
from fastapi.responses import JSONResponse | |
from lanarky.responses import StreamingResponse | |
from langchain.callbacks.manager import AsyncCallbackManager | |
from langchain.callbacks.base import AsyncCallbackHandler | |
from langchain.chat_models import ChatOpenAI | |
from langchain.chains import LLMChain, SequentialChain, ConversationChain | |
from pydantic import BaseModel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Callable, Dict, Any, List | |
from fastapi import Depends, FastAPI | |
from fastapi.encoders import jsonable_encoder | |
from fastapi.responses import JSONResponse | |
from lanarky.responses import StreamingResponse | |
from langchain.callbacks.manager import AsyncCallbackManager | |
from langchain.callbacks.base import AsyncCallbackHandler | |
from langchain.chat_models import ChatOpenAI | |
from langchain.chains import LLMChain, SequentialChain, ConversationChain | |
from pydantic import BaseModel |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import langchain | |
import wandb | |
from typing import Any, Awaitable, Callable, Dict, Optional, Union | |
from fastapi.responses import StreamingResponse as _StreamingResponse | |
from langchain.chains.base import Chain | |
from starlette.background import BackgroundTask | |
from starlette.types import Send | |
from dotenv import load_dotenv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding: utf-8 | |
# In this notebook we will automatically generate a set of evaluation questions based on wandb docs | |
import random | |
import wandb | |
import re | |
import openai | |
import os |