ssciwr / ssciwr/GalaxySpectrumClassifier

Calling EpochTrainer.train() again after a partial run discards the prior run

Open
#32 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Trainer
Dominant language
Python
Stars
0
Forks
0
Avg merge
17h 57m
Merged PRs (30d)
2

Description

Calling EpochTrainer.train() again after a partial run discards the prior run. The method computes remaining epochs from existing history but calls model.fit without enabling warm_start (src/GalaxySpectrumClassifier/epoch_trainer.py:709-720). Skorch fit reinitializes an initialized net when warm_start is false, so after early stopping (or any partial history) the next call resets parameters/history and trains only remaining_epochs. This contradicts the stated lifecycle epoch cap (src/GalaxySpectrumClassifier/epoch_trainer.py:98-100) and can prevent continuation from reaching the requested total. Set warm_start=True when continuing an existing history (and preserve/reset the prior setting appropriately), then test an early-stopped same-instance run followed by train().

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/GalaxySpectrumClassifier/epoch_trainer.py around lines 98-100 and 709-720, then inspect the existing EpochTrainer tests and the skorch fit lifecycle. Reproduce an early-stopped run followed by train() on the same instance. Done means the continuation preserves the prior parameters and history while reaching the requested total epoch cap.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.