code stringlengths 189 49.4k | apis sequence | extract_api stringlengths 107 64.3k |
|---|---|---|
import fastai
from neptune.new.integrations.fastai import NeptuneCallback
from fastai.vision.all import *
import neptune.new as neptune
run = neptune.init(
project="common/fastai-integration", api_token="<PASSWORD>", tags="basic"
)
path = untar_data(URLs.MNIST_TINY)
dls = ImageDataLoaders.from_csv(path)
# Log al... | [
"neptune.new.integrations.fastai.NeptuneCallback",
"neptune.new.init"
] | [((143, 234), 'neptune.new.init', 'neptune.init', ([], {'project': '"""common/fastai-integration"""', 'api_token': '"""<PASSWORD>"""', 'tags': '"""basic"""'}), "(project='common/fastai-integration', api_token='<PASSWORD>',\n tags='basic')\n", (155, 234), True, 'import neptune.new as neptune\n'), ((393, 446), 'neptun... |
import neptune
from tensorflow.keras.callbacks import BaseLogger
class NeptuneMonitor(BaseLogger):
def __init__(self, name, api_token, prj_name, params: tuple = None):
assert api_token is not None
assert prj_name is not None
super(BaseLogger, self).__init__()
self.my_name = name
... | [
"neptune.create_experiment",
"neptune.init"
] | [((379, 445), 'neptune.init', 'neptune.init', ([], {'api_token': 'api_token', 'project_qualified_name': 'prj_name'}), '(api_token=api_token, project_qualified_name=prj_name)\n', (391, 445), False, 'import neptune\n'), ((497, 556), 'neptune.create_experiment', 'neptune.create_experiment', ([], {'name': 'self.my_name', '... |
'''Train DCENet with PyTorch'''
# from __future__ import print_function
import torch
import torch.nn as nn
import torch.optim as optim
from torch.utils.data import DataLoader
import os
import json
import neptune
import argparse
import numpy as np
from loader import *
from utils.plots import *
from utils.utils impor... | [
"neptune.init",
"neptune.log_metric",
"neptune.create_experiment",
"neptune.append_tag"
] | [((7920, 7935), 'torch.no_grad', 'torch.no_grad', ([], {}), '()\n', (7933, 7935), False, 'import torch\n'), ((564, 633), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""PyTorch Knowledge Distillation"""'}), "(description='PyTorch Knowledge Distillation')\n", (587, 633), False, 'import arg... |
import gym, torch, random, copy
import torch.nn as nn
import torch.optim as optim
import numpy as np
import torch.nn.functional as F
import neptune.new as neptune
# initialize policy & value network
class PolicyNetwork(nn.Module):
def __init__(self, beta):
super().__init__()
self.model = nn.Sequen... | [
"neptune.new.init"
] | [((1496, 1539), 'random.sample', 'random.sample', (['self.buffer', 'self.batch_size'], {}), '(self.buffer, self.batch_size)\n', (1509, 1539), False, 'import gym, torch, random, copy\n'), ((2259, 2271), 'torch.nn.MSELoss', 'nn.MSELoss', ([], {}), '()\n', (2269, 2271), True, 'import torch.nn as nn\n'), ((2277, 2295), 'gy... |
#
# Copyright (c) 2020, Neptune Labs Sp. z o.o.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | [
"neptune.new.exceptions.ProjectNotFound",
"neptune.new.sync.get_project",
"neptune.new.sync.sync_all_runs",
"neptune.new.internal.utils.sync_offset_file.SyncOffsetFile",
"neptune.new.sync.get_qualified_name",
"neptune.new.sync.sync_selected_runs",
"neptune.new.sync.synchronization_status"
] | [((5024, 5056), 'neptune.new.sync.synchronization_status', 'synchronization_status', (['tmp_path'], {}), '(tmp_path)\n', (5046, 5056), False, 'from neptune.new.sync import ApiRun, get_project, get_qualified_name, sync_all_runs, sync_selected_runs, synchronization_status\n'), ((5802, 5834), 'neptune.new.sync.synchroniza... |
import neptune
# The init() function called this way assumes that
# NEPTUNE_API_TOKEN environment variable is defined.
neptune.init('zackpashkin/sandbox')
PARAMS = {'decay_factor' : 0.5,
'n_iterations' : 117}
neptune.create_experiment(name='minimal_example',params=PARAMS)
# log some metrics
for i in ran... | [
"neptune.create_experiment",
"neptune.init",
"neptune.log_metric"
] | [((121, 156), 'neptune.init', 'neptune.init', (['"""zackpashkin/sandbox"""'], {}), "('zackpashkin/sandbox')\n", (133, 156), False, 'import neptune\n'), ((223, 287), 'neptune.create_experiment', 'neptune.create_experiment', ([], {'name': '"""minimal_example"""', 'params': 'PARAMS'}), "(name='minimal_example', params=PAR... |
import requests
import pytest
from neptune.neptune_api import NeptuneService
from neptune.tests.conftest import get_server_addr
@pytest.mark.fpgas(1)
def test_coco(request):
"""
Check the coco service from Neptune with a known image
Args:
request (fixture): get the cmdline options
"""
ser... | [
"neptune.neptune_api.NeptuneService",
"neptune.tests.conftest.get_server_addr"
] | [((131, 151), 'pytest.mark.fpgas', 'pytest.mark.fpgas', (['(1)'], {}), '(1)\n', (148, 151), False, 'import pytest\n'), ((331, 362), 'neptune.tests.conftest.get_server_addr', 'get_server_addr', (['request.config'], {}), '(request.config)\n', (346, 362), False, 'from neptune.tests.conftest import get_server_addr\n'), ((4... |
"""
Script by <NAME>, November 2020
Used to finetune models trained on pathology images (pre-chunked) on External Images
"""
import numpy as np
import tables
import pickle
import neptune
from neptunecontrib.monitoring.keras import NeptuneMonitor
import collections
from sklearn.utils import class_weight
import cv2
fr... | [
"neptune.init"
] | [((1446, 1542), 'neptune.init', 'neptune.init', ([], {'api_token': 'neptune_api_key', 'project_qualified_name': '"""yashaektefaie/benignmodel"""'}), "(api_token=neptune_api_key, project_qualified_name=\n 'yashaektefaie/benignmodel')\n", (1458, 1542), False, 'import neptune\n'), ((2046, 2083), 'tables.open_file', 'ta... |
import warnings
from typing import Callable, Sequence, Union
import joblib
import neptune.new as neptune
import neptune.new.integrations.optuna as optuna_utils
import optuna
import pandas as pd
from optuna.samplers import TPESampler
from optuna.study import Study
from optuna.trial import FrozenTrial, Trial
from sklear... | [
"neptune.new.init",
"neptune.new.integrations.optuna.NeptuneCallback"
] | [((391, 424), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (414, 424), False, 'import warnings\n'), ((3692, 3713), 'xgboost.XGBRegressor', 'XGBRegressor', ([], {}), '(**param)\n', (3704, 3713), False, 'from xgboost import XGBRegressor\n'), ((3936, 3971), 'sklearn.metrics... |
import neptune
def _update_keys(d, prefix):
keys = list(d.keys())
for k in keys:
d['{}_{}'.format(prefix, k)] = d.pop(k)
class NeptuneWriter:
def __init__(self, proj_name):
self.project = neptune.init(proj_name)
self.has_started = False
def start(self, args, **kwargs):
... | [
"neptune.init"
] | [((220, 243), 'neptune.init', 'neptune.init', (['proj_name'], {}), '(proj_name)\n', (232, 243), False, 'import neptune\n')] |
import neptune.new as neptune
import os
import torch.nn as nn
import torch
import torch.nn.functional as F
from torch.optim import SGD, Adam
from torch.utils.data import DataLoader, random_split
from torch.optim.lr_scheduler import CyclicLR
import torch.multiprocessing as mp
import numpy as np
import random
import math... | [
"neptune.new.init"
] | [((333, 354), 'sys.path.append', 'sys.path.append', (['""".."""'], {}), "('..')\n", (348, 354), False, 'import sys\n'), ((703, 731), 'torch.multiprocessing.set_start_method', 'mp.set_start_method', (['"""spawn"""'], {}), "('spawn')\n", (722, 731), True, 'import torch.multiprocessing as mp\n'), ((828, 852), 'os.getenv',... |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017, deepsense.io
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | [
"neptune.internal.cli.storage.upload_storage_utils.upload_to_storage",
"neptune.internal.cli.commands.enqueue_utils.EnqueueUtils",
"neptune.internal.common.config.neptune_config.load_global_config",
"neptune.internal.cli.storage.populate_storage_utils.CopyProgressBar",
"neptune.internal.common.NeptuneExcept... | [((2775, 2821), 'neptune.internal.cli.commands.enqueue_utils.EnqueueUtils', 'EnqueueUtils', (['config', 'api_service', 'web_browser'], {}), '(config, api_service, web_browser)\n', (2787, 2821), False, 'from neptune.internal.cli.commands.enqueue_utils import EnqueueUtils\n'), ((2957, 2983), 'neptune.internal.cli.command... |
#
# Copyright (c) 2020, Neptune Labs Sp. z o.o.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | [
"neptune.new.exceptions.MetadataInconsistency",
"neptune.new.internal.utils.paths.join_paths",
"neptune.new.internal.utils.paths.parse_path"
] | [((8356, 8405), 'pandas.DataFrame.from_dict', 'pd.DataFrame.from_dict', ([], {'data': 'rows', 'orient': '"""index"""'}), "(data=rows, orient='index')\n", (8378, 8405), True, 'import pandas as pd\n'), ((5444, 5472), 'neptune.new.internal.utils.paths.join_paths', 'join_paths', (['self._path', 'path'], {}), '(self._path, ... |
"""Implements Neptune Logger."""
from abc import ABC
from typing import TYPE_CHECKING, List
from torchflare.callbacks.callback import Callbacks
from torchflare.callbacks.states import CallbackOrder
from torchflare.utils.imports_check import module_available
_AVAILABLE = module_available("neptune")
if _AVAILABLE:
... | [
"neptune.new.init"
] | [((273, 300), 'torchflare.utils.imports_check.module_available', 'module_available', (['"""neptune"""'], {}), "('neptune')\n", (289, 300), False, 'from torchflare.utils.imports_check import module_available\n'), ((2068, 2180), 'neptune.new.init', 'neptune.init', ([], {'project': 'self.project_dir', 'api_token': 'self.a... |
#!/usr/bin/env python
# The MIT License (MIT)
# Copyright (c) 2020 <NAME>
# Paper: "Self-Supervised Relational Reasoning for Representation Learning", <NAME> & <NAME>, NeurIPS 2020
# GitHub: https://github.com/mpatacchiola/self-supervised-relational-reasoning
#
# Implementation of a standard neural network (no self-su... | [
"neptune.send_metric",
"neptune.create_experiment",
"neptune.init"
] | [((1075, 1111), 'torch.nn.Linear', 'nn.Linear', (['feature_size', 'num_classes'], {}), '(feature_size, num_classes)\n', (1084, 1111), False, 'from torch import nn\n'), ((1130, 1157), 'torch.nn.CrossEntropyLoss', 'torch.nn.CrossEntropyLoss', ([], {}), '()\n', (1155, 1157), False, 'import torch\n'), ((1713, 1757), 'neptu... |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017, deepsense.io
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | [
"neptune.internal.common.api.api_service_factory.create_services",
"neptune.internal.common.threads.neptune_future.NeptuneFuture",
"neptune.internal.common.NeptuneInternalException",
"neptune.internal.common.NeptuneException"
] | [((2326, 2358), 'future.builtins.input', 'input', (['u"""Authentication token: """'], {}), "(u'Authentication token: ')\n", (2331, 2358), False, 'from future.builtins import input\n'), ((2672, 2707), 'neptune.internal.common.api.api_service_factory.create_services', 'create_services', (['self.token_storage'], {}), '(se... |
import neptune
# The init() function called this way assumes that
# NEPTUNE_API_TOKEN environment variable is defined.
neptune.init('vanducng/sandbox')
neptune.create_experiment(name='minimal_example')
# log some metrics
for i in range(100):
neptune.log_metric('loss', 0.95**i)
neptune.log_metric('AUC', 0.96) | [
"neptune.create_experiment",
"neptune.init",
"neptune.log_metric"
] | [((121, 153), 'neptune.init', 'neptune.init', (['"""vanducng/sandbox"""'], {}), "('vanducng/sandbox')\n", (133, 153), False, 'import neptune\n'), ((154, 203), 'neptune.create_experiment', 'neptune.create_experiment', ([], {'name': '"""minimal_example"""'}), "(name='minimal_example')\n", (179, 203), False, 'import neptu... |
import sys
from dataclasses import asdict
from pathlib import Path
from pprint import pprint
from typing import Optional
import click
import matplotlib.pyplot as plt
import neptune
import torch
import torchaudio
from click import Context
from torch.nn.functional import mse_loss
from tqdm import trange, tqdm
from refo... | [
"neptune.init"
] | [((925, 938), 'click.group', 'click.group', ([], {}), '()\n', (936, 938), False, 'import click\n'), ((940, 1014), 'click.option', 'click.option', (['"""-c"""', '"""--config"""'], {'envvar': '"""REFORMER_TTS_CONFIG"""', 'default': 'None'}), "('-c', '--config', envvar='REFORMER_TTS_CONFIG', default=None)\n", (952, 1014),... |
import itertools
import json
import logging
import os
import tempfile
from typing import List, Any, Dict, Tuple
import gin
import numpy as np
import pandas as pd
from experiments.src.gin import get_default_experiment_name, parse_gin_str
from experiments.src.training.training_utils import get_metric_cls
GridResultDic... | [
"neptune.init"
] | [((486, 515), 'experiments.src.gin.get_default_experiment_name', 'get_default_experiment_name', ([], {}), '()\n', (513, 515), False, 'from experiments.src.gin import get_default_experiment_name, parse_gin_str\n'), ((523, 563), 'gin.query_parameter', 'gin.query_parameter', (['"""train.use_neptune"""'], {}), "('train.use... |
#
# Copyright (c) 2022, Neptune Labs Sp. z o.o.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | [
"neptune.new.exceptions.ProjectNotFound",
"neptune.new.sync.utils.get_project"
] | [((760, 790), 'pytest.fixture', 'pytest.fixture', ([], {'name': '"""backend"""'}), "(name='backend')\n", (774, 790), False, 'import pytest\n'), ((825, 836), 'unittest.mock.MagicMock', 'MagicMock', ([], {}), '()\n', (834, 836), False, 'from unittest.mock import MagicMock\n'), ((1143, 1165), 'neptune.new.exceptions.Proje... |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 4