Skip to content

Field types reference#

To support various types of metadata, Neptune fields come in a few different types.

  1. The metadata type and logging method together determine the resulting field type.
  2. The field type determines the available operations and methods.

Field types you can create and modify:

Metadata type Example Logging method Resulting field type
Single value Parameters, final scores, text = / assign() Float, Integer, Boolean, or String
Series of values Metrics, loss, accuracy log() FloatSeries
Series of text Journal, notes log() StringSeries
Series of files Image series, predictions log() FileSeries
Single file Image, plot file, data sample upload() File
Set of files Large number of files upload_files() FileSet
Tags Text tags to annotate objects add() Set
File to be versioned Dataset, model file track_files() Artifact

The table in the neptune.types section below displays all supported field types, including those that can be accessed but not created.


neptune.types#

Type Description
Artifact Field type for versioning datasets, models, and other files.
Atom

Used for a single value of the given type, or a single file.

Field types: Float, Integer, Boolean, String, Datetime, File, GitRef, and RunState.

FileSet Used to hold a larger number of files when access to a single file is rare.
Handler Obtained when you access a field path that doesn't exist yet.
Namespace handler Obtained when you access a field path that is one or more levels higher than an existing field. Used as a shortcut for accessing fields by specifying only a relative path within the namespace.

Example: params_ns = run["parameters"], then params_ns["lr"] = 0.3

Series Used for series of values or files (for example, images). Available types are FloatSeries, StringSeries and FileSeries.
Set Field holding unorganized sets of values. The available type is StringSet, which is used to interact with the object's tags. You can access and modify fields of this type, but not manually create them.

Artifact#

Field type for holding datasets, models, and other artifacts.

For example, the Artifact type can be used for:

  • Dataset in CSV format
  • Folder with training images as PNG files
  • Model binaries

You may want to track files as artifacts especially if they are large (to avoid uploads taking up storage space) but you would still like to version and compare them between runs.

Assignment: =#

Convenience alias for assign().

assign()#

Assigns the provided value to the field.

Parameters

Name Type Default Description
value str or Artifact - Value to be stored in the field
wait Boolean, optional False By default, tracked metadata is sent to the server in the background. With this option set to True, Neptune first sends all data before executing the call. See Connection modes.

Examples

import neptune.new as neptune

run = neptune.init_run()

run["datasets/images"].track_files("./images")
run["datasets/images-copy"] = run["datasets/images"].fetch()

download()#

Downloads all the files that are referenced in the field.

Parameters

Name     Type Default Description
destination str, optional None Path to where the files should be downloaded. If None, the files are downloaded to the current working directory.
  • If destination is a directory, the files are downloaded to the specified directory, with filenames composed of the field name and extension (if present).
  • If destination is a path to a file, the file is downloaded under the specified name.

Examples

import neptune.new as neptune

run = neptune.init_run(
    with_id="NER-2",  # Neptune ID of a run with artifact
    mode="read-only",  # read-only mode does not count toward monitoring time
)

run["artifacts/images"].download(destination="datasets/train/images")

fetch()#

Fetches the field value.

You should use fetch() only to copy the artifact.

Returns

Artifact object stored in the field.

Examples

import neptune.new as neptune

run = neptune.init_run()

run["datasets/images"].track_files("./images")
run["datasets/images-copy"] = run["datasets/images"].fetch()

fetch_files_list()#

Fetches a list of artifact files.

Returns

List of ArtifactFileData objects for all the files referenced in the artifacts.

You can use the following fields of the ArtifactFileData object:

Name     Type Description
"file_hash" str Hash of the file
"file_path" str URL of the file in the Neptune app
"size" int Size of the file in KB
"metadata" dict Dictionary with the following keys:
  • "file_path": location (path) of the file either on local storage or S3-compatible storage
  • "last_modified": when the artifact content was last changed

Examples

import neptune.new as neptune

run = neptune.init_run(
    with_id="NER-2",  # Neptune ID of a run with artifact
    mode="read-only",  # read-only mode does not count toward monitoring time
)

artifact_list = run["artifacts/images"].fetch_files_list()
artifact_list[0].file_hash
artifact_list[0].file_path
artifact_list[0].metadata["last_modified"]

fetch_hash()#

Fetches the hash of the artifact.

Returns

Hash of the Neptune artifact as a str.

Examples

import neptune.new as neptune

run = neptune.init_run(
    with_id="NER-2",  # Neptune ID of a run with artifact
    mode="read-only",  # read-only mode does not count toward monitoring time
)

run["artifacts/images"].fetch_hash()

track_files()#

Saves the following artifact metadata to Neptune:

  • Version (MD5 hash)
  • Location (path)
  • Size
  • Folder structure
  • Contents

Works for files, folders, or S3-compatible storage.

About the MD5 hash

The hash of the artifact depends on the file contents and metadata like path, size, and last modification time.

A change to any of these will result in a different hash, even if the file contents are exactly the same.

Parameters

Name     Type Default Description
path str - File path or S3-compatible path to the file or folder that you want to track.
destination str None Location in the Neptune artifact namespace where you want to log the metadata.
wait Boolean, optional False By default, tracked metadata is sent to the server in the background. With this option set to True, Neptune first sends all data before executing the call. See Connection modes.

Examples

import neptune.new as neptune

run = neptune.init_run()

run["artifacts/images"].track_files("datasets/train/images")

Float, Integer, Boolean, and String#

Atom field type representing a floating-point number, integer, Boolean value, or text string.

Assignment: =#

Convenience alias for assign().

assign()#

Assigns the provided value to the field.

Parameters

Name Type Default Description
value float - Values to assign to the field.
wait Boolean, optional False By default, tracked metadata is sent to the server in the background. With this option set to True, Neptune first sends all data before executing the call. See Connection modes.

Examples

import neptune.new as neptune
run = neptune.init_run()

# You can use the Python assign operator (=)
run["params/lr"] = 0.8
# as well as the assign() method
run["params/lr"].assign(0.8)

Parameters

Name Type Default Description
value int - Values to assign to the field.
wait Boolean, optional False By default, tracked metadata is sent to the server in the background. With this option set to True, Neptune first sends all data before executing the call. See Connection modes.

Examples

import neptune.new as neptune
run = neptune.init_run()

# You can use the Python assign operator (=)
run["params/max_epochs"] = 10
# as well as the assign() method
run["params/max_epochs"].assign(10)

Parameters

Name Type Default Description
value Boolean - Values to assign to the field.
wait Boolean, optional False By default, tracked metadata is sent to the server in the background. With this option set to True, Neptune first sends all data before executing the call. See Connection modes.

Examples

import neptune.new as neptune
run = neptune.init_run()

# You can use the Python assign operator (=)
run["params/use_preprocessing"] = True
# as well as the assign() method
run["params/use_preprocessing"].assign(True)

Parameters

Name Type Default Description
value str - Values to assign to the field.
wait Boolean, optional False By default, tracked metadata is sent to the server in the background. With this option set to True, Neptune first sends all data before executing the call. See Connection modes.

Examples

import neptune.new as neptune
run = neptune.init_run()

# You can use the Python assign operator (=)
run["params/optimizer"] = "Adam"
# as well as the assign() method
run["params/optimizer"].assign("Adam")

fetch()#

Fetches the field value from Neptune servers.

Returns

The float value stored in the field.

Example

import neptune.new as neptune

# Initialize existing run with ID "NER-12"
run = neptune.init_run(with_id="NER-12")

# Fetch highest accuracy so far
top_acc = run["train/acc/highest"].fetch()

Returns

The int value stored in the field.

Example

import neptune.new as neptune

# Initialize existing run with ID "NER-12"
run = neptune.init_run(with_id="NER-12")

# Fetch epoch count
epoch = run["train/epoch"].fetch()

Returns

The bool value stored in the field.

Example

import neptune.new as neptune

