Skip to content

[BUG] NameError: name 'XeniumSample' is not defined #98

Open

Description

@marzaidi

hello! i am getting this error during the last step of hyperparameter tuning:

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
Cell In[15], line 25
     22 model_dir.mkdir(exist_ok=True, parents=True)
     23 config['model_dir'] = model_dir
---> 25 segmentation = trainable(config)
     26 trial = evaluate(segmentation, predict_kwargs['score_cut'])
     27 trial = pd.concat([pd.Series(config), trial])

Cell In[14], line 6, in trainable(config)
      3 receptive_field = {k: config[k] for k in ['k_bd', 'k_tx', 'dist_bd', 'dist_tx']}
      5 # Dataset creation
----> 6 xs = XeniumSample(verbose=False)
      7 xs.set_file_paths(transcripts_path, boundaries_path)
      8 xs.set_metadata()

NameError: name 'XeniumSample' is not defined


i am following the tutorial here: https://elihei2.github.io/segger_dev/notebooks/segger_tutorial/

my code:

param_space = {
    "k_bd": [3, 5, 10],
    "dist_bd": [5, 10, 15, 20],
    "k_tx": [3, 5, 10],
    "dist_tx": [3, 5, 10],
}

metrics = []

for params in itertools.product(*param_space.values()):

    config = dict(zip(param_space.keys(), params))

    # Setup directories
    trial_dir = tuning_dir / '_'.join([f'{k}={v}' for k, v in config.items()])

    data_dir = trial_dir / 'segger_data'
    data_dir.mkdir(exist_ok=True, parents=True)
    config['data_dir'] = data_dir

    model_dir = trial_dir / 'models'
    model_dir.mkdir(exist_ok=True, parents=True)
    config['model_dir'] = model_dir

    segmentation = trainable(config)
    trial = evaluate(segmentation, predict_kwargs['score_cut'])
    trial = pd.concat([pd.Series(config), trial])
    metrics.append(trial)

metrics = pd.DataFrame(metrics)

please let me know if you need any other information, thanks in advance!

Activity

  1. EliHei2 commented on Apr 28, 2025

    @EliHei2
    Owner

    Hey @marzaidi the hyperparam tuning is deprecated and we will update it soon. thanks for reporting this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions