proposal: hash/maphash: add Sum

The overhead of constructing a Hash object in order to call Hash.Write greatly diminishes it's utility for small buffers.
Consider the following micro-benchmark:
var source = []byte("hello, world") // 12 bytes long
var sink uint64

func BenchmarkMapHash(b *testing.B) {
	var seed = maphash.MakeSeed()
	for i := 0; i < b.N; i++ {
		var h maphash.Hash
		h.SetSeed(seed)
		h.Write(source)
		sink = h.Sum64()
	}
}

//go:linkname runtime_memhash runtime.memhash
//go:noescape
func runtime_memhash(p unsafe.Pointer, seed, s uintptr) uintptr

func BenchmarkUnsafeHash(b *testing.B) {
	for i := 0; i < b.N; i++ {
		sink = uint64(runtime_memhash(*(*unsafe.Pointer)(unsafe.Pointer(&source)), 0, uintptr(len(source))))
	}
}

On my machine this produces:
BenchmarkMapHash      	56459700	        21.6 ns/op
BenchmarkUnsafeHash   	246443527	        4.90 ns/op

Directly using runtime_memhash is around ~4x faster since it avoids all the unnecessary state contained by Hash that are relatively pointless when hashing a single small string.
I propose adding the following API:
func Sum(b []byte, seed Seed) uint64

where the function is a thin wrapper over runtime_memhash. It takes Seed as an input to force the user to think about the application of seeds.
I chose the name Sum to be consistent with md5.Sum or sha1.Sum.

I found hash/maphash was unusable for string hashing in a custom map implementation due to performance. It was better to use runtime.strhash directly (..and accept potential future maintenance hassle).
Ideally maphash.Sum([]byte(s), seed) would also be Fast, but this requires some compiler improvements. Maybe SumString should be added as well to address this use case?

Ideally maphash.Sum([]byte(s), seed) would also be Fast, but this requires some compiler improvements. Maybe SumString should be added as well to address this use case?

See #2205. I didn't propose SumString cause I'm still hoping for a compiler optimization to avoid these cases.

It's even 2x slower currently than an assembler implementation of fasthash.
package main

import (
	"hash/maphash"
	"strings"
	"testing"

	"gitlab.com/opennota/fasthash"
)

var sum uint64

func BenchmarkFasthash(b *testing.B) {
	buf := []byte(strings.Repeat("A BC DEF", 64))
	for i := 0; i < b.N; i++ {
		sum = fasthash.Hash64(0, buf)
	}
}

func BenchmarkMaphash(b *testing.B) {
	buf := []byte(strings.Repeat("A BC DEF", 64))
	var h maphash.Hash
	for i := 0; i < b.N; i++ {
		h.Reset()
		h.Write(buf)
		sum = h.Sum64()
	}
}

BenchmarkFasthash-4      5674178               211 ns/op
BenchmarkMaphash-4       2756276               431 ns/op

for i := 0; i < b.N; i++ {
	var h maphash.Hash
	h.SetSeed(seed)
	h.Write(source)
	sink = h.Sum64()
}

This is not how it's supposed to be used. You're supposed to do:
var h maphash.Hash
h.SetSeed(seed)
for i := 0; i < b.N; i++ {
	h.Reset()
	h.Write(source)
	sink = h.Sum64()
}

Can you try that instead?

Can you try that instead?

The runtime drops from ~22ns to 20ns, but it's still much slower compared to a direct hash on a []byte.

@dsnet, is there a fundamental reason why Write+Sum64 should be so much slower than a single call?
Back when SetSeed was in the loop, I could see SetSeed being fundamentally unnecessarily expensive.
But why is Write+Sum64 fundamentally slower than one call? Do we just have a performance bug somewhere?

I see several reasons for slowdown:

Hash.Write always performs a copy on the input slice. It's not clear to me how to avoid the copy without fundamentally changing the operation of how Hash works. For hashing short strings, half the time is spent on copying (i.e., avoiding the copy brings runtime to 10ns).
Hash.Reset, Hash.Write, Hash.Sum64, and Hash.initSeed are not inlineable. With some massaging, we can probably get all of them except Hash.Write to be inlined. Doing so saves a few more ns.

I see. So the copy during the large writes is a bug - we should just hash those bytes directly. Then the benchmark, which hashes a multiple of 64 bytes, would have no copies at all. At that point it seems like the only win is Write+Sum64 combined knowing that the final copy isn't needed. But maybe that's too small a win.

I played with this a bit, because I also hit this recently. CLs 278758 and 278759 were what I could squeeze out of it. They help a fair amount for large writes, but not much for little ones, which is what I'm working on (trying to reduce the performance regression due to https://github.com/tailscale/tailscale/commit/aa9d7f466550b567e11c317f64ea5eac76d31314).

Thanks for working on optimizations, @josharian. We should probably put this proposal on hold until we've made the current API as fast as it can be.

Thanks for working on optimizations, @josharian. We should probably put this proposal on hold until we've made the current API as fast as it can be.

FWIW, I've optimized as much as I know how. I don't see a way to make the current API any faster for small writes. The need to make writes work identically regardless of how they got chunked really ties the hands of the implementation.

FWIW, I've optimized as much as I know how. I don't see a way to make the current API any faster for small writes. The need to make writes work identically regardless of how they got chunked really ties the hands of the implementation.

Placed on hold.
— rsc for the proposal review group

Placed on hold.
— rsc for the proposal review group

While attempting to fix https://github.com/google/starlark-go/issues/16 I rediscovered this issue and was about to file a bug report, but then stumbled on this one. I'll share my benchmark here in case it's useful.
package test_test

import (
        "fmt"
        "hash/maphash"
        "math/rand"
        "testing"
        _ "unsafe" // for linkname hack
)

// fnv is the fastest for size < 16, runtime is asymptotically fastest.
// maphash only beats fnv at when size >= 128, and is 6x slower than runtime
// when size = 1024 even though it's the same algorithm.
//
// Benchmark/maphash-1-12               65962508                17.13 ns/op
// Benchmark/fnv-1-12<PHONE_NUMBER>               0.6944 ns/op
// Benchmark/runtime-1-12               291040464                3.793 ns/op
// Benchmark/maphash-2-12               69972840                17.02 ns/op
// Benchmark/fnv-2-12<PHONE_NUMBER>               1.052 ns/op
// Benchmark/runtime-2-12               282301180                3.786 ns/op
// Benchmark/maphash-4-12               74032375                16.76 ns/op
// Benchmark/fnv-4-12                   594186979                1.727 ns/op
// Benchmark/runtime-4-12               278877213                4.043 ns/op
// Benchmark/maphash-8-12               70253731                16.79 ns/op
// Benchmark/fnv-8-12                   420115022                2.600 ns/op
// Benchmark/runtime-8-12               291869521                3.903 ns/op
// Benchmark/maphash-16-12              72486172                16.24 ns/op
// Benchmark/fnv-16-12                  249103671                4.397 ns/op
// Benchmark/runtime-16-12              300819609                3.706 ns/op
// Benchmark/maphash-32-12              83406832                13.99 ns/op
// Benchmark/fnv-32-12                  140682667                8.300 ns/op
// Benchmark/runtime-32-12              292491626                4.171 ns/op
// Benchmark/maphash-64-12              72692757                16.07 ns/op
// Benchmark/fnv-64-12                  74951726                15.94 ns/op
// Benchmark/runtime-64-12              200250006                5.884 ns/op
// Benchmark/maphash-128-12             43835584                26.30 ns/op
// Benchmark/fnv-128-12                 33626848                35.25 ns/op
// Benchmark/runtime-128-12             131992580                8.546 ns/op
// Benchmark/maphash-256-12             24941272                48.08 ns/op
// Benchmark/fnv-256-12                 16829190                66.17 ns/op
// Benchmark/runtime-256-12             102915433               11.18 ns/op
// Benchmark/maphash-512-12             10526881                96.05 ns/op
// Benchmark/fnv-512-12                  9160648               127.0 ns/op
// Benchmark/runtime-512-12             64771675                18.82 ns/op
// Benchmark/maphash-1024-12             6152947               193.3 ns/op
// Benchmark/fnv-1024-12                 4535538               248.3 ns/op
// Benchmark/runtime-1024-12            35820849                33.13 ns/op

func Benchmark(b *testing.B) {
        for size := 1; size <= 1024; size *= 2 {
                buf := make([]byte, size)
                rand.New(rand.NewSource(0)).Read(buf)
                s := string(buf)

                b.Run(fmt.Sprintf("maphash-%d", size), func(b *testing.B) {
                        for i := 0; i < b.N; i++ {
                                maphashString(s)
                        }
                })
                b.Run(fmt.Sprintf("fnv-%d", size), func(b *testing.B) {
                        for i := 0; i < b.N; i++ {
                                fnvHashString(s)
                        }
                })
                b.Run(fmt.Sprintf("runtime-%d", size), func(b *testing.B) {
                        for i := 0; i < b.N; i++ {
                                runtimeHashString(s, 0)
                        }
                })
        }
}

// maphashString computes the hash of a string using the maphash package,
// which is a wrapper around the implementation used by runtimeHashString.
func maphashString(s string) uint32 {
        var h maphash.Hash
        h.SetSeed(seed)
        h.WriteString(s)
        sum := h.Sum64()
        return uint32(sum>>32) ^ uint32(sum&0xFFFFFFFF)
}

var seed = maphash.MakeSeed()

// runtimeHashString computes the hash of a string using amd64 AESINC hardware.
//go:linkname runtimeHashString runtime.stringHash
func runtimeHashString(s string, seed uintptr) uintptr

// fnvHashString computes the FNV hash of s in software.
func fnvHashString(s string) uint32 {
        var h uint32
        for i := 0; i < len(s); i++ {
                h ^= uint32(s[i])
                h *= 16777619
        }
        return h
}

While attempting to fix https://github.com/google/starlark-go/issues/16 I rediscovered this issue and was about to file a bug report, but then stumbled on this one. I'll share my benchmark here in case it's useful.
package test_test

import (
        "fmt"
        "hash/maphash"
        "math/rand"
        "testing"
        _ "unsafe" // for linkname hack
)

// fnv is the fastest for size < 16, runtime is asymptotically fastest.
// maphash only beats fnv at when size >= 128, and is 6x slower than runtime
// when size = 1024 even though it's the same algorithm.
//
// Benchmark/maphash-1-12               65962508                17.13 ns/op
// Benchmark/fnv-1-12<PHONE_NUMBER>               0.6944 ns/op
// Benchmark/runtime-1-12               291040464                3.793 ns/op
// Benchmark/maphash-2-12               69972840                17.02 ns/op
// Benchmark/fnv-2-12<PHONE_NUMBER>               1.052 ns/op
// Benchmark/runtime-2-12               282301180                3.786 ns/op
// Benchmark/maphash-4-12               74032375                16.76 ns/op
// Benchmark/fnv-4-12                   594186979                1.727 ns/op
// Benchmark/runtime-4-12               278877213                4.043 ns/op
// Benchmark/maphash-8-12               70253731                16.79 ns/op
// Benchmark/fnv-8-12                   420115022                2.600 ns/op
// Benchmark/runtime-8-12               291869521                3.903 ns/op
// Benchmark/maphash-16-12              72486172                16.24 ns/op
// Benchmark/fnv-16-12                  249103671                4.397 ns/op
// Benchmark/runtime-16-12              300819609                3.706 ns/op
// Benchmark/maphash-32-12              83406832                13.99 ns/op
// Benchmark/fnv-32-12                  140682667                8.300 ns/op
// Benchmark/runtime-32-12              292491626                4.171 ns/op
// Benchmark/maphash-64-12              72692757                16.07 ns/op
// Benchmark/fnv-64-12                  74951726                15.94 ns/op
// Benchmark/runtime-64-12              200250006                5.884 ns/op
// Benchmark/maphash-128-12             43835584                26.30 ns/op
// Benchmark/fnv-128-12                 33626848                35.25 ns/op
// Benchmark/runtime-128-12             131992580                8.546 ns/op
// Benchmark/maphash-256-12             24941272                48.08 ns/op
// Benchmark/fnv-256-12                 16829190                66.17 ns/op
// Benchmark/runtime-256-12             102915433               11.18 ns/op
// Benchmark/maphash-512-12             10526881                96.05 ns/op
// Benchmark/fnv-512-12                  9160648               127.0 ns/op
// Benchmark/runtime-512-12             64771675                18.82 ns/op
// Benchmark/maphash-1024-12             6152947               193.3 ns/op
// Benchmark/fnv-1024-12                 4535538               248.3 ns/op
// Benchmark/runtime-1024-12            35820849                33.13 ns/op

func Benchmark(b *testing.B) {
        for size := 1; size <= 1024; size *= 2 {
                buf := make([]byte, size)
                rand.New(rand.NewSource(0)).Read(buf)
                s := string(buf)

                b.Run(fmt.Sprintf("maphash-%d", size), func(b *testing.B) {
                        for i := 0; i < b.N; i++ {
                                maphashString(s)
                        }
                })
                b.Run(fmt.Sprintf("fnv-%d", size), func(b *testing.B) {
                        for i := 0; i < b.N; i++ {
                                fnvHashString(s)
                        }
                })
                b.Run(fmt.Sprintf("runtime-%d", size), func(b *testing.B) {
                        for i := 0; i < b.N; i++ {
                                runtimeHashString(s, 0)
                        }
                })
        }
}

// maphashString computes the hash of a string using the maphash package,
// which is a wrapper around the implementation used by runtimeHashString.
func maphashString(s string) uint32 {
        var h maphash.Hash
        h.SetSeed(seed)
        h.WriteString(s)
        sum := h.Sum64()
        return uint32(sum>>32) ^ uint32(sum&0xFFFFFFFF)
}

var seed = maphash.MakeSeed()

// runtimeHashString computes the hash of a string using amd64 AESINC hardware.
//go:linkname runtimeHashString runtime.stringHash
func runtimeHashString(s string, seed uintptr) uintptr

// fnvHashString computes the FNV hash of s in software.
func fnvHashString(s string) uint32 {
        var h uint32
        for i := 0; i < len(s); i++ {
                h ^= uint32(s[i])
                h *= 16777619
        }
        return h
}

All my optimizations are in. I still think we need new API to make small writes faster.

Ran into this issue when benchmarking my application.
Here's the worst case scenario:
func BenchmarkMaphash(b *testing.B) {
    var hash maphash.Hash
    var data [127]byte

    for i := 0; i < b.N; i += 1 {
        hash.Reset()
        hash.Write(data[:])
        hash.Sum64()
    }
}

27% of the time is spent in Write, where none of the hashing takes place. Like mentioned earlier, this is due to copying the 127 bytes into the buffer, so the hash can be computed when Sum64 is called. Only 53% of the time was actually spent in rthash; the rest was spent record keeping.
I would propose adding a Sum method to Seed:
seed := maphash.MakeSeed()
seed.Sum64(data)

IMO this fits the API better than a function that takes Seed as an argument.

This proposal would also make the code more readable.
Before:
var seed = maphash.MakeSeed() // global

var hash maphash.Hash
hash.SetSeed(seed)
_, _ = hash.Write(data)
sum := hash.Sum64()

After:
var seed = maphash.MakeSeed() // global

sum := seed.Sum64(data)

For some more context, I'm hashing a set of strings and a unix timestamp (int64) to use as a map key.
The old code used to sort the strings, append them together, and use strconv to build a string as a key.  The new code uses maphash to hash each string and XOR the hashes together (so order is irrelevant). Then I hash the timestamp with a different seed and XOR it to the hash. It's 5x faster now and has reduced my service's CPU usage by 5%.
I'm using the unsafe code in this ticket and it works great. However, I had to fork it into string and int64 variants. Casting the string to []byte was more expensive than I had anticipated. For the best performance, it would actually be necessary to expose the type-specific hash functions as defined in src/runtime/alg.go.
Maybe something like?
var nameSeed = maphash.MakeSeed()
var timeSeed = maphash.MakeSeed()

func myHash(names []string, timestamp int64) (sum uint64) {
  for _, name := range names {
    sum ^= nameSeed.HashString(name)
  }

  sum ^= timeSeed.HashInt64(timeSeed)
  return sum
}

People were pinging me privately to unhold this per comments above, so done.

Thanks @josharian for optimizing the current API. It looks like you got about 2X, and that there's still about 2X on the table. I mailed CL 392494 showing the 2X that remains.
The remaining 2X gap seems fundamental, so it seems reasonable to add new API.
I hesitate to add methods directly on maphash.Seed. That seems like confusing different concepts. And adding new concurrency-safe methods on maphash.Hash confuses when a Hash can be shared by multiple goroutines. That leaves top-level functions, analogous to sha1.Sum and so on, as @dsnet originally suggested.

In the CL I used:
func BytesSum64(Seed, []byte) uint64
func StringSum64(Seed, string) uint64

Thumbs up/down: do people think it would be better to use
func Bytes(Seed, []byte) uint64
func String(Seed, []byte) uint64

?

What about?
func Sum[Bytes interface{ []byte | string }](b Bytes) uint64

It's unclear that generics are making things clearer in that case, and I don't know how to implement the function body.

Does anyone object to adding Bytes and String as described in https://github.com/golang/go/issues/42710#issuecomment-1067042869?

Based on the discussion above, this proposal seems like a likely accept.
— rsc for the proposal review group

No change in consensus, so accepted. 🎉
This issue now tracks the work of implementing the proposal.
— rsc for the proposal review group


clear() does not work if serverSide: true

It seems like clearing the table using table.clear().draw() does not work if serverSide is set to true:
serverSide: true – not working
http://live.datatables.net/ziloxic/3/edit?html,js,output
serverSide: false – working
http://live.datatables.net/ziloxic/2/edit?html,js,output
(Moreover, I wonder why the table renders with serverSide: false although a server-side script is called).

I disagree with this assumption "if you are using server-side processing it has no control over the server, so it can't truly clear the data". DataTables does not need to worry about what the server does but it should be able to clear its own data set that it already has loaded on the clientside.
In my case I have a dialog window that popups up whenever a user clicks on an item in a table. That dialog window has its own datatable instance. Now only the data changes (which is pulled from the server) each time that I open this dialog, yet I am unable to clear it and have to either destroy the datatable instance completely and recreate it each time, or wait until the server responds while still showing old data on the screen. Neither of these options sounds right.
I would like to request that clear() api method be updated to cleanup the local data in the table regardless of its source.
Thanks.

When you call clear() it basically does a redraw. That redraw, when you are using server-side processing will always make a request to the server for the current data (that after all is the whole point of server-side processing). Hence my statement - you need to clear the data from the database (or whatever your data source is), otherwise, when you do the redraw, the data will just be displayed.
In server-side processing mode, DataTables is really just a display and event handling library. It does little / no data processing.
It sounds like you might want to use client-side processing with Ajax loaded data - you load the data up whenever required for the table being displayed, and can call clear() to empty it if needed.

I understand what datatables is doing, I just don't agree with how it's doing it. :)
It sounds like there are two basic concerns that clear() is handling. First, is the clearing of the current dataset in the datatable (you have to get rid of the rows first, before you pull them from the server, right?) and the second is the callback to the server to get a fresh dataset. What prevents from having these concerns separated or managed via a boolean parameter in the clear() method?
Switching to client-side processing doesn't make any sense to me because of all the custom filtering and sorting that I apply on the server side. I can hack my way around this, but I feel like there should be a more straightforward solution out of the box.

So if I understand correctly, you want clear() to tell the database to clear, and some script on the server would perform that action before then returning an empty data set for the draw?
To do that just send a flag to the server to tell it to do the clear:
table
  .one( 'preXhr', function ( e, settings, data ) {
    data.clear = true;
  } )
  .draw();

The Ajax request will contain the flag (as well as the normal server-side parameters). You'd Ajax response script can check for that, see it and then perform the TRUNCATE, or whatever you want to use.
Having clear() send a built in parameter to the server is a possibility and would be fairly easy, but it would naturally follow that row deletion, editing and creation should also be implemented in the "protocol" and that would be a fair amount more work.

Seems like we're talking about different things.
What I want to clear is just the displayed data on the UI not the data on the server. Essentially it's $( "table>tbody>tr" ).remove() but since datatables creates shadow tables and probably does other self-management activities, that's where it should originate. Does this make sense?

So the problem with this approach is that it breaks the separation between the data processing and the display. As an illustration let's assume for a second that clear() did draw an empty table when server-side processing is enabled. If the user click a column to perform a sort, or enters filtering information the data will all suddenly reappear - it has to, since it is still present at the server-side.
Or taking the illustration a step further - row().remove() with server-side processing is equally redundant - remove the row on the client-side, but on the next redraw the row would reappear since it is still in the data set at the server-side.
So my point is that DataTables, when server-side processing, is just a dumb display widget. It is up to the server to tell it what to display. If you want it to display no data, the server needs to tell it that by sending an empty result set.

The sorting/filtering explanation makes sense, and I see what you're saying now. Thanks for bearing with me.
The row().remove() might work in my case because I AM doing a call to the server right after that (without waiting for the user to click anything). All i'm trying to accomplish is to prevent the user from seeing stale data from the previous request while i'm loading new data.

Any ideas how to clear all rows? - I want to just have an instant reaction to a "clear" button until DataTable can fetch the data from the server again.

@xanview - It works without issue here: http://live.datatables.net/xuhituze/1/edit . If you are having problems with it, please open a new thread in the forums with a link to a test case.

@DataTables The issue is when serverSide: true