# Initialize existing run with ID "NER-12"
run = neptune.init_run(with_id="NER-12")

# Fetch use_proprocessing parameter
use_preprocessing = run["params/use_preprocessing"].fetch()

Returns

The str value stored in the field.

Example

import neptune.new as neptune

# Initialize existing run with ID "NER-12"
run = neptune.init_run(with_id="NER-12")

# Fetch optimizer parameter
optimizer = run["params/optimizer"].fetch()

Datetime#

Atom field type representing a time. You can access Datetime fields, but not manually create or modify them.

fetch()#

Fetches the field value from Neptune servers.

Returns

The datetime value stored in the field.


GitRef#

Atom field type containing information about the Git repository at the time of starting a tracked run.

  • You can access GitRef fields, but not manually create or modify them.
  • GitRef does not expose any methods.

File#

Atom field type for holding a single file of any type.

upload()#

Uploads the provided file under the specified field path.

Parameters

Name Type Default Description
value str or File - Path of the file to upload, or File value object
wait Boolean, optional False By default, tracked metadata is sent to the server in the background. With this option set to True, Neptune first sends all data before executing the call. See Connection modes.

Examples

import neptune.new as neptune

run = neptune.init_run()

# Upload example data
run["dataset/data_sample"].upload("sample_data.csv")

# Both the content and the extension is stored.
# When downloaded, the filename is a combination of the path and extension:
run["dataset/data_sample"].download()  # data_sample.csv

# Many types are implicitly converted to File on the fly.
# For example, image-like objects such as Matplotlib figures:
import matplotlib.pyplot as plt

plt.plot(data)
run["dataset/distribution"].upload(plt.gcf())  # gcf() gets the figure object

Assignment: =#

Convenience alias for assign().

assign()#

You can also upload a file by assigning the File value object to the specified field path.

Parameters

Name Type Default Description
value File - File value object
wait Boolean, optional False By default, tracked metadata is sent to the server in the background. With this option set to True, Neptune first sends all data before executing the call. See Connection modes.

Examples

import neptune.new as neptune
from neptune.new.types import File

run = neptune.init_run()

run["dataset/data_sample"] = File("sample_data.csv")

download()#

Downloads the stored file to the working directory or specified destination.

Parameters

Name     Type Default Description
destination str, optional None Path to where the file should be downloaded. If None, the file is downloaded to the working directory.
  • If destination is a directory, the file is downloaded to the specified directory with a filename composed of the field name and extension (if present).
  • If destination is a path to a file, the file is downloaded under the specified name.

fetch_extension()#

A programmatic way to find out the extension of a stored file.

Returns

str with the extension of the stored file.

Examples

import neptune.new as neptune
from neptune.new.types import File

run = neptune.init_run()

# Upload model as a File field
run["model/last"].upload("model.pt")

# Check extension of the uploaded File
ext = run["model/last"].fetch_extension()
ext == "pt"  # True

as_image()#

Static method for converting image objects or image-like objects to an image File value object.

This way you can upload figures, arrays, and tensors as static images.

Name Description
image Image-like object to be converted. Supported are PyTorch tensors, TensorFlow/Keras tensors, NumPy arrays, PIL images, Matplotlib figures.

Returns

File value object with converted image.

Examples

import neptune.new as neptune
from neptune.new.types import File

run = neptune.init_run()

# Convert NumPy array to File value object and upload it
run["train/prediction_example"].upload(File.as_image(numpy_array))

# Convert PIL image to File value object and upload it
pil_file = File.as_image(pil_image)
run["dataset/data_sample/img1"].upload(pil_file)

# You can upload PIL image without explicit conversion
run["dataset/data_sample/img2"].upload(pil_image)

as_html()#

Converts an object to an HTML File value object.

This way you can upload interactive charts or data frames to explore them in the Neptune app.

Name Description
value Object to be converted. Supported:
  • Altair, Bokeh, Plotly, Matplotlib interactive charts
  • pandas DataFrame objects

as_pickle()#

Pickles a Python object and stores it in a File value object.

This way you can upload any Python object for future use.

Name Description
image Object to be converted. Supported:
  • Altair, Bokeh, Plotly, Matplotlib interactive charts
  • pandas DataFrame objects

Returns

File value object with the pickled object.

Examples

import neptune.new as neptune
from neptune.new.types import File

run = neptune.init_run()

# Pickle model object and upload it
run["results/pickled_model"].upload(File.as_pickle(trained_model))

from_content()#

Factory method for creating File value objects directly from binary and text content.

UTF-8 encoding is used for text content.

Parameters

Name Type Default Description
content str or bytes - Text or binary content to stored in the File value object.
extension str, optional None Extension of the created file that will be used for interpreting the type of content for visualization. If None, it will be bin for binary content and txt for text content.

Returns

File value object created from the content.

Example

import neptune.new as neptune
from neptune.new.types import File

run = neptune.init_run()

run["large_text_as_file"].upload(File.from_content(variable_with_my_text))

HTML example:

html_str = (
    "<button type='button', style='background-color:#005879; width:400px; "
    "height:400px; font-size:30px'> <a style='color: #ccc', "
    "href='https://docs.neptune.ai'>Take me back to the docs!<a> </button>"
)

with open("sample.html", "w") as f:
    f.write(html_str)
    html_obj = File.from_content(html_str, extension="html")
    run["html_content"].upload(html_obj)

from_path()#

Creates a File value object from a given path.

Equivalent to File(path), but you can specify the extension separately.

Parameters

Name Type Default Description
path str or bytes - Path of the file to be stored in the File value object.
extension str, optional None Extension of the file, if not included in the path argument.

Returns

File value object created based on the path.

Example

import neptune.new as neptune
from neptune.new.types import File

run = neptune.init_run()

run["sample_text"].upload(File.from_path(path="data/test/sample", extension="txt"))

from_stream()#

Factory method for creating File value objects directly from binary and text streams.

UTF-8 encoding is used for text content.

Parameters

Name Type Default Description
stream IOBase - Stream to be converted.
seek int, optional 0 Change the stream position to the given byte offset. For details, see the IOBase documentation .
extension str, optional None Extension of the created file that will be used for interpreting the type of content for visualization. If None, it will be bin for binary content and txt for text content.

Returns

File value object created from the stream.

Example

import neptune.new as neptune
from neptune.new.types import File

run = neptune.init_run()

with open("image.jpg", "rb") as f:
    image = File.from_stream(f, extension="jpg")
    run["upload_image_from_stream"].upload(image)

FileSeries#

A field containing a series of image files.

Planned for a future release

We're working on support for files of any type.

log()#

Logs the provided file to the end of the series.

Parameters

Name     Type Default Description
value File value object or collection of File - The file (or collection of files) to be logged. If a collection is provided, the step and timestamp parameters must be None.
step float, int, optional None Index of the log entry being appended. Must be strictly increasing.

Note: This is effectively how you set custom x values for a chart.

timestamp float, int, optional None Time index of the log entry being appended, in Unix time format. If None, the current time (obtained with time.time()) is used.
name str, optional None Name of the logged file.
description str, optional None Short description of the logged file.
wait Boolean, optional False By default, tracked metadata is sent to the server in the background. With this option set to True, Neptune first sends all data before executing the call. See Connection modes.

Examples

import neptune.new as neptune
from neptune.new.types import File

run = neptune.init_run()

# Log image file
run["train/prediction_example"].log(File(path_to_file))

# Log Matplotlib figure with implicit casting
run["train/distribution"].log(plt_histogram, step=epoch)

# This is equivalent to following explicit casting
run["train/distribution"].log(File.as_image(plt_histogram), step=epoch)
# Read more about supported conversion in File.as_image

# Convert NumPy array to File value object and log it
run["train/prediction_example"].log(File.as_image(numpy_array))

You can also log a name and description for the image:

# Log data sample
for plt_image, class_name in data_sample:
    run["data/sample"].log(plt_image, name=class_name)

# Log predictions with class probabilities
for image, y_pred in zip(x_test_sample, y_test_sample_pred):
    description = "\n".join(
        ["class {}: {}".format(i, pred) for i, pred in enumerate(y_pred)]
    )
    run["train/predictions"].log(image, description=description)

download()#

Downloads all the files stored in the series and saves them locally.

Parameters

Name     Type Default Description
destination str, optional None Path to where the files should be downloaded. If None, the files are downloaded to the working directory.
  • If destination is a directory, the file is downloaded to the specified directory with a filename composed of the field name and extension.
  • If destination is a path to a file, the file is downloaded under the specified name.

download_last()#

Downloads the last file stored in the series and saves it locally.

Parameters

Name     Type Default Description
destination str, optional None Path to where the file should be downloaded. If None, the file is downloaded to the working directory.
  • If destination is a directory, the file is downloaded to the specified directory with a filename composed of the field name and extension.
  • If destination is a path to a file, the file is downloaded under the specified name.

FileSet#

Field type used to hold a larger number of files when access to a single file is rare.

Best used for things that can be easily browsed through the web interface and are typically accessed as a whole, such as a folder of source files or image examples.

upload_files()#

Uploads the provided file or files and stores them under the FileSet field.

Parameters

Name Type Default Description
globs str or collection of str - Path or paths to the files to be uploaded.
wait Boolean, optional False By default, tracked metadata is sent to the server in the background. With this option set to True, Neptune first sends all data before executing the call. See Connection modes.

delete_files()#

Uploads the provided file or files and stores them under the FileSet field.

Parameters

Name Type Default Description
globs str or collection of str - Path or paths to files or folders to be deleted.

Note that these are paths relative to the FileSet itself: If the FileSet contains file sample.txt, ner/notes.txt, and ner/data.csv, to delete whole subfolder you would pass ner as the argument.

wait Boolean, optional False By default, tracked metadata is sent to the server in the background. With this option set to True, Neptune first sends all data before executing the call. See Connection modes.

download()#

Downloads all the files stored in the FileSet field in the form of a ZIP archive.

Parameters

Name     Type Default Description
destination str, optional None Path to where the files should be downloaded. If None, the files are downloaded to the working directory.
  • If destination is a directory, the file is downloaded to the specified directory with a filename composed of the field name and extension.
  • If destination is a path to a file, the file is downloaded under the specified name.

FloatSeries#

Field containing a series of numbers, for example:

  • Training metrics
  • Change of performance of the model in production

You can index the series by index or by time.

log()#

Logs the provided number (or a collection of numbers) to the end of the series.

Parameters

Name Type Default Description
value float, int, collection of float, or collection of int - The value (or collection of values) to be logged. If a collection is provided, the step and timestamp parameters must be None.
step float, int, optional None Index of the log entry being appended. Must be strictly increasing.

Note: This is effectively how you set custom x values for a chart.

timestamp float, int, optional None Time index of the log entry being appended, in Unix time format. If None, the current time (obtained with time.time()) is used.
wait Boolean, optional False By default, tracked metadata is sent to the server in the background. With this option set to True, Neptune first sends all data before executing the call. See Connection modes.

Examples

for epoch in range(parameters["n_epochs"]):
    ...  # My training loop

    run["train/epoch/loss"].log(loss)
    run["train/epoch/accuracy"].log(acc)

fetch_last()#

Fetches the last value stored in the series.

Returns

Last logged float value.

Example

>>> import neptune.new as neptune
>>> run = neptune.init_run(with_id="CLS-15")
>>> final_loss = run["train/loss"].fetch_last()
>>> print(final_loss)
0.15250000000000002

fetch_values()#

Fetches all values stored in the series.

Parameters

Name         Type Default Description
include_timestamp Boolean, optional False Whether the fetched data should include the timestamp field.

Returns

pandas.DataFrame containing all the values and their indexes stored in the series field.

Example

>>> import neptune.new as neptune
>>> run = neptune.init_run(with_id="CLS-15")
>>> losses = run["train/loss"].fetch_values()
>>> print(losses)
   step  value               timestamp
0   0.0   0.00 2022-07-08 12:30:30.087
1   1.0   0.43 2022-07-08 12:30:30.087
2   2.0   0.86 2022-07-08 12:30:30.087
3   3.0   1.29 2022-07-08 12:30:30.087
4   4.0   1.72 2022-07-08 12:30:30.087
5   5.0   2.15 2022-07-08 12:30:30.087
6   6.0   2.58 2022-07-08 12:30:30.087
7   7.0   3.01 2022-07-08 12:30:30.087
8   8.0   3.44 2022-07-08 12:30:30.088
9   9.0   3.87 2022-07-08 12:30:30.088

Handler#

When you access the path of a run that doesn't exist yet, you obtain a Handler object.

Think of it as a wildcard that can become any type once you invoke a specific logging method on it – if you invoke upload(), it becomes a File field; if you invoke log(), it becomes a FloatSeries.

Note

A Handler object can also become a Namespace handler if you create a field at a lower level of organization.

The Handler object exposes:

  • All tracking methods – such as assign(), log(), upload(), and upload_files() – of all other field types
  • Namespace handler methods
Kedro note

The Handler class is located in neptune.new.handler.Handler. When setting up nodes.py, pass this value to the neptune_run option of the report_accuracy() function:

def report_accuracy(
    predictions: np.ndarray,
    test_y: pd.DataFrame,
    neptune_run: neptune.new.handler.Handler
) -> None:
...

Examples

import neptune.new as neptune
run = neptune.init_run()

# Accessing "train/batch/acc" returns a Handler as the field does not exist yet
handler_object = run["train/batch/acc"]

# You can use it as if you would use any other field
handler_object.log(0.7)

# Once the field is created under the path, only field methods are accepted
handler_object.log(0.6)  # Works
handler_object.upload("image.png")  # Error: handler_object became a FloatSeries

Namespace handler#

An object representing a namespace in the metadata structure of a Neptune object. Example: Accessing run["params"] when you have a field params/max_epochs.

You can think of namespaces as folders for organizing your metadata. If you log the fields "params/max_epochs" and "params/lr", they will be grouped under a namespace called "params".

The namespace handler exposes similar methods as other Neptune objects – however, all field paths are relative to the namespace:

import neptune.new as neptune

# You can upload the value through an absolute path
run["params/max_epochs"] = 20

# Or with a relative path and a namepsace handler
params_ns = run["params"]
params_ns["max_epochs"] = 20

Field lookup: []#

You can access the field of an object through a dict-like field lookup: run[field_path].

This way, you can

  1. track metadata:

    run["params/max_epochs"] = 20
    for epoch in range(20):
        run["epoch/acc"].log(epoch_accuracy)
    
  2. fetch already tracked metadata, such as retrieving parameters when resuming a run or downloading metadata for a custom analysis:

    learning_rate = run["params/lr"].fetch()
    
    run["train/diagnostic_plots"].download()
    acc_df = run["train/epoch/acc"].fetch_values()
    

Returns

The returned type depends on the field type and whether a field is stored under the given path.

Path Example Returns
Field exists - The returned type matches the type of the field
Field does not exist - Handler object
Path is namespace and has field

Path: "train"

Field "train/acc" exists

Namespace handler object

Example

import neptune.new as neptune

run = neptune.init_run()

# Create new Float field
run["parameters/momentum"] = 0.9

# Update the value of the field
run["parameters/momentum"] = 0.8

# Error - it's no longer possible to store a File under a Float field
run["parameters/momentum"].upload("sample_data.csv")  # Error

# Create new Series fields
run["train/logs"].log("Experimenting Day 1:")
run["train/acc"].log(0.01)

# Continue logging to existing Series fields
run["train/logs"].log("I embark on a journey")
run["train/acc"].log(0.02)

# If you access a namespace handler, you can interact with it
# in a similar way to the run object
params_ns = run["parameters"]
params_ns["lr"] = 0.3 # Stores 0.3 under path "parameters/lr"

Assignment: =#

Convenience alias for assign().

assign()#

Assign values to multiple fields from a dictionary. For example, you can use this method to quickly log all the parameters of a run.

Remember that the resulting paths will be a combination of the namespace path and the provided relative path.

Example

import neptune.new as neptune
run = neptune.init_run()

# Assign a single parameter
run["model/params/batch_size"] = 64

# Access params namespace handler
params_ns = run["model/params"]

# Assign additional parameters in batch
PARAMS = {"max_epochs": 20, "optimizer": "Adam"}
params_ns.assign(PARAMS)

# "=" needs to be used in combination with "[]"
params_ns = PARAMS  # Does not work
run["model/params"] = PARAMS  # Works

# This also works with relative paths
model_ns = run["model"]
model_ns["params"] = PARAMS

RunState#

Atom field type containing the state of a tracked run.

  • You can access RunState fields, but not manually create or modify them.
  • RunState does not expose any methods.

StringSeries#

Field containing series of text values.

Info

A single text log entry is limited to 1000 characters, but there is no limit to the number of entries in the series.

If the logged text exceeds this character limit, the entry will be truncated to match the limit.

log()#

Parameters

Name Type Default Description
value str or collection of str - The value (or collection of values) to be logged. If a collection is provided, the step and timestamp parameters must be None.
step float, int, optional None Index of the log entry being appended. Must be strictly increasing.

Note: This is effectively how you set custom x values for a chart.

timestamp float, int, optional None Time index of the log entry being appended, in Unix time format. If None, the current time (obtained with time.time()) is used.
wait Boolean, optional False By default, tracked metadata is sent to the server in the background. With this option set to True, Neptune first sends all data before executing the call. See Connection modes.

fetch_last()#

Fetches the last value stored in the series.

Returns

Last logged str value.

Example

import neptune.new as neptune

run = neptune.init_run(with_id="CLS-15")

last_stderr_line = run["monitoring/stderr"].fetch_last()

fetch_values()#

Fetches all values stored in the series.

Parameters

Name         Type Default Description
include_timestamp Boolean, optional False Whether the fetched data should include the timestamp field.

Returns

pandas.DataFrame containing all the values and their indexes stored in the series field.

Example

import neptune.new as neptune

run = neptune.init_run(with_id="CLS-15")

stderr = run["monitoring/stderr"].fetch_values()

StringSet#

A field containing an unorganized set of strings. You can access and modify fields of this type, but not manually create them.

Currently, the supported StringSet field is "sys/tags". You can use it to manage tags for runs and other Neptune objects.

add()#

Adds the provided text string or strings to the set.

Parameters

Name Type Default Description
values str or collection of str - Tag or tags to be applied.
wait Boolean, optional False By default, tracked metadata is sent to the server in the background. With this option set to True, Neptune first sends all data before executing the call. See Connection modes.

Examples

import neptune.new as neptune

run = neptune.init_run()

run["sys/tags"].add(["maskRCNN", "finetune"])

remove()#

Removes the provided tag or tags from the set.

Parameters

Name Type Default Description
values str or collection of str - Tag or tags to be removed.
wait Boolean, optional False By default, tracked metadata is sent to the server in the background. With this option set to True, Neptune first sends all data before executing the call. See Connection modes.

Examples

import neptune.new as neptune

run = neptune.init_run()

run["sys/tags"].remove(["finetune"])

clear()#

Removes all tags from the set.

Parameters

Name Type Default Description
wait Boolean, optional False By default, tracked metadata is sent to the server in the background. With this option set to True, Neptune first sends all data before executing the call. See Connection modes.

Examples

import neptune.new as neptune

run = neptune.init_run()

run["sys/tags"].remove(["finetune"])

fetch()#

Fetches all tags from the set.

Returns

set of str with an object's tags.

Example

run_tags = run["sys/tags"].fetch()

if "maskRCNN" in run_tags:
    print_analysis()