id int64 1 6.07M | name stringlengths 1 295 | code stringlengths 12 426k | language stringclasses 1
value | source_file stringlengths 5 202 | start_line int64 1 158k | end_line int64 1 158k | repo dict |
|---|---|---|---|---|---|---|---|
2,201 | PollExit | def PollExit(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.una... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 797 | 811 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,202 | ServerInfo | def ServerInfo(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.u... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 814 | 828 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,203 | Shutdown | def Shutdown(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.una... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 831 | 845 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,204 | RunStatus | def RunStatus(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.un... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 848 | 862 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,205 | RunExit | def RunExit(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unar... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 865 | 879 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,206 | RunPreempting | def RunPreempting(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimenta... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 882 | 896 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,207 | Metric | def Metric(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 899 | 913 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,208 | PartialLog | def PartialLog(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.u... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 916 | 930 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,209 | Log | def Log(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_un... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 933 | 947 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,210 | Summary | def Summary(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unar... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 950 | 964 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,211 | Config | def Config(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 967 | 981 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,212 | Files | def Files(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 984 | 998 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,213 | Output | def Output(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 1,001 | 1,015 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,214 | OutputRaw | def OutputRaw(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.un... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 1,018 | 1,032 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,215 | Telemetry | def Telemetry(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.un... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 1,035 | 1,049 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,216 | Alert | def Alert(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 1,052 | 1,066 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,217 | Artifact | def Artifact(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.una... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 1,069 | 1,083 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,218 | LinkArtifact | def LinkArtifact(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 1,086 | 1,100 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,219 | UseArtifact | def UseArtifact(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 1,103 | 1,117 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,220 | ArtifactSend | def ArtifactSend(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 1,120 | 1,134 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,221 | ArtifactPoll | def ArtifactPoll(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 1,137 | 1,151 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,222 | Cancel | def Cancel(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 1,154 | 1,168 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,223 | Keepalive | def Keepalive(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.un... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 1,171 | 1,185 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,224 | CheckVersion | def CheckVersion(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 1,188 | 1,202 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,225 | Pause | def Pause(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 1,205 | 1,219 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,226 | Resume | def Resume(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 1,222 | 1,236 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,227 | Status | def Status(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 1,239 | 1,253 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,228 | ServerShutdown | def ServerShutdown(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experiment... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 1,256 | 1,270 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,229 | ServerStatus | def ServerStatus(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 1,273 | 1,287 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,230 | ServerInformInit | def ServerInformInit(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experime... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 1,290 | 1,304 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,231 | ServerInformStart | def ServerInformStart(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experim... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 1,307 | 1,321 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,232 | ServerInformFinish | def ServerInformFinish(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experi... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 1,324 | 1,338 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,233 | ServerInformAttach | def ServerInformAttach(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experi... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 1,341 | 1,355 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,234 | ServerInformDetach | def ServerInformDetach(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experi... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 1,358 | 1,372 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,235 | ServerInformTeardown | def ServerInformTeardown(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.expe... | python | wandb/proto/v3/wandb_server_pb2_grpc.py | 1,375 | 1,389 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,236 | error | def error(self, message):
raise ArgumentException() | python | wandb/integration/magic.py | 28 | 29 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,237 | _merge_dicts | def _merge_dicts(source, destination):
for key, value in source.items():
if isinstance(value, dict):
node = destination.setdefault(key, {})
_merge_dicts(value, node)
else:
destination[key] = value
return destination | python | wandb/integration/magic.py | 32 | 39 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,238 | _dict_from_keyval | def _dict_from_keyval(k, v, json_parse=True):
d = ret = {}
keys = k.split(".")
for k in keys[:-1]:
d = d.setdefault(k, {})
if json_parse:
try:
v = json.loads(v.strip('"'))
except ValueError:
pass
d[keys[-1]] = v
return ret | python | wandb/integration/magic.py | 42 | 53 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,239 | _magic_get_config | def _magic_get_config(k, default):
d = _magic_config
keys = k.split(".")
for k in keys[:-1]:
d = d.get(k, {})
return d.get(keys[-1], default) | python | wandb/integration/magic.py | 56 | 61 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,240 | _parse_magic | def _parse_magic(val):
# attempt to treat string as a json
not_set = {}
if val is None:
return _magic_defaults, not_set
if val.startswith("{"):
try:
val = json.loads(val)
except ValueError:
wandb.termwarn("Unable to parse magic json", repeat=False)
... | python | wandb/integration/magic.py | 120 | 162 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,241 | set_entity | def set_entity(value, env=None):
if env is None:
env = os.environ | python | wandb/integration/magic.py | 165 | 167 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,242 | _fit_wrapper | def _fit_wrapper(self, fn, generator=None, *args, **kwargs):
trigger.call("on_fit")
keras = sys.modules.get("keras", None)
tfkeras = sys.modules.get("tensorflow.python.keras", None)
epochs = kwargs.pop("epochs", None)
batch_size = kwargs.pop("batch_size", None)
magic_epochs = _magic_get_config(... | python | wandb/integration/magic.py | 170 | 269 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,243 | _magic_fit | def _magic_fit(
self,
x=None,
y=None,
batch_size=None,
epochs=1,
# FIXME: there is more
# verbose=1,
# callbacks=None,
# validation_split=0.,
# validation_data=None,
# shuffle=True,
# class_weight=None,
# sample_weight=None,
# initial_epoch=0,
# steps_per_epoc... | python | wandb/integration/magic.py | 273 | 303 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,244 | _magic_fit_generator | def _magic_fit_generator(
self,
generator,
steps_per_epoch=None,
epochs=1,
# FIXME: there is more
# verbose=1,
# verbose=1,
# callbacks=None,
# validation_data=None,
# validation_steps=None,
# validation_freq=1,
# class_weight=None,
# max_queue_size=10,
# workers=... | python | wandb/integration/magic.py | 306 | 335 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,245 | _monkey_tfkeras | def _monkey_tfkeras():
from tensorflow import keras as tfkeras
from wandb.integration.keras import WandbCallback # add keras import hooks first
models = getattr(tfkeras, "models", None)
if not models:
return
models.Model._keras_or_tfkeras = tfkeras
if models.Model.fit == _magic_fit:
... | python | wandb/integration/magic.py | 338 | 352 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,246 | _monkey_absl | def _monkey_absl():
from absl import app as absl_app
def _absl_callback():
absl_flags = sys.modules.get("absl.flags")
if not absl_flags:
return
_flags = getattr(absl_flags, "FLAGS", None)
if not _flags:
return
_flags_as_dict = getattr(_flags, "fla... | python | wandb/integration/magic.py | 355 | 383 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,247 | _absl_callback | def _absl_callback():
absl_flags = sys.modules.get("absl.flags")
if not absl_flags:
return
_flags = getattr(absl_flags, "FLAGS", None)
if not _flags:
return
_flags_as_dict = getattr(_flags, "flag_values_dict", None)
if not _flags_as_dict:
... | python | wandb/integration/magic.py | 358 | 378 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,248 | _process_system_args | def _process_system_args():
global _args_system
# try using argparse
parser = SafeArgumentParser(add_help=False)
for num, arg in enumerate(sys.argv):
try:
next_arg = sys.argv[num + 1]
except IndexError:
next_arg = ""
if arg.startswith(("-", "--")) and not ... | python | wandb/integration/magic.py | 386 | 405 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,249 | _monkey_argparse | def _monkey_argparse():
argparse._ArgumentParser = argparse.ArgumentParser
def _install():
argparse.ArgumentParser = MonitoredArgumentParser
def _uninstall():
argparse.ArgumentParser = argparse._ArgumentParser
def monitored(self, args, unknown=None):
global _args_argparse
... | python | wandb/integration/magic.py | 408 | 438 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,250 | _install | def _install():
argparse.ArgumentParser = MonitoredArgumentParser | python | wandb/integration/magic.py | 411 | 412 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,251 | _uninstall | def _uninstall():
argparse.ArgumentParser = argparse._ArgumentParser | python | wandb/integration/magic.py | 414 | 415 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,252 | monitored | def monitored(self, args, unknown=None):
global _args_argparse
_args_argparse = copy.deepcopy(vars(args)) | python | wandb/integration/magic.py | 417 | 419 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,253 | __init__ | def __init__(self, *args, **kwargs):
_uninstall()
super().__init__(*args, **kwargs)
_install() | python | wandb/integration/magic.py | 422 | 425 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,254 | parse_args | def parse_args(self, *args, **kwargs):
args = super().parse_args(*args, **kwargs)
return args | python | wandb/integration/magic.py | 427 | 429 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,255 | parse_known_args | def parse_known_args(self, *args, **kwargs):
args, unknown = super().parse_known_args(*args, **kwargs)
if self._callback:
self._callback(args, unknown=unknown)
return args, unknown | python | wandb/integration/magic.py | 431 | 435 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,256 | _magic_update_config | def _magic_update_config():
# if we already have config set, don't add anymore
if wandb.run and wandb.run.config:
c = wandb.run.config
user_config = dict(c.items())
# ignore keys set by magic integration when checking
# if user added any keys
if set(user_config).differenc... | python | wandb/integration/magic.py | 441 | 462 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,257 | _magic_init | def _magic_init(**kwargs):
magic_arg = kwargs.get("magic", None)
if magic_arg is not None and magic_arg is not False:
global _magic_init_seen
if _magic_init_seen and magic_arg is not True:
wandb.termwarn(
"wandb.init() magic argument ignored because wandb magic has al... | python | wandb/integration/magic.py | 465 | 479 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,258 | magic_install | def magic_install(init_args=None):
if wandb.setup().settings._noop:
return
global _run_once
if _run_once:
return
_run_once = True
global _magic_config
global _import_hook
# parse config early, before we have wandb.config overrides
_magic_config, magic_set = _parse_magic... | python | wandb/integration/magic.py | 482 | 556 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,259 | __init__ | def __init__(
self,
yolo: YOLO,
run_name: Optional[str] = None,
project: Optional[str] = None,
tags: Optional[List[str]] = None,
resume: Optional[str] = None,
**kwargs: Optional[Any],
) -> None:
"""A utility class to manage wandb run and various callba... | python | wandb/integration/yolov8/yolov8.py | 26 | 50 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,260 | on_pretrain_routine_start | def on_pretrain_routine_start(self, trainer: BaseTrainer) -> None:
"""Starts a new wandb run to track the training process and log to Weights & Biases.
Args:
trainer: A task trainer that's inherited from `:class:ultralytics.yolo.engine.trainer.BaseTrainer`
that contains ... | python | wandb/integration/yolov8/yolov8.py | 52 | 89 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,261 | on_pretrain_routine_end | def on_pretrain_routine_end(self, trainer: BaseTrainer) -> None:
self.run.summary.update(
{
"model/parameters": get_num_params(trainer.model),
"model/GFLOPs": round(get_flops(trainer.model), 3),
}
) | python | wandb/integration/yolov8/yolov8.py | 91 | 97 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,262 | on_train_epoch_start | def on_train_epoch_start(self, trainer: BaseTrainer) -> None:
"""On train epoch start we only log epoch number to the Weights & Biases run."""
# We log the epoch number here to commit the previous step,
self.run.log({"epoch": trainer.epoch + 1}) | python | wandb/integration/yolov8/yolov8.py | 99 | 102 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,263 | on_train_epoch_end | def on_train_epoch_end(self, trainer: BaseTrainer) -> None:
"""On train epoch end we log all the metrics to the Weights & Biases run."""
self.run.log(
{
**trainer.metrics,
**trainer.label_loss_items(trainer.tloss, prefix="train"),
**trainer.lr,... | python | wandb/integration/yolov8/yolov8.py | 104 | 122 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,264 | on_fit_epoch_end | def on_fit_epoch_end(self, trainer: BaseTrainer) -> None:
"""On fit epoch end we log all the best metrics and model detail to Weights & Biases run summary."""
if trainer.epoch == 0:
speeds = [
trainer.validator.speed.get(
key,
)
... | python | wandb/integration/yolov8/yolov8.py | 124 | 146 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,265 | on_train_end | def on_train_end(self, trainer: BaseTrainer) -> None:
"""On train end we log all the media, including plots, images and best model artifact to Weights & Biases."""
# Currently only the detection and segmentation trainers save images to the save_dir
if not isinstance(trainer, ClassificationTraine... | python | wandb/integration/yolov8/yolov8.py | 148 | 171 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,266 | on_model_save | def on_model_save(self, trainer: BaseTrainer) -> None:
"""On model save we log the model as an artifact to Weights & Biases."""
self.run.log_artifact(
str(trainer.last),
type="model",
name=f"{self.run.name}_{trainer.args.task}.pt",
aliases=["last", f"epoch... | python | wandb/integration/yolov8/yolov8.py | 173 | 180 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,267 | teardown | def teardown(self, _trainer: BaseTrainer) -> None:
"""On teardown, we finish the Weights & Biases run and set it to None."""
self.run.finish()
self.run = None | python | wandb/integration/yolov8/yolov8.py | 182 | 185 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,268 | callbacks | def callbacks(
self,
) -> Dict[str, Callable]:
"""Property contains all the relevant callbacks to add to the YOLO model for the Weights & Biases logging."""
return {
"on_pretrain_routine_start": self.on_pretrain_routine_start,
"on_pretrain_routine_end": self.on_pretra... | python | wandb/integration/yolov8/yolov8.py | 188 | 201 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,269 | add_callbacks | def add_callbacks(
yolo: YOLO,
run_name: Optional[str] = None,
project: Optional[str] = None,
tags: Optional[List[str]] = None,
resume: Optional[str] = None,
**kwargs: Optional[Any],
) -> YOLO:
"""A YOLO model wrapper that tracks metrics, and logs models to Weights & Biases.
Args:
... | python | wandb/integration/yolov8/yolov8.py | 204 | 250 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,270 | _check_keras_version | def _check_keras_version():
from keras import __version__ as keras_version
from pkg_resources import parse_version
if parse_version(keras_version) < parse_version("2.4.0"):
wandb.termwarn(
f"Keras version {keras_version} is not fully supported. Required keras >= 2.4.0"
) | python | wandb/integration/keras/keras.py | 22 | 29 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,271 | _can_compute_flops | def _can_compute_flops() -> bool:
"""
FLOPS computation is restricted to TF 2.x as it requires tf.compat.v1
"""
from pkg_resources import parse_version
if parse_version(tf.__version__) >= parse_version("2.0.0"):
return True
return False | python | wandb/integration/keras/keras.py | 32 | 41 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,272 | is_dataset | def is_dataset(data):
dataset_ops = wandb.util.get_module("tensorflow.python.data.ops.dataset_ops")
if dataset_ops and hasattr(dataset_ops, "DatasetV2"):
dataset_types = (dataset_ops.DatasetV2,)
if hasattr(dataset_ops, "DatasetV1"):
dataset_types = dataset_types + (dataset_ops.Datase... | python | wandb/integration/keras/keras.py | 53 | 61 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,273 | is_generator_like | def is_generator_like(data):
# Checks if data is a generator, Sequence, or Iterator.
types = (tf.keras.utils.Sequence,)
iterator_ops = wandb.util.get_module("tensorflow.python.data.ops.iterator_ops")
if iterator_ops:
types = types + (iterator_ops.Iterator,)
# EagerIterator was in tensor... | python | wandb/integration/keras/keras.py | 64 | 76 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,274 | patch_tf_keras | def patch_tf_keras():
from pkg_resources import parse_version
from tensorflow.python.eager import context
if parse_version(tf.__version__) >= parse_version("2.6.0"):
keras_engine = "keras.engine"
try:
from keras.engine import training
from keras.engine import trainin... | python | wandb/integration/keras/keras.py | 79 | 192 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,275 | set_wandb_attrs | def set_wandb_attrs(cbk, val_data):
if isinstance(cbk, WandbCallback):
if is_generator_like(val_data):
cbk.generator = val_data
elif is_dataset(val_data):
if context.executing_eagerly():
cbk.generator = iter(val_data)
el... | python | wandb/integration/keras/keras.py | 129 | 148 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,276 | gen | def gen():
while True:
yield K.get_session().run(val_data) | python | wandb/integration/keras/keras.py | 142 | 144 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,277 | new_arrays | def new_arrays(*args, **kwargs):
cbks = kwargs.get("callbacks", [])
val_inputs = kwargs.get("val_inputs")
val_targets = kwargs.get("val_targets")
# TODO: these could be generators, why index 0?
if val_inputs and val_targets:
for cbk in cbks:
set_wandb_... | python | wandb/integration/keras/keras.py | 150 | 158 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,278 | new_generator | def new_generator(*args, **kwargs):
cbks = kwargs.get("callbacks", [])
val_data = kwargs.get("validation_data")
if val_data:
for cbk in cbks:
set_wandb_attrs(cbk, val_data)
return old_generator(*args, **kwargs) | python | wandb/integration/keras/keras.py | 160 | 166 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,279 | new_v2 | def new_v2(*args, **kwargs):
cbks = kwargs.get("callbacks", [])
val_data = kwargs.get("validation_data")
if val_data:
for cbk in cbks:
set_wandb_attrs(cbk, val_data)
return old_v2(*args, **kwargs) | python | wandb/integration/keras/keras.py | 168 | 174 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,280 | _array_has_dtype | def _array_has_dtype(array):
return hasattr(array, "dtype") | python | wandb/integration/keras/keras.py | 195 | 196 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,281 | _update_if_numeric | def _update_if_numeric(metrics, key, values):
if not _array_has_dtype(values):
_warn_not_logging(key)
return
if not is_numeric_array(values):
_warn_not_logging_non_numeric(key)
return
metrics[key] = wandb.Histogram(values) | python | wandb/integration/keras/keras.py | 199 | 208 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,282 | is_numeric_array | def is_numeric_array(array):
return np.issubdtype(array.dtype, np.number) | python | wandb/integration/keras/keras.py | 211 | 212 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,283 | _warn_not_logging_non_numeric | def _warn_not_logging_non_numeric(name):
wandb.termwarn(
f"Non-numeric values found in layer: {name}, not logging this layer",
repeat=False,
) | python | wandb/integration/keras/keras.py | 215 | 219 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,284 | _warn_not_logging | def _warn_not_logging(name):
wandb.termwarn(
f"Layer {name} has undetermined datatype not logging this layer",
repeat=False,
) | python | wandb/integration/keras/keras.py | 222 | 226 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,285 | _get_custom_optimizer_parent_class | def _get_custom_optimizer_parent_class():
from pkg_resources import parse_version
if parse_version(tf.__version__) >= parse_version("2.9.0"):
custom_optimizer_parent_class = tf.keras.optimizers.legacy.Optimizer
else:
custom_optimizer_parent_class = tf.keras.optimizers.Optimizer
return ... | python | wandb/integration/keras/keras.py | 237 | 245 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,286 | __init__ | def __init__(self):
super().__init__(name="CustomOptimizer")
self._resource_apply_dense = tf.function(self._resource_apply_dense)
self._resource_apply_sparse = tf.function(self._resource_apply_sparse) | python | wandb/integration/keras/keras.py | 252 | 255 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,287 | _resource_apply_dense | def _resource_apply_dense(self, grad, var):
var.assign(grad) | python | wandb/integration/keras/keras.py | 257 | 258 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,288 | _resource_apply_sparse | def _resource_apply_sparse(self, grad, var, indices):
pass | python | wandb/integration/keras/keras.py | 262 | 263 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,289 | get_config | def get_config(self):
return super().get_config() | python | wandb/integration/keras/keras.py | 265 | 266 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,290 | set_model | def set_model(self, model):
super().set_model(model)
self.og_weights = model.get_weights()
self.grads = [np.zeros(tuple(w.shape)) for w in model.trainable_weights] | python | wandb/integration/keras/keras.py | 275 | 278 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,291 | on_batch_end | def on_batch_end(self, batch, logs=None):
for g, w in zip(self.grads, self.model.trainable_weights):
g += w.numpy()
self.model.set_weights(self.og_weights) | python | wandb/integration/keras/keras.py | 280 | 283 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,292 | get_grads | def get_grads(self):
return [g.copy() for g in self.grads] | python | wandb/integration/keras/keras.py | 285 | 286 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,293 | __init__ | def __init__(
self,
monitor="val_loss",
verbose=0,
mode="auto",
save_weights_only=False,
log_weights=False,
log_gradients=False,
save_model=True,
training_data=None,
validation_data=None,
labels=[],
predictions=36,
g... | python | wandb/integration/keras/keras.py | 389 | 528 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,294 | _build_grad_accumulator_model | def _build_grad_accumulator_model(self):
inputs = self.model.inputs
outputs = self.model(inputs)
grad_acc_model = tf.keras.models.Model(inputs, outputs)
grad_acc_model.compile(loss=self.model.loss, optimizer=_CustomOptimizer())
# make sure magic doesn't think this is a user mode... | python | wandb/integration/keras/keras.py | 530 | 540 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,295 | _implements_train_batch_hooks | def _implements_train_batch_hooks(self):
return self.log_batch_frequency is not None | python | wandb/integration/keras/keras.py | 542 | 543 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,296 | _implements_test_batch_hooks | def _implements_test_batch_hooks(self):
return self.log_batch_frequency is not None | python | wandb/integration/keras/keras.py | 545 | 546 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,297 | _implements_predict_batch_hooks | def _implements_predict_batch_hooks(self):
return self.log_batch_frequency is not None | python | wandb/integration/keras/keras.py | 548 | 549 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,298 | set_params | def set_params(self, params):
self.params = params | python | wandb/integration/keras/keras.py | 551 | 552 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,299 | set_model | def set_model(self, model):
self.model = model
if self.input_type == "auto" and len(model.inputs) == 1:
self.input_type = wandb.util.guess_data_type(
model.inputs[0].shape, risky=True
)
if self.input_type and self.output_type is None and len(model.outputs)... | python | wandb/integration/keras/keras.py | 554 | 563 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,300 | _attempt_evaluation_log | def _attempt_evaluation_log(self, commit=True):
if self.log_evaluation and self._validation_data_logger:
try:
if not self.model:
wandb.termwarn("WandbCallback unable to read model from trainer")
else:
self._validation_data_logge... | python | wandb/integration/keras/keras.py | 565 | 579 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.