The `clear() documentation states:

This method should not be used when serverSide is enabled. When server-side processing is enabled, the data should be deleted from the data store (i.e. an Ajax request to the server) and then draw() called. Deleting the client-side data will have no effect when server-side processing is enabled since the data would simply be restored on the next draw if the data is not removed from the server.

Yes and what I am saying this leads to a poor user experience. I want to clear the table before waiting for the ajax request to comes back, so that when a user clicks on a "clear" button, they get an instant response and looking for a solution.

There is currently no option for then when server-side processing is enabled. But thanks for the feedback, I'll consider it for a future enhancement.

Any workaround?
Here is the context of what I'm trying to do: Datatable shows a list of devices on the network, I have a "Rescan Network" button. When I click, I want to clear the table, then send a request to re-scan the network, which then runs $('#wireless_table').DataTable().ajax.reload(null, false) when the process is complete.
However, I can't find a way to clear the table.

When server-side processing is enabled, DataTables needs to make an Ajax call whenever it draws data. So you can't clear the rows without making an Ajax call.
What you could do is simply $('#wireless_table tbody').empty();.

I too am trying to clear the table just before a new Ajax request.
For all it's worth the $('#wireless_table tbody').empty(); seems to work well enough.  Although perhaps just an option to instantly display the "loading..." element would work better?

If you could open a support request in the forum with a link to a page showing the issue that would be great.

I'm using datatable to display search results. If the search query is cleared I just want to clear the table. We shouldn't have to construct a query that will return nothing and wait for it to complete.

When server-side processing is enabled, every draw command will hit the server. The client-side can't know in advance that there are no records. Obviously in your case you do know that, but DataTables can't generalise for that.

That's why clear() (or similar) should clear the table, so I can tell it that.


Add Tag option gone from default properties

Since the 0.8 (I think) the default option to add tags is gone from the properties header. It used to look like this:

but now it looks like this:

I know I can manually add the tags option each time but it requires more clicks than it did before when it was right at the top. I've looked through the settings and I can't find an option to edit the default properties options.

This will be added back since it’s causing unnecessary confusion. The tags are now also spaces so pin to a tag space is the same as add tag previously.
Get Outlook for iOShttps://aka.ms/o0ukef

From: Phrown420 @.>
Sent: Sunday, November 19, 2023 10:23:29 AM
To: Make-md/makemd @.>
Cc: Subscribed @.***>
Subject: [Make-md/makemd] Add Tag option gone from default properties (Issue #225)
Since the 0.8 (I think) the default option to add tags is gone from the properties header. It used to look like this:
[old]https://user-images.githubusercontent.com/10844045/284069983-07bf028e-64dd-4376-9ae2-272604c510f5.png
but now it looks like this:
[new]https://user-images.githubusercontent.com/10844045/284070001-57852851-847c-45bc-886c-1758fd2eb5b9.png
I know I can manually add the tags option each time but it requires more clicks than it did before when it was right at the top. I've looked through the settings and I can't find an option to edit the default properties options.
—
Reply to this email directly, view it on GitHubhttps://github.com/Make-md/makemd/issues/225, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAFHKNXCCWNXCYH54T6TOFTYFIP7DAVCNFSM6AAAAAA7RZ3QAOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGAYDAOBZGQ2TQMI.
You are receiving this because you are subscribed to this thread.Message ID: @.***>

Ohhh that works, I didn't think to try that. That's quite easy, cheers :)


[NFT] Remove add NFT contract button

Is your feature request related to a problem? Please describe.
Currently, there are two types of NFT standards. The manually add NFT contract button cannot work.

I will close this task because we will release new CasperDash Web App w/o this feature.


Sign up failed and succeeded at the same time.

Sign up failed and succeeded at the same time.

Fixed in this commit 975842e3f22b2d6c4f4898a57c71edba8c561a7c


Nixos-rebuild switch fails

Bug description

I cannot run nixos-rebuild switch after a new install due to missing dependencies that are not found in the NIX_PATH.
To Reproduce

Download <IP_ADDRESS> release
wsl --import NixOS .\NixOS\ nixos-wsl.tar.gz --version 2 for the installation (should not throw an error)
wsl -d NixOS to launch wsl
Make a change to the /etc/nixos/configuration.nix and run nixos-rebuild switch

Expected behavior
The system must switch to new config and requires to successfully discover deps.
Logs
[nixos@nixos:/etc/nixos]$ sudo nixos-rebuild switch
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
error: file 'nixpkgs/nixos' was not found in the Nix search path (add it using $NIX_PATH or -I)

       at «string»:1:13:

            1| with import <nixpkgs/nixos> {}; config.system.build.nixos-rebuild
             |             ^
(use '--show-trace' to show detailed location information)
building Nix...
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
error: file 'nixpkgs/nixos' was not found in the Nix search path (add it using $NIX_PATH or -I)

       at «none»:0: (source not available)
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)

       at «none»:0: (source not available)
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
error: file 'nixpkgs/nixos/modules/installer/tools/nix-fallback-paths.nix' was not found in the Nix search path (add it using $NIX_PATH or -I)

       at «none»:0: (source not available)
/tmp/nixos-rebuild.CETFxg/nix
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)

       at «none»:0: (source not available)
building the system configuration...
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
error: file 'nixpkgs/nixos' was not found in the Nix search path (add it using $NIX_PATH or -I)

       at «none»:0: (source not available)

Potential fix
I checked the 23.05.5 release and it contains the section Migrating from 22.05 releases.
sudo nix-channel --add https://github.com/nix-community/NixOS-WSL/archive/refs/heads/main.tar.gz nixos-wsl
sudo nix-channel --add https://nixos.org/channels/nixos-23.05 nixos
sudo nix-channel --update

Updating the channels fixed the described problem above.

error: file 'nixpkgs/nixos' was not found in the Nix search path (add it using $NIX_PATH or -I)

You need to have a nixpkgs channel. Not sure if you even need the nixos channel.

@SuperSandro2000 I tested both and it is not make a difference.  Both additions (below) does fix the problem (Tried both in separate installs).
sudo nix-channel --add https://nixos.org/channels/nixos-23.05 nixos
sudo nix-channel --add https://nixos.org/channels/nixos-23.05 nixpkgs

However, the point is that it is not set by default.

@K900 so we set those channels?

We do have those channels configured, you just need to run sudo nix-channel --update first.

We should probably document that better though. Or maybe we can use systemd-firstboot here?

if this is a requirement, should it be added to the instructions for installation?

@adrian-forwessun good idea, I added a line about that to README.md


unknown flag: --dnsRefreshRate

(This is used to report product bugs, please visit https://discuss.istio.io for questions on using Istio)
Bug description
after installed master-latest-daily istio images, bookinfo pod can't be brought up.
that's bcz of istio-proxy is not coming up.
root@mastermint:~/go/src/istio.io/istio# kb logs productpage-v1-7c8b44b5c5-b4vlz istio-proxy
2019-05-17T12:33:16.912504Z     error   unknown flag: --dnsRefreshRate
Expected behavior
shouldn't have below conflict in the code.
pilot/cmd/pilot-agent/main.go:
envoyProxy := envoy.NewProxy(proxyConfig, role.ServiceNode(), proxyLogLevel, proxyComponentLogLevel, pilotSAN, role.IPAddre
sses, dnsRefreshRate)
install/kubernetes/helm/istio/files/injection-template.yaml:

--dnsRefreshRate
{{ .Values.global.proxy.dnsRefreshRate }}
Steps to reproduce the bug
install istio, enable auto-inject and install bookinfo

Version (include the output of istioctl version --remote and kubectl version)
root@mastermint:~/go/src/istio.io/istio# istioctl version
client version: unknown
citadel version: master-20190510-09-16
galley version: master-20190510-09-16
ingressgateway version: master-20190510-09-16
pilot version: master-20190510-09-16
policy version: master-20190510-09-16
sidecar-injector version: master-20190510-09-16
telemetry version: master-20190510-09-16
root@mastermint:~/go/src/istio.io/istio# kb version
Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.1", GitCommit:"b7394102d6ef778017f2ca4046abbaa23b88c290", GitTreeState:"clean", BuildDate:"2019-04-08T17:11:31Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.1", GitCommit:"b7394102d6ef778017f2ca4046abbaa23b88c290", GitTreeState:"clean", BuildDate:"2019-04-08T17:02:58Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"linux/amd64"}
How was Istio installed?
helm install
Environment where bug was observed (cloud vendor, OS, etc)
Linux mastermint 4.15.0-47-generic #50-Ubuntu SMP Wed Mar 13 10:44:52 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Affected product area (please put an X in all that apply)
[x ] Configuration Infrastructure
[ ] Docs
[x ] Installation
[ ] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
Additionally, please consider attaching a cluster state archive by attaching
the dump file to this issue.

Fixed in https://github.com/istio/istio/pull/14176
Although the real root cause is https://github.com/istio/istio/issues/14182 -- the daily builds haven't been building so they got out of sync with the installer

@howardjohn great to know. but why i can't find any existing issue which subject includes "dnsRefreshRate"

The new flag got added yesterday

By the way, we don't support/guarantee to be stable installing straight from source at all. If you want stable releases please install from https://github.com/istio/istio/releases.
If you want latest daily builds: https://gcsweb.istio.io/gcs/istio-prerelease/daily-build/master-latest-daily/. Also not guaranteed to be stable but we appreciate bug reports from them

This is fixed now that master is updated. We may or may not merge https://github.com/istio/istio/pull/14176 which would make this never happen, but at least now unless you go out of your way to get a mismatched proxy image you won't run into this


Feature: Allow for number of threads regardless of detected core count

Currently in cli.rs / main.rs the code is using the number of cores detected to determine how many threads to spawn. This is incompatible with using systemd-run to limit the CPU resources to maximize search while minimizing heat generation. For example on an 8 core system:
systemd-run --user --pty --wait --property=CPUQuota=400% target/release/rana -n=aaaaaa -g 12

...rana will spawn only 4 threads running at 100% each as systemd artificially shows the process only 4 cores exist. Given this CPU has 8 cores (hyperthreads). the desire instead is to run 8 threads at 50% on all 8 cores (which systemd will do for us with the above property set) - this spreads out the heat and maximizes return value better than running 4 @ 100%  (I did a lot of work testing BOINC tasks which uses the same design methods - there's something magical about running more threads at lower speed than fewer threads at max speed. I suspect it has to do with L2 caching or somesuch.
It would be handy if a user controlled switch -t / --threads could be specified which is allowed to be larger (or smaller!) than the detected core count. The help text should probably say something like "Only use this with systemd CPUQuota settings" or somesuch to alert the user as to it's danger etc.
Thanks for considering.

We can wait for some contribution, sometimes miracles happen 😅


Monitor configuration does not pick up external monitor after reboot (regression from 0.9)

I use Lumina from the official FreeBSD repo (lumina-1.0.0.r.p1,2) on FreeBSD 11.0-RC3.
Somewhere around the launch of Lumina 1.0) the monitor configuration kind of broke and has not changed since: After a new boot of my Laptop, I start Lumina via startx (with  ~/.xinitrc containing only the line exec start-lumina-desktop). The monitor configuration only discovers the built-in monitor of the ThinkPad T530. I can manually add the external monitor, which is plugged into the docking station. But that freezes the scree. I have to kill the Xorg-Server and do another startx. Now the external monitor shows up in the configuration utility.
In Lumina 0.9, this had always worked flawlessly.
Is there a ways to make Lumina permanently detect the external monitor? And if so, could I even use it automatically as my only screen if present?

I checked again and have to slightly revise the bug report: X does not freeze. But when enabling the second screen it seems to add it alongside the other. The configuration tool has then moved on the other screen where I cannot use it anymore. There is no panel and I cannot really do anything.
Any tip for how to deal with this? Doubling the sequence of startx and configuration of the screen is somewhat annoying - especially as it worked pre-1.0. Since I usually do it only once in the morning it is still bearable, but I was seriously considering installing Gnome again.

No solution but I found a work-around: I have to move the monitor configuration window halfway over the side of the window, then click "enable screen" to have also the external monitor show up and be able to pick up the window, half of which is now available on the other side of the screen.
Ideally, the configuration should automatically pick up the external monitor.
Or else, it would be helpful, if there was the option to have the screens overlap (the smaller laptop screen being a part of the larger external screen). At the moment, I can only chose to enable the second monitor right or left of the built-in screen.

I am getting ready for a large update to the screen configuration/setup utility here soon.... it needs a lot of things added/tweaked with it right now.
FYI: If you remove your ~/.config/lumina-desktop/lumina-xconfig.conf file, then Lumina will not try to adjust your  X screen layout on login, and instead just use whatever you have setup in your Xorg config and/or was auto-detected and enable by X. That config file does get automatically created/updated whenever you launch lumina-xconfig though, so just be aware of that.

Short update: The problem exists also in Lumina 1.1.0p1

Not to sound like a broken record, but can you try this again with the latest source?  I did some testing the other day and i couldnt reproduce this issue.  I'm curious if its tied to something specific related to the hardware you have.

@q5sys Thank you very much for continuing the effort.
I first had to solve some issues on my Laptop due to FreeBSD's current port mess with the change of jpeg libraries (currently, one cannot have both, Lumina and e.g. Firefox!). As I do not want to build everything myself (with beasts such as Libreoffice, Chromium,...), I chose to "downgrade" to FreeBSD's quarterly repo.
Based on that, I now built Lumina from the latest sources (fdaac67). The main problem remains: When I first log in, only the internal monitor of the laptop shows up. I have to add the second one, then delete the first one to use only my external monitor. This is the workflow in three screenshots:

What has improved, though: When I delete the (smaller) internal monitor, the background image is scaled to the larger external monitor size. Before that, I always had to adjust it, as it would start to repeat at the bottom, where the internal monitor ended.
Even if I could not have the external screen automatically configured, when the laptop is in the docking station, it would help if you could give me a tip on how to script the changes that I have to do through Lumina's Screen Configuration tool (i.e. add second screen, delete first one).

This is still a issue under the latest lumina in that I have to re-add my external monitor after every reboot. Ideally, lumina would remember and auto-restore your last used display config or otherwise it would be nice if it gave you the option to launch the display config tool when it detects a new display.
I have a similar issue under MATE in that I have to launch the MATE display config tool before my external monitor gets activated, after a reboot. I don't need to change any settings, just open the MATE display tool and wait a few seconds then it restores my previous settings for that external display.

Currently, Lumina does remember and use the previously used config.  When I'm in the Tennessee office, I plop my laptop down on my docking station and power on and both of my external monitors work instantly.  Once I have them set, when I shutdown and restart, Lumina remembers the config of them and boots up with them properly.
@utrenkner Are you still having this problem on your machine?

Lumina xconfig has been reworked and updated with many commits since the last action on this ticket. Since no one has updated to report the problem persists, I'm going to close this.
If this is still a problem or comes up again, please comment or reopen the ticket. Thanks!

Hi Tim!
Is the new Lumina xconfig in the latest dev images / the UNSTABLE repo yet?

I believe the majority of the work is available with the latest UNSTABLE update. Some of the updates may be waiting for the next full UNSTABLE build, which will be forthcoming as soon as we finish up some server maintenance/work in the office.


Feature #896: Support custom-type tool parameter

Context

Langchain4j currently only supports Java built-in types as tool parameters.
While it's advisable to maintain a flat and simple tool interface,
there are situations where using custom-type tool parameters is preferred.
Change

This PR delegates the generation of ToolSpecification and the deserialization of ToolExecutionRequest's arguments to ToolJsonSchemas using JsonSchemaService. JsonSchemaService is a separate pluggable dependency via SPI. This PR created two implementations for JsonSchemaService:

DefaultJsonSchemaService (in module langchain4j-core) is consistent with the old behavior of Langchain4j. It supports only Java Built-in types as tool parameters, and sanitizes the tool execution arguments before deserialization
VictoolsJsonSchemaService (in a separated model langchain4j-jsonschema-service-victools) adopts victools/jsonschema-generator  for JSON Schema generation and arguments deserialization.

Besides SPI, the user can override the default by customizing an implementation of JsonSchemaService via AiServices#jsonSchemaService
The original ToolSpecification is kept for now to stay compatible with the current codebase. It might be replaced by ToolJsonSchema in the future if needed.
Checklist
Before submitting this PR, please check the following points:

[x] I have added unit and integration tests for my change
[x] All unit and integration tests in the module I have added/changed are green
[x] All unit and integration tests in the core and main modules are green
[x] I have added/updated the documentation
[ ] I have added an example in the examples repo (only for "big" features)
[x] I have added my new module in the BOM (only when a new module is added)

Issue: https://github.com/langchain4j/langchain4j/issues/896

Hi @langchain4j, will this PR be merged any time soon? Without this feature it's not even possible to call a tool with a List type.

Hi @sbeugen yes, I plan to tool into it this week

@sbeugen

Without this feature it's not even possible to call a tool with a List type.

List of primitives is currently supported as a tool parameter, here is an example: https://github.com/langchain4j/langchain4j/blob/ae5c29893f37c73bde5f1621a6c7a0a75bcac93d/langchain4j/src/test/java/dev/langchain4j/service/StreamingAiServicesWithToolsIT.java#L68

@langchain4j
You are right. With 0.31.0 it works. I still had an older version.


Invalid name 'champkit'

Tried to run the first script in conda on Window 10. Got the following error
conda env create -f environment.yml -n champkit
SpecNotFound: Invalid name 'champkit', try the format: user/package
Do you have any idea about this issue?

hi @zhangweikobe24 - here are a few options. can you try them and see if any work for you?
conda env create --file=environment.yml --name=chapmkit

or
conda env create --file=environment.yml

I am using the docs at https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-from-an-environment-yml-file
let me know if any of these options works for you and i will update the docs for other users who might run into the same issue

Hi, Jakub
these options still don't work. Sorry, I am not familiar with the conda
environment. I usually use Jupiter notebook for some basic python coding.
Do you have any detailed instructions to start with?
Thanks
Wei
On Mon, Jun 5, 2023 at 9:18 AM Jakub Kaczmarzyk @.***>
wrote:

hi @zhangweikobe24 https://github.com/zhangweikobe24 - here are a few
options. can you try them and see if any work for you?
conda env create --file=environment.yml --name=chapmkit
or
conda env create --file=environment.yml
I am using the docs at
https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-from-an-environment-yml-file
let me know if any of these options works for you and i will update the
docs for other users who might run into the same issue
—
Reply to this email directly, view it on GitHub
https://github.com/SBU-BMI/champkit/issues/9#issuecomment-1577003005,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AVKFHKD2R2EW2KHE5QZYFC3XJX2DDANCNFSM6AAAAAAY3CTECA
.
You are receiving this because you were mentioned.Message ID:
@.***>

@zhangweikobe24 thanks for the reply. I will try to reproduce this on Windows 10. I usually work on Linux.
You can make a new python environment that includes pytorch (see https://pytorch.org/get-started/locally/), torchvision, torchmetrics, pandas, wandb, h5py, click, and timm (from https://github.com/rwightman/pytorch-image-models/tarball/e4360e6125bb0bb4279785810c8eb33b40af3ebd)
this pip command may work for you:
pip install torch torchvision torchmetrics pandas h5py click https://github.com/rwightman/pytorch-image-models/tarball/e4360e6125bb0bb4279785810c8eb33b40af3ebd

Hi, Jakub
I was able to activate ChampKit in conda this time. but cannot download
dataset with the following error.
(base) C:\Users\zhang>conda activate champkit
(champkit) C:\Users\zhang>bash data/task1_tumor_notumor/setup.sh
'bash' is not recognized as an internal or external command,
operable program or batch file.
Thanks
Wei
On Mon, Jun 5, 2023 at 1:40 PM Jakub Kaczmarzyk @.***>
wrote:

@zhangweikobe24 https://github.com/zhangweikobe24 thanks for the reply.
I will try to reproduce this on Windows 10. I usually work on Linux.
You can make a new python environment that includes pytorch (see
https://pytorch.org/get-started/locally/), torchvision, torchmetrics,
pandas, wandb, h5py, click, and timm (from
https://github.com/rwightman/pytorch-image-models/tarball/e4360e6125bb0bb4279785810c8eb33b40af3ebd
)
this pip command may work for you:
pip install torch torchvision torchmetrics pandas h5py click https://github.com/rwightman/pytorch-image-models/tarball/e4360e6125bb0bb4279785810c8eb33b40af3ebd
—
Reply to this email directly, view it on GitHub
https://github.com/SBU-BMI/champkit/issues/9#issuecomment-1577369158,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AVKFHKEV2K3ZZ7VWWNOMGMTXJYY2DANCNFSM6AAAAAAY3CTECA
.
You are receiving this because you were mentioned.Message ID:
@.***>

Hi, Jakub
Just give you an update. In order to run your code in Windows, users need
to install a software call Git (https://git-scm.com/download/win). Then
windows users can use Git and Bash functions.
I am currently stuck at the step of downloading data, with the following
error. Sounds like something is missing in a windows system.
data/task1_tumor_notumor/setup.sh: line 4: $'\r': command not found
: invalid option_notumor/setup.sh: line 5: set: -
set: usage: set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]
data/task1_tumor_notumor/setup.sh: line 6: $'\r': command not found
data/task1_tumor_notumor/setup.sh: line 7: $'echo\r': command not found
data/task1_tumor_notumor/setup.sh: line 8: $'echo\r': command not found
[champkit] ----------------- SETUP TASK 1 -----------------
data/task1_tumor_notumor/setup.sh: line 10: $'\r': command not found
data/task1_tumor_notumor/setup.sh: line 12: $'\r': command not found
data/task1_tumor_notumor/setup.sh: line 13: $'\r': command not found
data/task1_tumor_notumor/setup.sh: line 68: syntax error: unexpected end of
file
Thanks
Wei
On Mon, Jun 5, 2023 at 6:04 PM Wei Zhang @.***> wrote:

Hi, Jakub
I was able to activate ChampKit in conda this time. but cannot download
dataset with the following error.
(base) C:\Users\zhang>conda activate champkit
(champkit) C:\Users\zhang>bash data/task1_tumor_notumor/setup.sh
'bash' is not recognized as an internal or external command,
operable program or batch file.
Thanks
Wei
On Mon, Jun 5, 2023 at 1:40 PM Jakub Kaczmarzyk @.***>
wrote:

@zhangweikobe24 https://github.com/zhangweikobe24 thanks for the
reply. I will try to reproduce this on Windows 10. I usually work on Linux.
You can make a new python environment that includes pytorch (see
https://pytorch.org/get-started/locally/), torchvision, torchmetrics,
pandas, wandb, h5py, click, and timm (from
https://github.com/rwightman/pytorch-image-models/tarball/e4360e6125bb0bb4279785810c8eb33b40af3ebd
)
this pip command may work for you:
pip install torch torchvision torchmetrics pandas h5py click https://github.com/rwightman/pytorch-image-models/tarball/e4360e6125bb0bb4279785810c8eb33b40af3ebd
—
Reply to this email directly, view it on GitHub
https://github.com/SBU-BMI/champkit/issues/9#issuecomment-1577369158,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AVKFHKEV2K3ZZ7VWWNOMGMTXJYY2DANCNFSM6AAAAAAY3CTECA
.
You are receiving this because you were mentioned.Message ID:
@.***>

thanks for the update. what is your working directory when you run that command? it should be the root directory of the project. do you see the file sweeps/sweep_neurips_db.yml ?
the problem is not related to GPU. but please know that training will be very slow without a GPU.

Yes, I do see the file  sweeps/sweep_neurips_db.yml  under champkit /
sweeps folder (\wsl.localhost\Ubuntu\home\zhangweikobe24\champkit\sweeps).
any idea?
Wei
On Tue, Jun 6, 2023 at 1:25 PM Jakub Kaczmarzyk @.***>
wrote:

thanks for the update. what is your working directory when you run that
command? it should be the root directory of the project. do you see the
file sweeps/sweep_neurips_db.yml ?
the problem is not related to GPU. but please know that training will be
very slow without a GPU.
—
Reply to this email directly, view it on GitHub
https://github.com/SBU-BMI/champkit/issues/9#issuecomment-1579326918,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AVKFHKBV3HSBGKXVUDNWK33XJ572RANCNFSM6AAAAAAY3CTECA
.
You are receiving this because you were mentioned.Message ID:
@.***>

in your ubuntu wsl terminal, can you try:
cd ~/champkit
python -m wandb sweep sweeps/sweep_neurips_db.yml

the last argument to the command above is the path to the sweep file. if that path is different for you for whatever reason, please feel free to modify if in the command

It does help to fix the problem. But when the training starts, an error
occurred and the process was stopped after 3 same errors. Please see the
details in attachment.
I am so sorry that I have so many questions.
Wei
On Tue, Jun 6, 2023 at 3:20 PM Jakub Kaczmarzyk @.***>
wrote:

in your ubuntu wsl terminal, can you try:
cd ~/champkit
python -m wandb sweep sweeps/sweep_neurips_db.yml
the last argument to the command above is the path to the sweep file. if
that path is different for you for whatever reason, please feel free to
modify if in the command
—
Reply to this email directly, view it on GitHub
https://github.com/SBU-BMI/champkit/issues/9#issuecomment-1579466981,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AVKFHKAD46NHHO7KDJNWXELXJ6NI3ANCNFSM6AAAAAAY3CTECA
.
You are receiving this because you were mentioned.Message ID:
@.***>

@zhangweikobe24 - i'm happy to help, please ask any questions. can you please post the full error traceback? if you are responding via email, i am not able to see the attachment here.

Here it is. Thanks
(base) @.:~$ conda activate champkit
(champkit) @.:~$ python -m wandb login
wandb: Currently logged in as: zhangweikobe24 (weipathology). Use wandb login --relogin to force relogin
(champkit) @.:~$ python -m wandb sweep
sweeps/sweep_neurips_db.yml
wandb: Creating sweep from: sweeps/sweep_neurips_db.yml
wandb: ERROR Couldn't open sweep file: sweeps/sweep_neurips_db.yml
(champkit) @.:~$ cd ~/champkit
python -m wandb sweep sweeps/sweep_neurips_db.yml
wandb: Creating sweep from: sweeps/sweep_neurips_db.yml
wandb: Created sweep with ID: 6wrupo60
wandb: View sweep at: https://wandb.ai/weipathology/champkit/sweeps/6wrupo60
wandb: Run sweep agent with: wandb agent weipathology/champkit/6wrupo60
(champkit) @.:~/champkit$ wandb agent
weipathology/champkit/6wrupo60
wandb: Starting wandb agent 🕵
2023-06-06 16:38:04,120 - wandb.wandb_agent - INFO - Running runs: []
2023-06-06 16:38:04,453 - wandb.wandb_agent - INFO - Agent received
command: run
2023-06-06 16:38:04,453 - wandb.wandb_agent - INFO - Agent starting run
with config:
aa: rand-m9-mstd0.5
amp: True
batch-size: 84
data-dir: data/task1_tumor_notumor/images/
decay-epochs: 2.4
decay-rate: 0.97
drop: 0.3
drop-path: 0.2
epochs: 500
experiment: neuripsdb
freeze-encoder: False
log-wandb: True
lr: 0.0001
model: resnet18
model-ema: True
model-ema-decay: 0.9999
num-classes: 2
opt: adamw
opt-eps: 0.001
output: sweep-output/
pretrained: True
remode: pixel
reprob: 0.2
sched: cosine
seed: 42
train-split: train
val-split: val
warmup-lr: 1e-06
weight-decay: 0.01
workers: 4
2023-06-06 16:38:04,456 - wandb.wandb_agent - INFO - About to run command:
/usr/bin/env python train.py --aa=rand-m9-mstd0.5 --amp --batch-size=84
--data-dir=data/task1_tumor_notumor/images/ --decay-epochs=2.4
--decay-rate=0.97 --drop=0.3 --drop-path=0.2 --epochs=500
--experiment=neuripsdb --log-wandb --lr=0.0001 --model=resnet18 --model-ema
--model-ema-decay=0.9999 --num-classes=2 --opt=adamw --opt-eps=0.001
--output=sweep-output/ --pretrained --remode=pixel --reprob=0.2
--sched=cosine --seed=42 --train-split=train --val-split=val
--warmup-lr=1e-06 --weight-decay=0.01 --workers=4
++++++++++++++++ Command line:
train.py --aa=rand-m9-mstd0.5 --amp --batch-size=84
--data-dir=data/task1_tumor_notumor/images/ --decay-epochs=2.4
--decay-rate=0.97 --drop=0.3 --drop-path=0.2 --epochs=500
--experiment=neuripsdb --log-wandb --lr=0.0001 --model=resnet18 --model-ema
--model-ema-decay=0.9999 --num-classes=2 --opt=adamw --opt-eps=0.001
--output=sweep-output/ --pretrained --remode=pixel --reprob=0.2
--sched=cosine --seed=42 --train-split=train --val-split=val
--warmup-lr=1e-06 --weight-decay=0.01 --workers=4
+++++++++++++++++++++++++++++++++=
Using classmap file at data/task1_tumor_notumor/images/classmap.txt
wandb: Currently logged in as: zhangweikobe24 (weipathology). Use wandb login --relogin to force relogin
wandb: WARNING Ignored wandb.init() arg project when running a sweep.
wandb: wandb version 0.15.4 is available!  To upgrade, please run:
wandb:  $ pip install wandb --upgrade
wandb: Tracking run with wandb version 0.12.16
wandb: Run data is saved locally in
/home/zhangweikobe24/champkit/wandb/run-20230606_163806-8kle540g
wandb: Run wandb offline to turn off syncing.
wandb: Syncing run task1-resnet18-pretrained
wandb: ⭐ View project at https://wandb.ai/weipathology/champkit
wandb: 🧹 View sweep at
https://wandb.ai/weipathology/champkit/sweeps/6wrupo60
wandb: 🚀 View run at https://wandb.ai/weipathology/champkit/runs/8kle540g
Training with a single process on 1 GPUs.
Loading pretrained weights from url (
https://download.pytorch.org/models/resnet18-5c106cde.pth)
Model resnet18 created, param count:11,177,538
Data processing configuration for current model + dataset:
input_size: (3, 224, 224)
interpolation: bilinear
mean: (0.485, 0.456, 0.406)
std: (0.229, 0.224, 0.225)
crop_pct: 0.875
Traceback (most recent call last):
File "/home/zhangweikobe24/champkit/train.py", line 999, in
main()
File "/home/zhangweikobe24/champkit/train.py", line 486, in main
model.cuda()
File
"/home/zhangweikobe24/anaconda3/envs/champkit/lib/python3.9/site-packages/torch/nn/modules/module.py",
line 688, in cuda
return self._apply(lambda t: t.cuda(device))
File
"/home/zhangweikobe24/anaconda3/envs/champkit/lib/python3.9/site-packages/torch/nn/modules/module.py",
line 578, in _apply
module._apply(fn)
File
"/home/zhangweikobe24/anaconda3/envs/champkit/lib/python3.9/site-packages/torch/nn/modules/module.py",
line 601, in _apply
param_applied = fn(param)
File
"/home/zhangweikobe24/anaconda3/envs/champkit/lib/python3.9/site-packages/torch/nn/modules/module.py",
line 688, in
return self._apply(lambda t: t.cuda(device))
File
"/home/zhangweikobe24/anaconda3/envs/champkit/lib/python3.9/site-packages/torch/cuda/init.py",
line 216, in _lazy_init
torch._C._cuda_init()
RuntimeError: Found no NVIDIA driver on your system. Please check that you
have an NVIDIA GPU and installed a driver from
http://www.nvidia.com/Download/index.aspx
2023-06-06 16:38:09,468 - wandb.wandb_agent - INFO - Running runs:
['8kle540g']
wandb: Waiting for W&B process to finish... (failed 1). Press Control-C to
abort syncing.
wandb:
wandb: Synced task1-resnet18-pretrained:
https://wandb.ai/weipathology/champkit/runs/8kle540g
wandb: Synced 6 W&B file(s), 0 media file(s), 0 artifact file(s) and 0
other file(s)
wandb: Find logs at: ./wandb/run-20230606_163806-8kle540g/logs
2023-06-06 16:38:14,586 - wandb.wandb_agent - INFO - Cleaning up finished
run: 8kle540g
2023-06-06 16:38:14,843 - wandb.wandb_agent - INFO - Agent received
command: run
2023-06-06 16:38:14,843 - wandb.wandb_agent - INFO - Agent starting run
with config:
aa: rand-m9-mstd0.5
amp: True
batch-size: 84
data-dir: data/task1_tumor_notumor/images/
decay-epochs: 2.4
decay-rate: 0.97
drop: 0.3
drop-path: 0.2
epochs: 500
experiment: neuripsdb
freeze-encoder: False
log-wandb: True
lr: 0.0001
model: resnet18
model-ema: True
model-ema-decay: 0.9999
num-classes: 2
opt: adamw
opt-eps: 0.001
output: sweep-output/
pretrained: False
remode: pixel
reprob: 0.2
sched: cosine
seed: 42
train-split: train
val-split: val
warmup-lr: 1e-06
weight-decay: 0.01
workers: 4
2023-06-06 16:38:14,847 - wandb.wandb_agent - INFO - About to run command:
/usr/bin/env python train.py --aa=rand-m9-mstd0.5 --amp --batch-size=84
--data-dir=data/task1_tumor_notumor/images/ --decay-epochs=2.4
--decay-rate=0.97 --drop=0.3 --drop-path=0.2 --epochs=500
--experiment=neuripsdb --log-wandb --lr=0.0001 --model=resnet18 --model-ema
--model-ema-decay=0.9999 --num-classes=2 --opt=adamw --opt-eps=0.001
--output=sweep-output/ --remode=pixel --reprob=0.2 --sched=cosine --seed=42
--train-split=train --val-split=val --warmup-lr=1e-06 --weight-decay=0.01
--workers=4
++++++++++++++++ Command line:
train.py --aa=rand-m9-mstd0.5 --amp --batch-size=84
--data-dir=data/task1_tumor_notumor/images/ --decay-epochs=2.4
--decay-rate=0.97 --drop=0.3 --drop-path=0.2 --epochs=500
--experiment=neuripsdb --log-wandb --lr=0.0001 --model=resnet18 --model-ema
--model-ema-decay=0.9999 --num-classes=2 --opt=adamw --opt-eps=0.001
--output=sweep-output/ --remode=pixel --reprob=0.2 --sched=cosine --seed=42
--train-split=train --val-split=val --warmup-lr=1e-06 --weight-decay=0.01
--workers=4
+++++++++++++++++++++++++++++++++=
Using classmap file at data/task1_tumor_notumor/images/classmap.txt
wandb: Currently logged in as: zhangweikobe24 (weipathology). Use wandb login --relogin to force relogin
wandb: WARNING Ignored wandb.init() arg project when running a sweep.
wandb: wandb version 0.15.4 is available!  To upgrade, please run:
wandb:  $ pip install wandb --upgrade
wandb: Tracking run with wandb version 0.12.16
wandb: Run data is saved locally in
/home/zhangweikobe24/champkit/wandb/run-20230606_163815-dda688sv
wandb: Run wandb offline to turn off syncing.
wandb: Syncing run task1-resnet18-randinit
wandb: ⭐ View project at https://wandb.ai/weipathology/champkit
wandb: 🧹 View sweep at
https://wandb.ai/weipathology/champkit/sweeps/6wrupo60
wandb: 🚀 View run at https://wandb.ai/weipathology/champkit/runs/dda688sv
Training with a single process on 1 GPUs.
Model resnet18 created, param count:11,177,538
Data processing configuration for current model + dataset:
input_size: (3, 224, 224)
interpolation: bilinear
mean: (0.485, 0.456, 0.406)
std: (0.229, 0.224, 0.225)
crop_pct: 0.875
Traceback (most recent call last):
File "/home/zhangweikobe24/champkit/train.py", line 999, in
main()
File "/home/zhangweikobe24/champkit/train.py", line 486, in main
model.cuda()
File
"/home/zhangweikobe24/anaconda3/envs/champkit/lib/python3.9/site-packages/torch/nn/modules/module.py",
line 688, in cuda
return self._apply(lambda t: t.cuda(device))
File
"/home/zhangweikobe24/anaconda3/envs/champkit/lib/python3.9/site-packages/torch/nn/modules/module.py",
line 578, in _apply
module._apply(fn)
File
"/home/zhangweikobe24/anaconda3/envs/champkit/lib/python3.9/site-packages/torch/nn/modules/module.py",
line 601, in _apply
param_applied = fn(param)
File
"/home/zhangweikobe24/anaconda3/envs/champkit/lib/python3.9/site-packages/torch/nn/modules/module.py",
line 688, in
return self._apply(lambda t: t.cuda(device))
File
"/home/zhangweikobe24/anaconda3/envs/champkit/lib/python3.9/site-packages/torch/cuda/init.py",
line 216, in _lazy_init
torch._C._cuda_init()
RuntimeError: Found no NVIDIA driver on your system. Please check that you
have an NVIDIA GPU and installed a driver from
http://www.nvidia.com/Download/index.aspx
2023-06-06 16:38:19,855 - wandb.wandb_agent - INFO - Running runs:
['dda688sv']
wandb: Waiting for W&B process to finish... (failed 1). Press Control-C to
abort syncing.
wandb:
wandb: Synced task1-resnet18-randinit:
https://wandb.ai/weipathology/champkit/runs/dda688sv
wandb: Synced 6 W&B file(s), 0 media file(s), 0 artifact file(s) and 0
other file(s)
wandb: Find logs at: ./wandb/run-20230606_163815-dda688sv/logs
2023-06-06 16:38:25,016 - wandb.wandb_agent - INFO - Cleaning up finished
run: dda688sv
2023-06-06 16:38:25,369 - wandb.wandb_agent - INFO - Agent received
command: run
2023-06-06 16:38:25,370 - wandb.wandb_agent - INFO - Agent starting run
with config:
aa: rand-m9-mstd0.5
amp: True
batch-size: 84
data-dir: data/task1_tumor_notumor/images/
decay-epochs: 2.4
decay-rate: 0.97
drop: 0.3
drop-path: 0.2
epochs: 500
experiment: neuripsdb
freeze-encoder: False
log-wandb: True
lr: 0.0001
model: resnet18_ciga_ssl
model-ema: True
model-ema-decay: 0.9999
num-classes: 2
opt: adamw
opt-eps: 0.001
output: sweep-output/
pretrained: True
remode: pixel
reprob: 0.2
sched: cosine
seed: 42
train-split: train
val-split: val
warmup-lr: 1e-06
weight-decay: 0.01
workers: 4
2023-06-06 16:38:25,372 - wandb.wandb_agent - INFO - About to run command:
/usr/bin/env python train.py --aa=rand-m9-mstd0.5 --amp --batch-size=84
--data-dir=data/task1_tumor_notumor/images/ --decay-epochs=2.4
--decay-rate=0.97 --drop=0.3 --drop-path=0.2 --epochs=500
--experiment=neuripsdb --log-wandb --lr=0.0001 --model=resnet18_ciga_ssl
--model-ema --model-ema-decay=0.9999 --num-classes=2 --opt=adamw
--opt-eps=0.001 --output=sweep-output/ --pretrained --remode=pixel
--reprob=0.2 --sched=cosine --seed=42 --train-split=train --val-split=val
--warmup-lr=1e-06 --weight-decay=0.01 --workers=4
++++++++++++++++ Command line:
train.py --aa=rand-m9-mstd0.5 --amp --batch-size=84
--data-dir=data/task1_tumor_notumor/images/ --decay-epochs=2.4
--decay-rate=0.97 --drop=0.3 --drop-path=0.2 --epochs=500
--experiment=neuripsdb --log-wandb --lr=0.0001 --model=resnet18_ciga_ssl
--model-ema --model-ema-decay=0.9999 --num-classes=2 --opt=adamw
--opt-eps=0.001 --output=sweep-output/ --pretrained --remode=pixel
--reprob=0.2 --sched=cosine --seed=42 --train-split=train --val-split=val
--warmup-lr=1e-06 --weight-decay=0.01 --workers=4
+++++++++++++++++++++++++++++++++=
Using classmap file at data/task1_tumor_notumor/images/classmap.txt
wandb: Currently logged in as: zhangweikobe24 (weipathology). Use wandb login --relogin to force relogin
wandb: WARNING Ignored wandb.init() arg project when running a sweep.
wandb: wandb version 0.15.4 is available!  To upgrade, please run:
wandb:  $ pip install wandb --upgrade
wandb: Tracking run with wandb version 0.12.16
wandb: Run data is saved locally in
/home/zhangweikobe24/champkit/wandb/run-20230606_163826-hhl3e9qb
wandb: Run wandb offline to turn off syncing.
wandb: Syncing run task1-resnet18_ciga_ssl-pretrained
wandb: ⭐ View project at https://wandb.ai/weipathology/champkit
wandb: 🧹 View sweep at
https://wandb.ai/weipathology/champkit/sweeps/6wrupo60
wandb: 🚀 View run at https://wandb.ai/weipathology/champkit/runs/hhl3e9qb
Training with a single process on 1 GPUs.
Loading pretrained weights from url (
https://github.com/ozanciga/self-supervised-histopathology/releases/download/nativetenpercent/pytorchnative_tenpercent_resnet18.ckpt
)
Model resnet18_ciga_ssl created, param count:11,177,538
Data processing configuration for current model + dataset:
input_size: (3, 224, 224)
interpolation: bilinear
mean: (0.5, 0.5, 0.5)
std: (0.5, 0.5, 0.5)
crop_pct: 0.875
Traceback (most recent call last):
File "/home/zhangweikobe24/champkit/train.py", line 999, in
main()
File "/home/zhangweikobe24/champkit/train.py", line 486, in main
model.cuda()
File
"/home/zhangweikobe24/anaconda3/envs/champkit/lib/python3.9/site-packages/torch/nn/modules/module.py",
line 688, in cuda
return self._apply(lambda t: t.cuda(device))
File
"/home/zhangweikobe24/anaconda3/envs/champkit/lib/python3.9/site-packages/torch/nn/modules/module.py",
line 578, in _apply
module._apply(fn)
File
"/home/zhangweikobe24/anaconda3/envs/champkit/lib/python3.9/site-packages/torch/nn/modules/module.py",
line 601, in _apply
param_applied = fn(param)
File
"/home/zhangweikobe24/anaconda3/envs/champkit/lib/python3.9/site-packages/torch/nn/modules/module.py",
line 688, in
return self._apply(lambda t: t.cuda(device))
File
"/home/zhangweikobe24/anaconda3/envs/champkit/lib/python3.9/site-packages/torch/cuda/init.py",
line 216, in _lazy_init
torch._C._cuda_init()
RuntimeError: Found no NVIDIA driver on your system. Please check that you
have an NVIDIA GPU and installed a driver from
http://www.nvidia.com/Download/index.aspx
2023-06-06 16:38:30,380 - wandb.wandb_agent - INFO - Running runs:
['hhl3e9qb']
wandb: Waiting for W&B process to finish... (failed 1). Press Control-C to
abort syncing.
wandb:
wandb: Synced task1-resnet18_ciga_ssl-pretrained:
https://wandb.ai/weipathology/champkit/runs/hhl3e9qb
wandb: Synced 6 W&B file(s), 0 media file(s), 0 artifact file(s) and 0
other file(s)
wandb: Find logs at: ./wandb/run-20230606_163826-hhl3e9qb/logs
2023-06-06 16:38:35,516 - wandb.wandb_agent - ERROR - Detected 3 failed
runs in the first 60 seconds, shutting down.
2023-06-06 16:38:35,517 - wandb.wandb_agent - INFO - To disable this check
set WANDB_AGENT_DISABLE_FLAPPING=true
wandb: Terminating and syncing runs. Press ctrl-c to kill.
(champkit) @.:~/champkit$
On Tue, Jun 6, 2023 at 4:21 PM Jakub Kaczmarzyk @.***>
wrote:

@zhangweikobe24 https://github.com/zhangweikobe24 - i'm happy to help,
please ask any questions. can you please post the full error traceback? if
you are responding via email, i am not able to see the attachment here.
—
Reply to this email directly, view it on GitHub
https://github.com/SBU-BMI/champkit/issues/9#issuecomment-1579533006,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AVKFHKGNLCAQUFAKVQOQNB3XJ6UNXANCNFSM6AAAAAAY3CTECA
.
You are receiving this because you were mentioned.Message ID:
@.***>

thanks. the training script does in fact require a GPU to run, and the error is being thrown because the program cannot find a GPU. sorry for the mistake in my earlier comment.
do you have access to a system with a GPU?

I will check with our IT support team and get back to you
Thanks
Wei
On Tue, Jun 6, 2023 at 4:54 PM Jakub Kaczmarzyk @.***>
wrote:

thanks. the training script does in fact require a GPU to run, and the
error is being thrown because the program cannot find a GPU. sorry for the
mistake in my earlier comment.
do you have access to a system with a GPU?
—
Reply to this email directly, view it on GitHub
https://github.com/SBU-BMI/champkit/issues/9#issuecomment-1579564412,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AVKFHKCRPUGOY62POUVUNQDXJ6YI5ANCNFSM6AAAAAAY3CTECA
.
You are receiving this because you were mentioned.Message ID:
@.***>

Hi, Jakub
I was trying to run ChampKit task 1 on GPU, currently got the following
error. It seems the GPU memory I requested is not enough to run. Am I
understanding this correctly?
RuntimeError: CUDA out of memory. Tried to allocate 258.00 MiB (GPU 0; 1.95
GiB total capacity; 784.58 MiB already allocated; 85.81 MiB free; 844.00
MiB reserved in total by PyTorch) If reserved memory is >> allocated memory
try setting max_split_size_mb to avoid fragmentation. See documentation for
Memory Management and PYTORCH_CUDA_ALLOC_CONFwandb: Waiting for W&B process
to finish... (failed 1). Press Control-C to abort syncing.
On Tue, Jun 6, 2023 at 8:12 PM Wei Zhang @.***> wrote:

I will check with our IT support team and get back to you
Thanks
Wei
On Tue, Jun 6, 2023 at 4:54 PM Jakub Kaczmarzyk @.***>
wrote:

thanks. the training script does in fact require a GPU to run, and the
error is being thrown because the program cannot find a GPU. sorry for the
mistake in my earlier comment.
do you have access to a system with a GPU?
—
Reply to this email directly, view it on GitHub
https://github.com/SBU-BMI/champkit/issues/9#issuecomment-1579564412,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AVKFHKCRPUGOY62POUVUNQDXJ6YI5ANCNFSM6AAAAAAY3CTECA
.
You are receiving this because you were mentioned.Message ID:
@.***>

hi @zhangweikobe24 - indeed the GPU memory seems to be too low. from the logs, it looks like your GPU has about 2 GB of memory. Do you have access to a GPU with more memory? Perhaps 4 or 8GB?

Yes, I do. I will request a bigger memory GPU later.
Thanks
Wei
On Thu, Jun 8, 2023 at 11:06 AM Jakub Kaczmarzyk @.***>
wrote:

hi @zhangweikobe24 https://github.com/zhangweikobe24 - indeed the GPU
memory seems to be too low. from the logs, it looks like your GPU has about
2 GB of memory. Do you have access to a GPU with more memory? Perhaps 4 or
8GB?
—
Reply to this email directly, view it on GitHub
https://github.com/SBU-BMI/champkit/issues/9#issuecomment-1583041883,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AVKFHKGVSOLD2TP4W2UIKMDXKIBDHANCNFSM6AAAAAAY3CTECA
.
You are receiving this because you were mentioned.Message ID:
@.***>

Hi, Jakub
Can I only run experiment of Task 6? For those models in timm, can I pick
which model (for example vision transformer) to run? or how do you select
models?
Thanks
Wei
On Thu, Jun 8, 2023 at 12:07 PM Wei Zhang @.***> wrote:

Yes, I do. I will request a bigger memory GPU later.
Thanks
Wei
On Thu, Jun 8, 2023 at 11:06 AM Jakub Kaczmarzyk @.***>
wrote:

hi @zhangweikobe24 https://github.com/zhangweikobe24 - indeed the GPU
memory seems to be too low. from the logs, it looks like your GPU has about
2 GB of memory. Do you have access to a GPU with more memory? Perhaps 4 or
8GB?
—
Reply to this email directly, view it on GitHub
https://github.com/SBU-BMI/champkit/issues/9#issuecomment-1583041883,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AVKFHKGVSOLD2TP4W2UIKMDXKIBDHANCNFSM6AAAAAAY3CTECA
.
You are receiving this because you were mentioned.Message ID:
@.***>

@zhangweikobe24 - yes you can run experiments of task 6 alone. you can use any of the models in timm, including vision transformers.
you can use the train.py script directly or you can use a weights and biases sweep (as in https://github.com/SBU-BMI/champkit/blob/main/sweeps/sweep_neurips_db.yml). using train.py directly, you can start with the following command:
python train.py --model vit_small_r26_s32_224 --pretrained --data-dir data/task6_precancer_vs_benign_polyps/images-split/

you would choose the model with the --model option. there are a lot of options for this. you can see https://github.com/huggingface/pytorch-image-models#models and https://huggingface.co/docs/timm/reference/models for more information.

Hi, Jakuc
I used your command to run experiment on Task 6.  The erroe shows [Errno 2]
No such file or directory:
'data/task6_precancer_vs_benign_polyps/images-split/train/SSA/MHIST_alw.png' .
But I actually can find this file.
See the details below
(champkit) @.***:champkit]$ python train.py --model
vit_small_r26_s32_224 --pretrained --data-dir
data/task6_precancer_vs_benign_polyps/images-split/++++++++++++++++ Command
line:train.py --model vit_small_r26_s32_224 --pretrained --data-dir
data/task6_precancer_vs_benign_polyps/images-split/
+++++++++++++++++++++++++++++++++=Using classmap file at
data/task6_precancer_vs_benign_polyps/images-split/classmap.txtTraining
with a single process on 1 GPUs.Model vit_small_r26_s32_224 created, param
count:36,431,912Data processing configuration for current model + dataset:
input_size: (3, 224, 224) interpolation: bicubic mean: (0.5, 0.5, 0.5) std:
(0.5, 0.5, 0.5) crop_pct: 0.9AMP not enabled. Training in float32.Scheduled
epochs: 310Traceback (most recent call last): File "/uufs/
chpc.utah.edu/common/home/u0995017/champkit/train.py", line 999, in
main() File "/uufs/chpc.utah.edu/common/home/u0995017/champkit/train.py",
line 713, in main train_metrics = train_one_epoch( File "/uufs/
chpc.utah.edu/common/home/u0995017/champkit/train.py", line 779, in
train_one_epoch for batch_idx, (input, target) in enumerate(loader): File
"/uufs/
chpc.utah.edu/common/home/u0995017/anaconda3/envs/champkit/lib/python3.9/site-packages/timm/data/loader.py",
line 103, in iter for next_input, next_target in self.loader: File
"/uufs/
chpc.utah.edu/common/home/u0995017/anaconda3/envs/champkit/lib/python3.9/site-packages/torch/utils/data/dataloader.py",
line 530, in next data = self._next_data() File "/uufs/
chpc.utah.edu/common/home/u0995017/anaconda3/envs/champkit/lib/python3.9/site-packages/torch/utils/data/dataloader.py",
line 1224, in _next_data return self._process_data(data) File "/uufs/
chpc.utah.edu/common/home/u0995017/anaconda3/envs/champkit/lib/python3.9/site-packages/torch/utils/data/dataloader.py",
line 1250, in _process_data data.reraise() File "/uufs/
chpc.utah.edu/common/home/u0995017/anaconda3/envs/champkit/lib/python3.9/site-packages/torch/_utils.py",
line 457, in reraise raise exceptionFileNotFoundError: Caught
FileNotFoundError in DataLoader worker process 0.Original Traceback (most
recent call last): File "/uufs/
chpc.utah.edu/common/home/u0995017/anaconda3/envs/champkit/lib/python3.9/site-packages/torch/utils/data/_utils/worker.py",
line 287, in _worker_loop data = fetcher.fetch(index) File "/uufs/
chpc.utah.edu/common/home/u0995017/anaconda3/envs/champkit/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py",
line 49, in fetch data = [self.dataset[idx] for idx in
possibly_batched_index] File "/uufs/
chpc.utah.edu/common/home/u0995017/anaconda3/envs/champkit/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py",
line 49, in  data = [self.dataset[idx] for idx in
possibly_batched_index] File "/uufs/
chpc.utah.edu/common/home/u0995017/anaconda3/envs/champkit/lib/python3.9/site-packages/timm/data/dataset.py",
line 40, in getitem img, target = self.parser[index] File "/uufs/
chpc.utah.edu/common/home/u0995017/anaconda3/envs/champkit/lib/python3.9/site-packages/timm/data/parsers/parser_image_folder.py",
line 58, in getitem return open(path, 'rb'), targetFileNotFoundError:
[Errno 2] No such file or directory:
'data/task6_precancer_vs_benign_polyps/images-split/train/SSA/MHIST_alw.png'
On Mon, Jun 12, 2023 at 11:32 AM Jakub Kaczmarzyk @.***>
wrote:

@zhangweikobe24 https://github.com/zhangweikobe24 - yes you can run
experiments of task 6 alone. you can use any of the models in timm,
including vision transformers.
you can use the train.py script directly or you can use a weights and
biases sweep (as in
https://github.com/SBU-BMI/champkit/blob/main/sweeps/sweep_neurips_db.yml).
using train.py directly, you can start with the following command:
python train.py --model vit_small_r26_s32_224 --pretrained --data-dir data/task6_precancer_vs_benign_polyps/images-split/
you would choose the model with the --model option. there are a lot of
options for this. you can see
https://github.com/huggingface/pytorch-image-models#models and
https://huggingface.co/docs/timm/reference/models for more information.
—
Reply to this email directly, view it on GitHub
https://github.com/SBU-BMI/champkit/issues/9#issuecomment-1587765152,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AVKFHKAC4GSL5LYRPW6OAXTXK5HCFANCNFSM6AAAAAAY3CTECA
.
You are receiving this because you were mentioned.Message ID:
@.***>

Also got another error when splitting task 1 train folder
[champkit] ----------------- SETUP TASK 1 -----------------[champkit]
Downloading data to /uufs/
chpc.utah.edu/common/home/u0995017/champkit/data/task1_tumor_notumor[champkit]
This may take a while...camelyonpatch_level_2_split_test_x.h5.gz
100%[===================================================================================================================================>]
763.77M 5.76MB/s in 23m 6s camelyonpatch_level_2_split_test_y.h5.gz
100%[===================================================================================================================================>]
2.97K --.-KB/s in 0s camelyonpatch_level_2_split_train_x.h5.gz
100%[===================================================================================================================================>]
5.98G 5.33MB/s in 37m 34s camelyonpatch_level_2_split_train_y.h5.gz
100%[===================================================================================================================================>]
20.88K --.-KB/s in 0s camelyonpatch_level_2_split_valid_x.h5.gz
100%[===================================================================================================================================>]
768.63M 4.36MB/s in 32m 22s camelyonpatch_level_2_split_valid_y.h5.gz
100%[===================================================================================================================================>]
2.97K --.-KB/s in 0s [champkit] Verifying integrity of downloaded
files...camelyonpatch_level_2_split_test_x.h5.gz:
OKcamelyonpatch_level_2_split_test_y.h5.gz:
OKcamelyonpatch_level_2_split_train_x.h5.gz:
OKcamelyonpatch_level_2_split_train_y.h5.gz:
OKcamelyonpatch_level_2_split_valid_x.h5.gz:
OKcamelyonpatch_level_2_split_valid_y.h5.gz: OK[champkit] Uncompressing the
.h5.gz files[champkit] This may take a while...[champkit] Moving images
from HDF5 files to individual PNG files...[champkit] working on
PatchCamelyon valid split[champkit] X.shape (32768, 96, 96, 3)[champkit]
y.shape (32768,)[champkit] Saving images...[champkit] working on
PatchCamelyon test split[champkit] X.shape (32768, 96, 96, 3)[champkit]
y.shape (32768,)[champkit] Saving images...[champkit] working on
PatchCamelyon train splitdata/task1_tumor_notumor/setup.sh: line 55:
2722412 Killed python save_images.py $download_dir
On Mon, Jun 12, 2023 at 1:06 PM Wei Zhang @.***> wrote:

Hi, Jakuc
I used your command to run experiment on Task 6.  The erroe shows [Errno
2] No such file or directory:
'data/task6_precancer_vs_benign_polyps/images-split/train/SSA/MHIST_alw.png' .
But I actually can find this file.
See the details below
(champkit) @.***:champkit]$ python train.py --model
vit_small_r26_s32_224 --pretrained --data-dir
data/task6_precancer_vs_benign_polyps/images-split/++++++++++++++++
Command line:train.py --model vit_small_r26_s32_224 --pretrained
--data-dir data/task6_precancer_vs_benign_polyps/images-split/
+++++++++++++++++++++++++++++++++=Using classmap file at
data/task6_precancer_vs_benign_polyps/images-split/classmap.txtTraining
with a single process on 1 GPUs.Model vit_small_r26_s32_224 created,
param count:36,431,912Data processing configuration for current model +
dataset: input_size: (3, 224, 224) interpolation: bicubic mean: (0.5,
0.5, 0.5) std: (0.5, 0.5, 0.5) crop_pct: 0.9AMP not enabled. Training in
float32.Scheduled epochs: 310Traceback (most recent call last): File
"/uufs/chpc.utah.edu/common/home/u0995017/champkit/train.py", line 999,
in  main() File "/uufs/
chpc.utah.edu/common/home/u0995017/champkit/train.py", line 713, in main
train_metrics = train_one_epoch( File "/uufs/
chpc.utah.edu/common/home/u0995017/champkit/train.py", line 779, in
train_one_epoch for batch_idx, (input, target) in enumerate(loader): File
"/uufs/
chpc.utah.edu/common/home/u0995017/anaconda3/envs/champkit/lib/python3.9/site-packages/timm/data/loader.py",
line 103, in iter for next_input, next_target in self.loader: File
"/uufs/
chpc.utah.edu/common/home/u0995017/anaconda3/envs/champkit/lib/python3.9/site-packages/torch/utils/data/dataloader.py",
line 530, in next data = self._next_data() File "/uufs/
chpc.utah.edu/common/home/u0995017/anaconda3/envs/champkit/lib/python3.9/site-packages/torch/utils/data/dataloader.py",
line 1224, in _next_data return self._process_data(data) File "/uufs/
chpc.utah.edu/common/home/u0995017/anaconda3/envs/champkit/lib/python3.9/site-packages/torch/utils/data/dataloader.py",
line 1250, in _process_data data.reraise() File "/uufs/
chpc.utah.edu/common/home/u0995017/anaconda3/envs/champkit/lib/python3.9/site-packages/torch/_utils.py",
line 457, in reraise raise exceptionFileNotFoundError: Caught
FileNotFoundError in DataLoader worker process 0.Original Traceback (most
recent call last): File "/uufs/
chpc.utah.edu/common/home/u0995017/anaconda3/envs/champkit/lib/python3.9/site-packages/torch/utils/data/_utils/worker.py",
line 287, in _worker_loop data = fetcher.fetch(index) File "/uufs/
chpc.utah.edu/common/home/u0995017/anaconda3/envs/champkit/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py",
line 49, in fetch data = [self.dataset[idx] for idx in
possibly_batched_index] File "/uufs/
chpc.utah.edu/common/home/u0995017/anaconda3/envs/champkit/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py",
line 49, in  data = [self.dataset[idx] for idx in
possibly_batched_index] File "/uufs/
chpc.utah.edu/common/home/u0995017/anaconda3/envs/champkit/lib/python3.9/site-packages/timm/data/dataset.py",
line 40, in getitem img, target = self.parser[index] File "/uufs/
chpc.utah.edu/common/home/u0995017/anaconda3/envs/champkit/lib/python3.9/site-packages/timm/data/parsers/parser_image_folder.py",
line 58, in getitem return open(path, 'rb'), targetFileNotFoundError:
[Errno 2] No such file or directory:
'data/task6_precancer_vs_benign_polyps/images-split/train/SSA/MHIST_alw.png'
On Mon, Jun 12, 2023 at 11:32 AM Jakub Kaczmarzyk <
@.***> wrote:

@zhangweikobe24 https://github.com/zhangweikobe24 - yes you can run
experiments of task 6 alone. you can use any of the models in timm,
including vision transformers.
you can use the train.py script directly or you can use a weights and
biases sweep (as in
https://github.com/SBU-BMI/champkit/blob/main/sweeps/sweep_neurips_db.yml).
using train.py directly, you can start with the following command:
python train.py --model vit_small_r26_s32_224 --pretrained --data-dir data/task6_precancer_vs_benign_polyps/images-split/
you would choose the model with the --model option. there are a lot of
options for this. you can see
https://github.com/huggingface/pytorch-image-models#models and
https://huggingface.co/docs/timm/reference/models for more information.
—
Reply to this email directly, view it on GitHub
https://github.com/SBU-BMI/champkit/issues/9#issuecomment-1587765152,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AVKFHKAC4GSL5LYRPW6OAXTXK5HCFANCNFSM6AAAAAAY3CTECA
.
You are receiving this because you were mentioned.Message ID:
@.***>

regarding the error No such file or directory: 'data/task6_precancer_vs_benign_polyps/images-split/train/SSA/MHIST_alw.png', is it possible the symlink is broken? can you check with ls -l data/task6_precancer_vs_benign_polyps/images-split/train/SSA/MHIST_alw.png ?
the second error (in task 1) suggests that you hit your RAM limit. do you have a machine with more ram? alternatively the setup script for task 1 can be updated to be more memory efficient

Running your command gives the following output. Do I need to set up the
dataset again?
(champkit) @.***:~]$ ls -l
data/task6_precancer_vs_benign_polyps/images-split/train/SSA/MHIST_alw.pnglrwxrwxrwx
1 u0995017 knudsen 29 Jun 12 12:58
data/task6_precancer_vs_benign_polyps/images-split/train/SSA/MHIST_alw.png
-> ../../../images/MHIST_alw.png
On Mon, Jun 12, 2023 at 3:08 PM Jakub Kaczmarzyk @.***>
wrote:

regarding the error No such file or directory:
'data/task6_precancer_vs_benign_polyps/images-split/train/SSA/MHIST_alw.png',
is it possible the symlink is broken? can you check with ls -l
data/task6_precancer_vs_benign_polyps/images-split/train/SSA/MHIST_alw.png
?
the second error (in task 1) suggests that you hit your RAM limit. do you
have a machine with more ram? alternatively the setup script for task 1 can
be updated to be more memory efficient
—
Reply to this email directly, view it on GitHub
https://github.com/SBU-BMI/champkit/issues/9#issuecomment-1588104917,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AVKFHKDYFTJDY542SNS2DCLXK6ALTANCNFSM6AAAAAAY3CTECA
.
You are receiving this because you were mentioned.Message ID:
@.***>

yes try removing the task 6 dataset and setting it up again. use the following command (run it from the root champkit directory)
bash data/task6_precancer_vs_benign_polyps/setup.sh

Hi, Jakub
I ran this command (python train.py --model vit_small_r26_s32_224
--pretrained --data-dir data/task6_precancer_vs_benign_polyps/images-split/)
do you think it looks correct?
[image: image.png]
On Mon, Jun 12, 2023 at 3:40 PM Jakub Kaczmarzyk @.***>
wrote:

yes try removing the task 6 dataset and setting it up again. use the
following command (run it from the root champkit directory)
bash data/task6_precancer_vs_benign_polyps/setup.sh
—
Reply to this email directly, view it on GitHub
https://github.com/SBU-BMI/champkit/issues/9#issuecomment-1588145039,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AVKFHKE56E53YN5GVR5QHO3XK6EGNANCNFSM6AAAAAAY3CTECA
.
You are receiving this because you were mentioned.Message ID:
@.***>

Sorry about that!
Here is a part of code returns. Does early stopping means something is
wrong during training?
rain: 28 [ 12/13 (100%)] Loss: nan (nan) Time: 0.949s, 134.91/s (1.009s,
126.90/s) LR: 4.893e-02 Data: 0.000 (0.058)Test: [ 0/3] Time: 0.857 (0.857)
Loss: nan ( nan) @.: 0.0000 ( 0.0000) AUROC: 0.0000Test: [ 3/3] Time:
0.124 (0.530) Loss: nan ( nan) @.: 100.0000 (31.4943) AUROC: 0.0010Train:
29 [ 0/13 ( 0%)] Loss: nan (nan) Time: 1.646s, 77.74/s (1.646s, 77.74/s)
LR: 4.886e-02 Data: 0.681 (0.681)Train: 29 [ 12/13 (100%)] Loss: nan (nan)
Time: 0.949s, 134.91/s (1.007s, 127.12/s) LR: 4.886e-02 Data: 0.000
(0.060)Test:
[ 0/3] Time: 0.874 (0.874) Loss: nan ( nan) @.: 0.0000 ( 0.0000) AUROC:
0.0000Test: [ 3/3] Time: 0.125 (0.552) Loss: nan ( nan) @.: 100.0000
(31.4943) AUROC: 0.0010Train: 30 [ 0/13 ( 0%)] Loss: nan (nan) Time:
1.704s, 75.11/s (1.704s, 75.11/s) LR: 4.878e-02 Data: 0.707 (0.707)Train:
30 [ 12/13 (100%)] Loss: nan (nan) Time: 0.947s, 135.23/s (1.013s,
126.35/s) LR: 4.878e-02 Data: 0.000 (0.063)Test: [ 0/3] Time: 0.863 (0.863)
Loss: nan ( nan) @.: 0.0000 ( 0.0000) AUROC: 0.0000Test: [ 3/3] Time:
0.124 (0.533) Loss: nan ( nan) @.: 100.0000 (31.4943) AUROC: 0.0010Train:
31 [ 0/13 ( 0%)] Loss: nan (nan) Time: 1.675s, 76.42/s (1.675s, 76.42/s)
LR: 4.869e-02 Data: 0.682 (0.682)Train: 31 [ 12/13 (100%)] Loss: nan (nan)
Time: 0.949s, 134.87/s (1.009s, 126.84/s) LR: 4.869e-02 Data: 0.000
(0.061)Test:
[ 0/3] Time: 0.841 (0.841) Loss: nan ( nan) @.: 0.0000 ( 0.0000) AUROC:
0.0000Test: [ 3/3] Time: 0.125 (0.566) Loss: nan ( nan) @.: 100.0000
(31.4943) AUROC: 0.0010[EarlyStopping] setting baseline score[EarlyStopping]
score improved -- resettingTrain: 32 [ 0/13 ( 0%)] Loss: nan (nan) Time:
1.654s, 77.39/s (1.654s, 77.39/s) LR: 4.861e-02 Data: 0.628 (0.628)Train:
32 [ 12/13 (100%)] Loss: nan (nan) Time: 0.948s, 135.08/s (1.007s,
127.07/s) LR: 4.861e-02 Data: 0.000 (0.056)Test: [ 0/3] Time: 0.884 (0.884)
Loss: nan ( nan) @.: 0.0000 ( 0.0000) AUROC: 0.0000Test: [ 3/3] Time:
0.125 (0.537) Loss: nan ( nan) @.: 100.0000 (31.4943) AUROC:
0.0010[EarlyStopping]
curr=nan best=nan[EarlyStopping] 1 / 20Train: 33 [ 0/13 ( 0%)] Loss: nan
(nan) Time: 1.637s, 78.21/s (1.637s, 78.21/s) LR: 4.852e-02 Data: 0.652
(0.652)Train: 33 [ 12/13 (100%)] Loss: nan (nan) Time: 0.948s, 135.08/s
(1.008s, 127.01/s) LR: 4.852e-02 Data: 0.000 (0.058)Test: [ 0/3] Time:
0.856 (0.856) Loss: nan ( nan) @.: 0.0000 ( 0.0000) AUROC: 0.0000Test: [
3/3] Time: 0.125 (0.570) Loss: nan ( nan) @.: 100.0000 (31.4943) AUROC:
0.0010[EarlyStopping] curr=nan best=nan[EarlyStopping] 2 / 20Train: 34 [
0/13 ( 0%)] Loss: nan (nan) Time: 1.629s, 78.59/s (1.629s, 78.59/s) LR:
4.843e-02 Data: 0.639 (0.639)Train: 34 [ 12/13 (100%)] Loss: nan (nan)
Time: 0.948s, 135.03/s (1.008s, 127.04/s) LR: 4.843e-02 Data: 0.000
(0.057)Test:
[ 0/3] Time: 0.880 (0.880) Loss: nan ( nan) @.: 0.0000 ( 0.0000) AUROC:
0.0000Test: [ 3/3] Time: 0.124 (0.565) Loss: nan ( nan) @.: 100.0000
(31.4943) AUROC: 0.0010[EarlyStopping] curr=nan best=nan[EarlyStopping] 3 /
20Train: 35 [ 0/13 ( 0%)] Loss: nan (nan) Time: 1.616s, 79.19/s (1.616s,
79.19/s) LR: 4.834e-02 Data: 0.624 (0.624)Train: 35 [ 12/13 (100%)] Loss:
nan (nan) Time: 0.949s, 134.81/s (1.006s, 127.18/s) LR: 4.834e-02 Data:
0.000 (0.056)Test: [ 0/3] Time: 0.873 (0.873) Loss: nan ( nan) @.:
0.0000 ( 0.0000) AUROC: 0.0000Test: [ 3/3] Time: 0.125 (0.535) Loss: nan (
nan) @.: 100.0000 (31.4943) AUROC: 0.0010[EarlyStopping] curr=nan
best=nan[EarlyStopping] 4 / 20Train: 36 [ 0/13 ( 0%)] Loss: nan (nan) Time:
1.707s, 75.01/s (1.707s, 75.01/s) LR: 4.824e-02 Data: 0.695 (0.695)Train:
36 [ 12/13 (100%)] Loss: nan (nan) Time: 0.945s, 135.42/s (1.012s,
126.46/s) LR: 4.824e-02 Data: 0.000 (0.061)Test: [ 0/3] Time: 0.812 (0.812)
Loss: nan ( nan) @.: 0.0000 ( 0.0000) AUROC: 0.0000Test: [ 3/3] Time:
0.124 (0.558) Loss: nan ( nan) @.: 100.0000 (31.4943) AUROC:
0.0010[EarlyStopping]
curr=nan best=nan[EarlyStopping] 5 / 20
On Tue, Jun 13, 2023 at 11:25 AM Jakub Kaczmarzyk @.***>
wrote:

the command python train.py --model vit_small_r26_s32_224 --pretrained
--data-dir data/task6_precancer_vs_benign_polyps/images-split looks
correct but i cannot see the image if you attached one.
—
Reply to this email directly, view it on GitHub
https://github.com/SBU-BMI/champkit/issues/9#issuecomment-1589731874,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AVKFHKADGADLGDQKFRM4OJDXLCPA3ANCNFSM6AAAAAAY3CTECA
.
You are receiving this because you were mentioned.Message ID:
@.***>

early stopping is a regularization technique to mitigate overfitting to the training data.
but one problem is that the loss is nan. i have not run into an nan loss with champkit before, so i am not sure what is causing it here. let me send an updated CLI command that you can try. it will be a CLI command that is derived from the sweep files in the 'sweeps/' directory

can you try the following command for example?
python train.py --batch-size=84 --data-dir=data/task6_precancer_vs_benign_polyps/images-split/ --drop=0.3 --epochs=500 --experiment=champkit-debug --hflip=0.5 --vflip=0.5 --lr=0.001 --model=vit_small_r26_s32_224 --num-classes=2 --opt=adamw --output=output/ --pretrained --sched=cosine --seed=0 --train-split=train --val-split=val --warmup-lr=1e-06 --workers=4

Just got a chance to try it. Here is the result.
[EarlyStopping] curr=0.3511 best=0.2657[EarlyStopping] 15 / 20Train: 81 [
0/20 ( 0%)] Loss: 0.3628 (0.363) Time: 1.168s, 71.89/s (1.168s, 71.89/s)
LR: 9.367e-04 Data: 0.443 (0.443)Train: 81 [ 19/20 (100%)] Loss: 0.3754
(0.371) Time: 0.733s, 114.55/s (0.765s, 109.87/s) LR: 9.367e-04 Data: 0.000
(0.028)Test: [ 0/5] Time: 0.569 (0.569) Loss: 0.3618 (0.3618) @.:
88.0952 (88.0952) AUROC: 0.0000Test: [ 5/5] Time: 0.048 (0.262) Loss:
0.3959 (0.3433) @.: 86.6667 (87.3563) AUROC: 0.9356[EarlyStopping]
curr=0.3433 best=0.2657[EarlyStopping] 16 / 20Train: 82 [ 0/20 ( 0%)] Loss:
0.3949 (0.395) Time: 1.165s, 72.11/s (1.165s, 72.11/s) LR: 9.352e-04 Data:
0.440 (0.440)Train: 82 [ 19/20 (100%)] Loss: 0.4050 (0.380) Time: 0.734s,
114.44/s (0.765s, 109.76/s) LR: 9.352e-04 Data: 0.000 (0.028)Test: [ 0/5]
Time: 0.652 (0.652) Loss: 0.3090 (0.3090) @.: 89.2857 (89.2857) AUROC:
0.0000Test: [ 5/5] Time: 0.049 (0.276) Loss: 0.2717 (0.3097) @.: 80.0000
(88.0460) AUROC: 0.9335[EarlyStopping] curr=0.3097 best=0.2657[EarlyStopping]
17 / 20Train: 83 [ 0/20 ( 0%)] Loss: 0.3616 (0.362) Time: 1.169s, 71.87/s
(1.169s, 71.87/s) LR: 9.336e-04 Data: 0.443 (0.443)Train: 83 [ 19/20
(100%)] Loss: 0.3495 (0.374) Time: 0.734s, 114.45/s (0.766s, 109.67/s) LR:
9.336e-04 Data: 0.000 (0.029)Test: [ 0/5] Time: 0.574 (0.574) Loss: 0.2446
(0.2446) @.: 91.6667 (91.6667) AUROC: 0.0000Test: [ 5/5] Time: 0.048
(0.263) Loss: 0.6534 (0.3364) @.: 66.6667 (87.1264) AUROC:
0.9257[EarlyStopping]
curr=0.3364 best=0.2657[EarlyStopping] 18 / 20Train: 84 [ 0/20 ( 0%)] Loss:
0.3986 (0.399) Time: 1.170s, 71.78/s (1.170s, 71.78/s) LR: 9.320e-04 Data:
0.446 (0.446)Train: 84 [ 19/20 (100%)] Loss: 0.3698 (0.369) Time: 0.743s,
113.05/s (0.765s, 109.76/s) LR: 9.320e-04 Data: 0.000 (0.028)Test: [ 0/5]
Time: 0.662 (0.662) Loss: 0.2846 (0.2846) @.: 86.9048 (86.9048) AUROC:
0.0000Test: [ 5/5] Time: 0.048 (0.277) Loss: 0.4104 (0.2888) @.: 86.6667
(88.5057) AUROC: 0.9484[EarlyStopping] curr=0.2888 best=0.2657[EarlyStopping]
19 / 20Train: 85 [ 0/20 ( 0%)] Loss: 0.3109 (0.311) Time: 1.170s, 71.81/s
(1.170s, 71.81/s) LR: 9.304e-04 Data: 0.444 (0.444)Train: 85 [ 19/20
(100%)] Loss: 0.3688 (0.369) Time: 0.733s, 114.64/s (0.765s, 109.85/s) LR:
9.304e-04 Data: 0.000 (0.028)Test: [ 0/5] Time: 0.629 (0.629) Loss: 0.3069
(0.3069) @.: 85.7143 (85.7143) AUROC: 0.0000Test: [ 5/5] Time: 0.048
(0.272) Loss: 0.5862 (0.2957) @.: 73.3333 (88.5057) AUROC:
0.9400[EarlyStopping]
curr=0.2957 best=0.2657[EarlyStopping] 20 / 20STOPPING because of
EarlyStopping callback*** Best metric: 0.25681033730506897 (epoch 30)(champkit)
@.***:champkit]$
On Thu, Jun 15, 2023 at 11:38 AM Jakub Kaczmarzyk @.***>
wrote:

can you try the following command for example?
python train.py --batch-size=84 --data-dir=data/task6_precancer_vs_benign_polyps/images-split/ --drop=0.3 --epochs=500 --experiment=champkit-debug --hflip=0.5 --vflip=0.5 --lr=0.001 --model=vit_small_r26_s32_224 --num-classes=2 --opt=adamw --output=output/ --pretrained --sched=cosine --seed=0 --train-split=train --val-split=val --warmup-lr=1e-06 --workers=4
—
Reply to this email directly, view it on GitHub
https://github.com/SBU-BMI/champkit/issues/9#issuecomment-1593482887,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AVKFHKC5SYCAJGLS65TBFRTXLNCANANCNFSM6AAAAAAY3CTECA
.
You are receiving this because you were mentioned.Message ID:
@.***>