Skip to content

Conversation

merveenoyan
Copy link
Contributor

@merveenoyan merveenoyan commented Sep 29, 2022

Taking from #314 thought it would be better to have a separate branch instead of fork given I also change moon-landing code

@merveenoyan
Copy link
Contributor Author

I somehow can't pass config to ModelInfo properly in Models.ts.

const x: SetOptional<ModelInfoWithSiblings, "siblings"> = new ModelInfo({
			_id:                 repo._id,
			id:                  repo.name,
			author:              repo.author,
			sha:                 commit.id,
			lastModified:        commit.author.date,
			lastAuthor:          { email: commit.author.email },
			private:             repo.config.private,
			gated:               repo.config.gated,
			discussionsDisabled: repo.config.discussionsDisabled,
			gitalyUid:           repo.gitalyUid,
			files,
			config,
		});
console.log({ x });
console.log({ config });

config is still { config: { filename: 'model.pkl' } } but in ModelInfo it's {}. Do you have any idea?

@osanseviero
Copy link
Contributor

I'm not entirely sure to what does the code you're sharing correspond to. My workflow is to create a model repo with the same README.md and config.json as you would have in production, and within the sklearn method you can inspect the model by printing it.

You're doing

const skopsmodelFile = model.config.filename

But the model file should be within model.sklearn, as it's done for adapter_transformers and speechbrain. E.g. compare your internal code against

For debugging you can also add a console.log(config) in the internal PR to understand what's going on, but there you're fully overriding the config.

Copy link
Contributor

@osanseviero osanseviero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good! Thanks for working on it! I left some minor suggestions and improvement requests

merveenoyan and others added 2 commits September 30, 2022 15:08
Co-authored-by: Omar Sanseviero <osanseviero@gmail.com>
@osanseviero
Copy link
Contributor

Let me know if it's ready for another review (and remember to mark as solved if things are resolved)

@merveenoyan
Copy link
Contributor Author

Ekran Resmi 2022-10-04 14 38 49

@osanseviero WDYT

Copy link
Contributor

@osanseviero osanseviero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I just left a suggestion on the comment 🔥 thanks!

Co-authored-by: Omar Sanseviero <osanseviero@gmail.com>
@merveenoyan merveenoyan merged commit 135ccee into main Oct 4, 2022
@merveenoyan merveenoyan deleted the skops-snippet branch October 4, 2022 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants